Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/gnu/dist/sendmail Pull up revisions 1.4-1.5 (requested ...



details:   https://anonhg.NetBSD.org/src/rev/29d234c0c171
branches:  netbsd-1-5
changeset: 490784:29d234c0c171
user:      he <he%NetBSD.org@localhost>
date:      Fri Mar 09 17:49:48 2001 +0000

description:
Pull up revisions 1.4-1.5 (requested by itojun):
  Upgrade to sendmail 8.11.3.

diffstat:

 gnu/dist/sendmail/cf/m4/cfhead.m4              |  26 +++---
 gnu/dist/sendmail/cf/m4/proto.m4               |  93 +++++++++++++++++--------
 gnu/dist/sendmail/contrib/qtool.pl             |   9 +-
 gnu/dist/sendmail/devtools/README              |  60 +++++++++------
 gnu/dist/sendmail/devtools/bin/Build           |  46 +-----------
 gnu/dist/sendmail/include/libsmdb/smdb.h       |  24 ++----
 gnu/dist/sendmail/include/sendmail/pathnames.h |   2 +-
 gnu/dist/sendmail/include/sendmail/sendmail.h  |  13 +++-
 gnu/dist/sendmail/libmilter/comm.c             |  20 +++-
 gnu/dist/sendmail/libmilter/libmilter.h        |  23 +++++-
 gnu/dist/sendmail/libmilter/signal.c           |  14 +--
 gnu/dist/sendmail/mailstats/mailstats.c        |   4 +-
 gnu/dist/sendmail/makemap/makemap.8            |  13 +-
 gnu/dist/sendmail/makemap/makemap.c            |  45 +++++------
 gnu/dist/sendmail/praliases/praliases.c        |  62 +++++++++++------
 gnu/dist/sendmail/sendmail/alias.c             |  10 +-
 gnu/dist/sendmail/sendmail/bf_torek.c          |  49 +++++++++++++-
 gnu/dist/sendmail/sendmail/domain.c            |  49 +++++++++++--
 gnu/dist/sendmail/sendmail/envelope.c          |  24 ++++--
 gnu/dist/sendmail/sendmail/mailq.0             |   4 +-
 gnu/dist/sendmail/sendmail/mailq.1             |   8 +-
 gnu/dist/sendmail/sendmail/sfsasl.c            |  83 +++++++++++++++++-----
 gnu/dist/sendmail/sendmail/stats.c             |   4 +-
 23 files changed, 428 insertions(+), 257 deletions(-)

diffs (truncated from 1810 to 300 lines):

diff -r 26111409454d -r 29d234c0c171 gnu/dist/sendmail/cf/m4/cfhead.m4
--- a/gnu/dist/sendmail/cf/m4/cfhead.m4 Fri Mar 09 17:49:45 2001 +0000
+++ b/gnu/dist/sendmail/cf/m4/cfhead.m4 Fri Mar 09 17:49:48 2001 +0000
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998-2000 Sendmail, Inc. and its suppliers.
+# Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
 #      All rights reserved.
 # Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
 # Copyright (c) 1988, 1993
@@ -154,26 +154,28 @@
                CONCAT(CY, $'1`),
                CONCAT(C, $3, $'1`))')
 sinclude(_CF_DIR_`'siteconfig/$1.m4)')
-define(`EXPOSED_USER', `PUSHDIVERT(5)CE$1
+define(`EXPOSED_USER', `PUSHDIVERT(5)C{E}$1
 POPDIVERT`'dnl`'')
-define(`LOCAL_USER', `PUSHDIVERT(5)CL$1
+ifdef(`_FFR_EXPOSED_USER_FILE', `define(`EXPOSED_USER_FILE', `PUSHDIVERT(5)F{E}$1
+POPDIVERT`'dnl`'')', `dnl')
+define(`LOCAL_USER', `PUSHDIVERT(5)C{L}$1
 POPDIVERT`'dnl`'')
 define(`MASQUERADE_AS', `define(`MASQUERADE_NAME', $1)')
-define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)CM$1
+define(`MASQUERADE_DOMAIN', `PUSHDIVERT(5)C{M}$1
 POPDIVERT`'dnl`'')
-define(`MASQUERADE_EXCEPTION', `PUSHDIVERT(5)CN$1
+define(`MASQUERADE_EXCEPTION', `PUSHDIVERT(5)C{N}$1
 POPDIVERT`'dnl`'')
-define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)FM$1
+define(`MASQUERADE_DOMAIN_FILE', `PUSHDIVERT(5)F{M}$1
 POPDIVERT`'dnl`'')
-define(`LOCAL_DOMAIN', `PUSHDIVERT(5)Cw$1
+define(`LOCAL_DOMAIN', `PUSHDIVERT(5)C{w}$1
 POPDIVERT`'dnl`'')
 define(`CANONIFY_DOMAIN', `PUSHDIVERT(5)C{Canonify}$1
 POPDIVERT`'dnl`'')
 define(`CANONIFY_DOMAIN_FILE', `PUSHDIVERT(5)F{Canonify}$1
 POPDIVERT`'dnl`'')
-define(`GENERICS_DOMAIN', `PUSHDIVERT(5)CG$1
+define(`GENERICS_DOMAIN', `PUSHDIVERT(5)C{G}$1
 POPDIVERT`'dnl`'')
-define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)FG$1
+define(`GENERICS_DOMAIN_FILE', `PUSHDIVERT(5)F{G}$1
 POPDIVERT`'dnl`'')
 define(`LDAPROUTE_DOMAIN', `PUSHDIVERT(5)C{LDAPRoute}$1
 POPDIVERT`'dnl`'')
@@ -185,9 +187,9 @@
 define(`VIRTUSER_DOMAIN_FILE', `PUSHDIVERT(5)F{VirtHost}$1
 define(`_VIRTHOSTS_')
 POPDIVERT`'dnl`'')
-define(`RELAY_DOMAIN', `PUSHDIVERT(5)CR$1
+define(`RELAY_DOMAIN', `PUSHDIVERT(5)C{R}$1
 POPDIVERT`'dnl`'')
-define(`RELAY_DOMAIN_FILE', `PUSHDIVERT(5)FR$1
+define(`RELAY_DOMAIN_FILE', `PUSHDIVERT(5)F{R}$1
 POPDIVERT`'dnl`'')
 define(`TRUST_AUTH_MECH', `PUSHDIVERT(5)C{TrustAuthMech}$1
 POPDIVERT`'dnl`'')
@@ -250,4 +252,4 @@
 
 
 divert(0)dnl
-VERSIONID(`Id: cfhead.m4,v 8.76.4.9 2000/07/11 23:50:30 geir Exp')
+VERSIONID(`Id: cfhead.m4,v 8.76.4.15 2001/02/14 04:07:20 gshapiro Exp')
diff -r 26111409454d -r 29d234c0c171 gnu/dist/sendmail/cf/m4/proto.m4
--- a/gnu/dist/sendmail/cf/m4/proto.m4  Fri Mar 09 17:49:45 2001 +0000
+++ b/gnu/dist/sendmail/cf/m4/proto.m4  Fri Mar 09 17:49:48 2001 +0000
@@ -13,7 +13,7 @@
 #
 divert(0)
 
-VERSIONID(`Id: proto.m4,v 8.446.2.5.2.12 2000/07/19 21:41:19 gshapiro Exp')
+VERSIONID(`Id: proto.m4,v 8.446.2.5.2.38 2000/12/28 03:37:28 ca Exp')
 
 MAILER(local)dnl
 
@@ -160,8 +160,11 @@
 # Resolve map (to check if a host exists in check_mail)
 Kresolve host -a<OK> -T<TEMP>')
 
+ifdef(`_FFR_5_', `# macro storage map
+Kmacro macro')
+
 ifdef(`confCR_FILE', `dnl
-# Hosts that will permit relaying ($=R)
+# Hosts for which relaying is permitted ($=R)
 FR`'confCR_FILE',
 `dnl')
 
@@ -314,7 +317,9 @@
 `errprint(WARNING: `confDAEMON_OPTIONS' is no longer valid.  See cf/README for more information.
 )'dnl
 `DAEMON_OPTIONS(`confDAEMON_OPTIONS')')
-ifelse(defn(`_DPO_'), `', `O DaemonPortOptions=Name=MTA', `_DPO_')
+ifelse(defn(`_DPO_'), `',
+`ifdef(`_NETINET6_', `O DaemonPortOptions=Name=MTA-IPv4, Family=inet
+O DaemonPortOptions=Name=MTA-IPv6, Family=inet6',`O DaemonPortOptions=Name=MTA')', `_DPO_')
 ifdef(`_NO_MSA_', `dnl', `O DaemonPortOptions=Port=587, Name=MSA, M=E')
 
 # SMTP client options
@@ -404,7 +409,7 @@
 _OPTION(MaxDaemonChildren, `confMAX_DAEMON_CHILDREN', `12')
 
 # maximum number of new connections per second
-_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', `3')
+_OPTION(ConnectionRateThrottle, `confCONNECTION_RATE_THROTTLE', `0')
 
 # work recipient factor
 _OPTION(RecipientFactor, `confWORK_RECIPIENT_FACTOR', `30000')
@@ -630,6 +635,7 @@
 R$* : $* <@>           $: $2                           strip colon if marked
 R$* <@>                        $: $1                           unmark
 R$* ;                     $1                           strip trailing semi
+R$* < $+ :; > $*       $@ $2 :; <@>                    catch <list:;>
 R$* < $* ; >              $1 < $2 >                    bogus bracketed semi
 
 # null input now results from list:; syntax
@@ -774,6 +780,9 @@
 R$* $| $* < @ $* > $*  $: $2 < @ $[ $3 $] > $4', `dnl')', `dnl
 dnl _NO_CANONIFY_ is not set: canonify unless:
 dnl {daemon_flags} contains CC (do not canonify)
+dnl but add a trailing dot to qualified hostnames so other rules will work
+dnl should we do this for every hostname: even unqualified?
+R$* CC $* $| $* < @ $+.$+ > $* $: $3 < @ $4.$5 . > $6
 R$* CC $* $| $*                        $: $3
 # pass to name server to make hostname canonical
 R$* $| $* < @ $* > $*          $: $2 < @ $[ $3 $] > $4')
@@ -801,6 +810,7 @@
 ##################################################
 Sfinal=4
 
+R$+ :; <@>             $@ $1 :                         handle <list:;>
 R$* <@>                        $@                              handle <> and list:;
 
 # strip trailing dot off possibly canonical name
@@ -857,26 +867,26 @@
 
 SParse0
 R<@>                   $@ <@>                  special case error msgs
-R$* : $* ; <@>         $#error $@ 5.1.3 $: "553 List:; syntax illegal for recipient addresses"
+R$* : $* ; <@>         $#error $@ 5.1.3 $: "501 List:; syntax illegal for recipient addresses"
 R@ <@ $* >             < @ $1 >                catch "@@host" bogosity
-R<@ $+>                        $#error $@ 5.1.3 $: "553 User address required"
+R<@ $+>                        $#error $@ 5.1.3 $: "501 User address required"
 R$*                    $: <> $1
 R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
-R<> $* <$* : $* > $*   $#error $@ 5.1.3 $: "553 Colon illegal in host name part"
+R<> $* <$* : $* > $*   $#error $@ 5.1.3 $: "501 Colon illegal in host name part"
 R<> $*                 $1
-R$* < @ . $* > $*      $#error $@ 5.1.2 $: "553 Invalid host name"
-R$* < @ $* .. $* > $*  $#error $@ 5.1.2 $: "553 Invalid host name"
+R$* < @ . $* > $*      $#error $@ 5.1.2 $: "501 Invalid host name"
+R$* < @ $* .. $* > $*  $#error $@ 5.1.2 $: "501 Invalid host name"
 dnl comma only allowed before @; this check is not complete
-R$* , $~O $*           $#error $@ 5.1.2 $: "553 Invalid route address"
+R$* , $~O $*           $#error $@ 5.1.2 $: "501 Invalid route address"
 
 # now delete the local info -- note $=O to find characters that cause forwarding
 R$* < @ > $*           $@ $>Parse0 $>canonify $1       user@ => user
 R< @ $=w . > : $*      $@ $>Parse0 $>canonify $2       @here:... -> ...
 R$- < @ $=w . >                $: $(dequote $1 $) < @ $2 . >   dequote "foo"@here
-R< @ $+ >              $#error $@ 5.1.3 $: "553 User address required"
+R< @ $+ >              $#error $@ 5.1.3 $: "501 User address required"
 R$* $=O $* < @ $=w . > $@ $>Parse0 $>canonify $1 $2 $3 ...@here -> ...
 R$-                    $: $(dequote $1 $) < @ *LOCAL* >        dequote "foo"
-R< @ *LOCAL* >         $#error $@ 5.1.3 $: "553 User address required"
+R< @ *LOCAL* >         $#error $@ 5.1.3 $: "501 User address required"
 R$* $=O $* < @ *LOCAL* >
                        $@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ...
 R$* < @ *LOCAL* >      $: $1
@@ -891,7 +901,6 @@
 R$+ < @ $={LDAPRoute} . >      $: $>LDAPExpand <$1 < @ $2 . >> <$1 @ $2>',
 `dnl')
 
-
 ifdef(`_MAILER_smtp_',
 `# handle numeric address spec
 dnl there is no check whether this is really an IP number
@@ -932,6 +941,8 @@
 # short circuit local delivery so forwarded email works
 ifdef(`_MAILER_usenet_', `dnl
 R$+ . USENET < @ $=w . >       $#usenet $@ usenet $: $1        handle usenet specially', `dnl')
+
+
 ifdef(`_STICKY_LOCAL_DOMAIN_',
 `R$+ < @ $=w . >               $: < $H > $1 < @ $2 . >         first try hub
 R< $+ > $+ < $+ >      $>MailerToTriple < $1 > $2 < $3 >       yep ....
@@ -1002,7 +1013,7 @@
 # deal with other remote names
 ifdef(`_MAILER_smtp_',
 `R$* < @$* > $*                $#_SMTP_ $@ $2 $: $1 < @ $2 > $3        user@host.domain',
-`R$* < @$* > $*                $#error $@ 5.1.2 $: "553 Unrecognized host name " $2')
+`R$* < @$* > $*                $#error $@ 5.1.2 $: "501 Unrecognized host name " $2')
 
 # handle locally delivered names
 R$=L                   $#_LOCAL_ $: @ $1               special local names
@@ -1018,31 +1029,44 @@
 R$+ $| $#$*            $#$2
 R$+ $| $*              $: $1
 
+ifdef(`_FFR_5_', `
+# Preserve host in a macro
+R$+                    $: $(macro {LocalAddrHost} $) $1
+R$+ @ $+               $: $(macro {LocalAddrHost} $@ @ $2 $) $1')
+
+ifdef(`_PRESERVE_LOCAL_PLUS_DETAIL_', `', `
 # deal with plussed users so aliases work nicely
-R$+ + *                        $#_LOCAL_ $@ $&h $: $1
-R$+ + $*               $#_LOCAL_ $@ + $2 $: $1 + *
-
+R$+ + *                        $#_LOCAL_ $@ $&h $: $1`'ifdef(`_FFR_5_', ` $&{LocalAddrHost}')
+R$+ + $*               $#_LOCAL_ $@ + $2 $: $1 + *`'ifdef(`_FFR_5_', ` $&{LocalAddrHost}')
+')
 # prepend an empty "forward host" on the front
 R$+                    $: <> $1
 
 ifdef(`LUSER_RELAY', `dnl
 # send unrecognized local users to a relay host
+ifdef(`_PRESERVE_LOCAL_PLUS_DETAIL_', `
+R< > $+ + $*           $: < ? $L > <+ $2> $(user $1 $) look up user+
+R< > $+                        $: < ? $L > < > $(user $1 $)    look up user
+R< ? $* > < $* > $+ <> $: < > $3 $2                    found; strip $L
+R< ? $* > < $* > $+    $: < $1 > $3 $2                 not found', `
 R< > $+                $: < $L > $(user $1 $)          look up user
-R< $* > $+ <>          $: < > $2                       found; strip $L',
+R< $* > $+ <>          $: < > $2                       found; strip $L')',
 `dnl')
 
 # see if we have a relay or a hub
 R< > $+                        $: < $H > $1                    try hub
 R< > $+                        $: < $R > $1                    try relay
+ifdef(`_PRESERVE_LOCAL_PLUS_DETAIL_', `
+R< > $+                        $@ $1', `
 R< > $+                        $: < > < $1 <> $&h >            nope, restore +detail
 R< > < $+ <> + $* >    $: < > < $1 + $2 >              check whether +detail
 R< > < $+ <> $* >      $: < > < $1 >                   else discard
 R< > < $+ + $* > $*       < > < $1 > + $2 $3           find the user part
-R< > < $+ > + $*       $#_LOCAL_ $@ $2 $: @ $1         strip the extra +
+R< > < $+ > + $*       $#_LOCAL_ $@ $2 $: @ $1`'ifdef(`_FFR_5_', ` $&{LocalAddrHost}')         strip the extra +
 R< > < $+ >            $@ $1                           no +detail
 R$+                    $: $1 <> $&h                    add +detail back in
 R$+ <> + $*            $: $1 + $2                      check whether +detail
-R$+ <> $*              $: $1                           else discard
+R$+ <> $*              $: $1                           else discard')
 R< local : $* > $*     $: $>MailerToTriple < local : $1 > $2   no host extension
 R< error : $* > $*     $: $>MailerToTriple < error : $1 > $2   no host extension
 R< $- : $+ > $+                $: $>MailerToTriple < $1 : $2 > $3 < @ $2 >
@@ -1267,6 +1291,7 @@
 dnl lookup IP address (no check is done whether it is an IP number!)
 R<?> <[$+.$-]> <$+> <$*> <$*>  $@ $>LookUpDomain <[$1]> <$3> <$4> <$5>
 dnl lookup IPv6 address
+R<?> <[$+::$-]> <$+> <$*> <$*> $: $>LookUpDomain <[$1]> <$3> <$4> <$5>
 R<?> <[$+:$-]> <$+> <$*> <$*>  $: $>LookUpDomain <[$1]> <$3> <$4> <$5>
 dnl not found, but subdomain: try again
 R<?> <$+.$+> <$+> <$*> <$*>    $@ $>LookUpDomain <$2> <$3> <$4> <$5>
@@ -1296,6 +1321,7 @@
 dnl lookup without tag
 R<?> <$+> <$+> <$*> <+ $+>     $: < $(access $1 $: ? $) > <$1> <$2> <$3> <+ $4>
 dnl no match; IPv6: remove last part
+R<?> <$+::$-> <$+> <$*> <$*>   $@ $>LookUpAddress <$1> <$3> <$4> <$5>
 R<?> <$+:$-> <$+> <$*> <$*>    $@ $>LookUpAddress <$1> <$3> <$4> <$5>
 dnl no match; IPv4: remove last part
 R<?> <$+.$-> <$+> <$*> <$*>    $@ $>LookUpAddress <$1> <$3> <$4> <$5>
@@ -1401,17 +1427,22 @@
 R< $* > $*             $: $2
 
 ifdef(`_ACCESS_TABLE_', `dnl
+dnl workspace: {client_name} $| {client_addr}
 R$+ $| $+              $: $>LookUpDomain < $1 > <?> < $2 > <+Connect>
+dnl workspace: <result-of-lookup> <{client_addr}>
 R<?> <$+>              $: $>LookUpAddress < $1 > <?> < $1 > <+Connect> no: another lookup
+dnl workspace: <result-of-lookup> <{client_addr}>
 R<?> < $+ >            $: $1                                   found nothing
-R<$={Accept}> < $* >   $@ $1
+dnl workspace: <result-of-lookup> <{client_addr}>
+dnl or {client_addr}
+R<$={Accept}> < $* >   $@ $1                           return value of lookup
 R<REJECT> $*           $#error ifdef(`confREJECT_MSG', `$: "confREJECT_MSG"', `$@ 5.7.1 $: "550 Access denied"')
 R<DISCARD> $*          $#discard $: discard
 dnl error tag
-R<ERROR:$-.$-.$-:$+> $*                $#error $@ $1.$2.$3 $: $4
-R<ERROR:$+> $*         $#error $: $1
+R<ERROR:$-.$-.$-:$+> <$*>      $#error $@ $1.$2.$3 $: $4
+R<ERROR:$+> <$*>               $#error $: $1
 dnl generic error from access map
-R<$+> $*               $#error $: $1', `dnl')
+R<$+> <$*>             $#error $: $1', `dnl')
 
 ifdef(`_RBL_',`dnl
 # DNS based IP address spam list
@@ -1491,7 +1522,7 @@
 dnl    or:    <address>
 dnl    or:    <?> <address>    (thanks to u in ${daemon_flags})
 R<? $=w> $*            $: $2                   local client: ok
-R<? $+> <$+>           $#error $@ 5.5.4 $: "553 Real domain name required"
+R<? $+> <$+>           $#error $@ 5.5.4 $: "501 Real domain name required for sender address"
 dnl remove <?> (happens only if ${client_name} == "" or u in ${daemon_flags})
 R<?> $*                        $: $1')
 dnl workspace: address (or <address>)



Home | Main Index | Thread Index | Old Index