strip off group:; syntax (needed to match new code behaviour)
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 10 Apr 1995 22:54:19 +0000 (14:54 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 10 Apr 1995 22:54:19 +0000 (14:54 -0800)
SCCS-vsn: usr.sbin/sendmail/cf/m4/proto.m4 8.65
SCCS-vsn: usr.sbin/sendmail/cf/mailer/smtp.m4 8.20
SCCS-vsn: usr.sbin/sendmail/cf/mailer/uucp.m4 8.20

usr/src/usr.sbin/sendmail/cf/m4/proto.m4
usr/src/usr.sbin/sendmail/cf/mailer/smtp.m4
usr/src/usr.sbin/sendmail/cf/mailer/uucp.m4

index f726a31..76a49b7 100644 (file)
@@ -8,7 +8,7 @@ divert(-1)
 #
 divert(0)
 
 #
 divert(0)
 
-VERSIONID(`@(#)proto.m4        8.64 (Berkeley) %G%')
+VERSIONID(`@(#)proto.m4        8.65 (Berkeley) %G%')
 
 MAILER(local)dnl
 
 
 MAILER(local)dnl
 
@@ -415,15 +415,23 @@ S3
 # handle null input (translate to <@> special case)
 R$@                    $@ <@>
 
 # handle null input (translate to <@> special case)
 R$@                    $@ <@>
 
+# strip group: syntax (not inside angle brackets!) and trailing semicolon
+R$*                    $: $1 <@>                       mark addresses
+R$* < $* > $* <@>      $: $1 < $2 > $3                 unmark <addr>
+R$* :: $* <@>          $: $1 :: $2                     unmark host::addr
+R$* : $* <@>           $: $2                           strip colon if marked
+R$* <@>                        $: $1                           unmark
+R$* ;                  $: $1                           strip trailing semi
+
+# null input now results from list:; syntax
+R$@                    $@ :; <@>
+
 # basic textual canonicalization -- note RFC733 heuristic here
 R$*<$*>$*<$*>$*                $2$3<$4>$5                      strip multiple <> <>
 R$*<$*<$+>$*>$*                <$3>$5                          2-level <> nesting
 R$*<>$*                        $@ <@>                          MAIL FROM:<> case
 R$*<$+>$*              $2                              basic RFC821/822 parsing
 
 # basic textual canonicalization -- note RFC733 heuristic here
 R$*<$*>$*<$*>$*                $2$3<$4>$5                      strip multiple <> <>
 R$*<$*<$+>$*>$*                <$3>$5                          2-level <> nesting
 R$*<>$*                        $@ <@>                          MAIL FROM:<> case
 R$*<$+>$*              $2                              basic RFC821/822 parsing
 
-# handle list:; syntax as special case
-R$*:;$*                        $@ $1 :; <@>
-
 # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
 R@ $+ , $+             @ $1 : $2                       change all "," to ":"
 
 # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
 R@ $+ , $+             @ $1 : $2                       change all "," to ":"
 
index 0cda6d2..3848ecf 100644 (file)
@@ -16,7 +16,7 @@ POPDIVERT
 ###   SMTP Mailer specification   ###
 #####################################
 
 ###   SMTP Mailer specification   ###
 #####################################
 
-VERSIONID(`@(#)smtp.m4 8.19 (Berkeley) %G%')
+VERSIONID(`@(#)smtp.m4 8.20 (Berkeley) %G%')
 
 Msmtp,         P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, T=Internet,
                L=990, ifdef(`SMTP_MAILER_MAX', `M=SMTP_MAILER_MAX, ')A=SMTP_MAILER_ARGS
 
 Msmtp,         P=[IPC], F=CONCAT(mDFMuX, SMTP_MAILER_FLAGS), S=11/31, R=ifdef(`_ALL_MASQUERADE_', `11/31', `21'), E=\r\n, T=Internet,
                L=990, ifdef(`SMTP_MAILER_MAX', `M=SMTP_MAILER_MAX, ')A=SMTP_MAILER_ARGS
@@ -32,7 +32,7 @@ Mrelay,               P=[IPC], F=CONCAT(mDFMuXa8, SMTP_MAILER_FLAGS), S=11/31, R=61, E=\r\n,
 #
 S11
 R$+                    $: $>51 $1                      sender/recipient common
 #
 S11
 R$+                    $: $>51 $1                      sender/recipient common
-R$* :; <@>             $@ $1 :;                        list:; special case
+R$* :; <@>             $@                              list:; special case
 R$*                    $@ $>61 $1                      qualify unqual'ed names
 
 
 R$*                    $@ $>61 $1                      qualify unqual'ed names
 
 
@@ -54,7 +54,7 @@ R$+                   $: $1 < @ $j >                  add local domain
 #
 S31
 R$+                    $: $>51 $1                      sender/recipient common
 #
 S31
 R$+                    $: $>51 $1                      sender/recipient common
-R$* :; <@>             $@ $1 :;                        list:; special case
+R:; <@>                        $@                              list:; special case
 
 # do special header rewriting
 R$* <@> $*             $@ $1 <@> $2                    pass null host through
 
 # do special header rewriting
 R$* <@> $*             $@ $1 <@> $2                    pass null host through
index e3dbc59..51cf501 100644 (file)
@@ -16,7 +16,7 @@ POPDIVERT
 ###   UUCP Mailer specification   ###
 #####################################
 
 ###   UUCP Mailer specification   ###
 #####################################
 
-VERSIONID(`@(#)uucp.m4 8.19 (Berkeley) %G%')
+VERSIONID(`@(#)uucp.m4 8.20 (Berkeley) %G%')
 
 #
 #  There are innumerable variations on the UUCP mailer.  It really
 
 #
 #  There are innumerable variations on the UUCP mailer.  It really
@@ -53,8 +53,8 @@ S12
 # handle error address as a special case
 R<@>                           $n                      errors to mailer-daemon
 
 # handle error address as a special case
 R<@>                           $n                      errors to mailer-daemon
 
-# do not qualify list:; syntax
-R$* :; <@>                     $@ $1 :;
+# list:; syntax should disappear
+R:; <@>                                $@
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $=w >                  $1                      strip local name
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $=w >                  $1                      strip local name
@@ -72,8 +72,8 @@ R! $+                         $: $k ! $1              in case $U undefined
 #
 S22
 
 #
 S22
 
-# don't touch list:; syntax
-R$* :; <@>                     $@ $1 :;
+# list:; should disappear
+R:; <@>                                $@
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $j >                   $1                      strip local name
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $j >                   $1                      strip local name
@@ -87,8 +87,8 @@ R$* < @ $+ >                  $2 ! $1                 convert to UUCP format
 #
 S42
 
 #
 S42
 
-# don't touch list:; syntax
-R$* :; <@>                     $@ $1 :;
+# list:; syntax should disappear
+R:; <@>                                $@
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $j >                   $1                      strip local name
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $j >                   $1                      strip local name
@@ -122,8 +122,8 @@ S72
 # handle error address as a special case
 R<@>                           $n                      errors to mailer-daemon
 
 # handle error address as a special case
 R<@>                           $n                      errors to mailer-daemon
 
-# do not qualify list:; syntax
-R$* :; <@>                     $@ $1 :;
+# list:; syntax should disappear
+R:; <@>                                $@
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $=w >                  $1                      strip local name
 
 R$* < @ $* . >                 $1 < @ $2 >             strip trailing dots
 R$* < @ $=w >                  $1                      strip local name