add dotted users
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 17 Jul 1994 01:21:35 +0000 (17:21 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Sun, 17 Jul 1994 01:21:35 +0000 (17:21 -0800)
SCCS-vsn: usr.sbin/sendmail/cf/m4/cf.m4 8.6
SCCS-vsn: usr.sbin/sendmail/cf/m4/proto.m4 8.50
SCCS-vsn: usr.sbin/sendmail/cf/README 8.32

usr/src/usr.sbin/sendmail/cf/README
usr/src/usr.sbin/sendmail/cf/m4/cf.m4
usr/src/usr.sbin/sendmail/cf/m4/proto.m4

index b2cee59..4bfdfec 100644 (file)
@@ -4,7 +4,7 @@
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
 
                Eric Allman <eric@CS.Berkeley.EDU>
 
-               @(#)README      8.31 (Berkeley) %G%
+               @(#)README      8.32 (Berkeley) %G%
 
 
 This document describes the sendmail configuration files being used
 
 
 This document describes the sendmail configuration files being used
@@ -814,6 +814,37 @@ To build the internal form of the user databae, use:
        makemap btree /usr/data/base.db < /usr/data/base.txt
 
 
        makemap btree /usr/data/base.db < /usr/data/base.txt
 
 
++--------------------------------+
+| MISCELLANEOUS SPECIAL FEATURES |
++--------------------------------+
+
+DOTTED_USER(name)
+       Sometimes it is convenient to merge configuration on a
+       centralized mail machine, for example, to forward all
+       root mail to a mail server.  In this case it might be
+       useful to be able to treat the root addresses as a class
+       of addresses with subtle differences.  You can do this
+       using dotted users.  For example, a client might include
+       the alias:
+
+               root:  root.client1@server
+
+       On the server, the mail configuration would include:
+
+               DOTTED_USER(root)
+
+       Aliases on the server that would match this address would
+       be "root.client", "root.*", and "root", tried in that
+       order.  You can specify multiple addresses either by
+       joining them in one DOTTTED_USER macro or by having
+       multiple macros:
+
+               DOTTED_USER(root)
+               DOTTED_USER(postmaster mailer-daemon)
+
+       defines three dotted users.
+
+
 +------------------+
 | FlexFAX SOFTWARE |
 +------------------+
 +------------------+
 | FlexFAX SOFTWARE |
 +------------------+
@@ -1198,7 +1229,7 @@ CLASSES
    A
    B
    C
    A
    B
    C
-   D
+   D   "dotted" users
    E   addresses that should not seem to come from $M
    F   hosts we forward for
    G
    E   addresses that should not seem to come from $M
    F   hosts we forward for
    G
index f6932ca..386bb01 100644 (file)
@@ -60,6 +60,11 @@ S2
 define(`LOCAL_RULE_3', `divert(2)')
 define(`LOCAL_CONFIG', `divert(6)')
 define(`LOCAL_NET_CONFIG', `define(`_LOCAL_RULES_', 1)divert(1)')
 define(`LOCAL_RULE_3', `divert(2)')
 define(`LOCAL_CONFIG', `divert(6)')
 define(`LOCAL_NET_CONFIG', `define(`_LOCAL_RULES_', 1)divert(1)')
+define(`DOTTED_USER',
+       `ifdef(`__DOTTED_USER_LIST__',
+               `define(`__DOTTED_USER_LIST__', __DOTTED_USER_LIST__
+CD $1)',
+               `define(`__DOTTED_USER_LIST__', CD $1)')')
 define(`UUCPSMTP', `R DOL(*) < @ $1 .UUCP > DOL(*)     DOL(1) < @ $2 > DOL(2)')
 define(`CONCAT', `$1$2$3$4$5$6$7')
 define(`DOL', ``$'$1')
 define(`UUCPSMTP', `R DOL(*) < @ $1 .UUCP > DOL(*)     DOL(1) < @ $2 > DOL(2)')
 define(`CONCAT', `$1$2$3$4$5$6$7')
 define(`DOL', ``$'$1')
@@ -119,4 +124,4 @@ define(`confMIME_FORMAT_ERRORS', `True')
 define(`confTRY_NULL_MX_LIST', `False')
 
 divert(0)dnl
 define(`confTRY_NULL_MX_LIST', `False')
 
 divert(0)dnl
-VERSIONID(`@(#)cf.m4   8.5 (Berkeley) %G%')
+VERSIONID(`@(#)cf.m4   8.6 (Berkeley) %G%')
index 1e66c9a..553cb4d 100644 (file)
@@ -8,7 +8,7 @@ divert(-1)
 #
 divert(0)
 
 #
 divert(0)
 
-VERSIONID(`@(#)proto.m4        8.49 (Berkeley) %G%')
+VERSIONID(`@(#)proto.m4        8.50 (Berkeley) %G%')
 
 MAILER(local)dnl
 
 
 MAILER(local)dnl
 
@@ -86,9 +86,13 @@ DM`'ifdef(`MASQUERADE_NAME', MASQUERADE_NAME)
 
 # class L: names that should be delivered locally, even if we have a relay
 # class E: names that should be exposed as from this host, even if we masquerade
 
 # class L: names that should be delivered locally, even if we have a relay
 # class E: names that should be exposed as from this host, even if we masquerade
-#CLroot
-CEroot
+# class D: dotted names, e.g., root.machinename
+#CL root
+CE root
 undivert(5)dnl
 undivert(5)dnl
+ifdef(`__DOTTED_USER_LIST__',
+       `__DOTTED_USER_LIST__',
+       `#CD postmaster')
 
 # operators that cannot be in local usernames (i.e., network indicators)
 CO @ % ifdef(`_NO_UUCP_', `', `!')
 
 # operators that cannot be in local usernames (i.e., network indicators)
 CO @ % ifdef(`_NO_UUCP_', `', `!')
@@ -118,7 +122,7 @@ Dn`'confMAILER_NAME
 Do`'confOPERATORS
 
 # format of a total name
 Do`'confOPERATORS
 
 # format of a total name
-Dq`'ifdef(`confFROM_HEADER', confFROM_HEADER, $g$?x ($x)$.', `$?x$x <$g>$|$g$.)
+Dq`'ifdef(`confFROM_HEADER', confFROM_HEADER, `$?x$x <$g>$|$g$.')
 include(`../m4/version.m4')
 
 ###############
 include(`../m4/version.m4')
 
 ###############
@@ -581,6 +585,10 @@ R$+                        $#_LOCAL_ $: $1                 regular local names
 
 S5
 
 
 S5
 
+# if we have a "special dotted user", convert it back to the base name
+R$=D . *               $#_LOCAL_ $: $1
+R$=D . $+              $#_LOCAL_ $: $1 . *
+
 # see if we have a relay or a hub
 R$+                    $: $>_SET_95_ < $R > $1         try relay
 R$+                    $: $>_SET_95_ < $H > $1         try hub')
 # see if we have a relay or a hub
 R$+                    $: $>_SET_95_ < $R > $1         try relay
 R$+                    $: $>_SET_95_ < $H > $1         try hub')