diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-17 17:31:42 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-09-17 17:31:42 +0000 |
commit | e883408a0913641ec2d452de3978a47db5f4c85e (patch) | |
tree | 32d45bdda26765a93ea86ef564a3ec12a3fa0416 /gnu/usr.sbin/sendmail/contrib | |
parent | dcd8a09464d293189795148dba784b422795dd9f (diff) |
Update to sendmail-8.12.10. This includes a fix for a buffer overflow
in address parsing. That fix (but not all of sendmail-8.12.10) has
been applied to OpenBSD 3.4 and the 3.2 and 3.2 -stable branches.
Diffstat (limited to 'gnu/usr.sbin/sendmail/contrib')
-rw-r--r-- | gnu/usr.sbin/sendmail/contrib/domainmap.m4 | 45 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/contrib/doublebounce.pl | 4 | ||||
-rw-r--r-- | gnu/usr.sbin/sendmail/contrib/expn.pl | 3 |
3 files changed, 34 insertions, 18 deletions
diff --git a/gnu/usr.sbin/sendmail/contrib/domainmap.m4 b/gnu/usr.sbin/sendmail/contrib/domainmap.m4 index 31d284ce73c..6d56e8406e3 100644 --- a/gnu/usr.sbin/sendmail/contrib/domainmap.m4 +++ b/gnu/usr.sbin/sendmail/contrib/domainmap.m4 @@ -46,7 +46,7 @@ divert(-1)changequote(<<, >>)<< in the sendmail source tree. For more information, please see the following URL: - http://www-wsg.cso.uiuc.edu/sendmail/patches/domainmap.html + http://www-dev.cites.uiuc.edu/sendmail/domainmap/ Feedback is welcome. @@ -58,7 +58,7 @@ divert(-1)changequote(<<, >>)<< ifdef(`_DOMAIN_MAP_',`',`dnl LOCAL_RULE_0 # do mapping for domains where applicable -R$* $=O $* <@ $={MappedDomain} .> $@ $>97 $1 $2 $3 Strip extraneous routing +R$* $=O $* <@ $={MappedDomain} .> $@ $>Recurse $1 $2 $3 Strip extraneous routing R$+ <@ $={MappedDomain} .> $>DomainMapLookup $1 <@ $2 .> domain mapping LOCAL_RULESETS @@ -69,22 +69,37 @@ LOCAL_RULESETS SDomainMapLookup R $=L <@ $=w .> $@ $1 <@ $2 .> weed out local users, in case # Cw contains a mapped domain -R $+ <@ $+ .> $1 <@ $2 > strip trailing dot -R $+ <@ $+ . $+ > $1 <@ $(dequote $2 "_" $3 $) > +R $+ <@ $+> $: $1 <@ $2 > <$&{addr_type}> check if sender +R $+ <@ $+> <e s> $#smtp $@ $2 $: $1 @ $2 do not process sender +ifdef(`DOMAINMAP_NO_REGEX',`dnl +R $+ <@ $+> <$*> $: $1 <@ $2> <$2> find domain +R $+ <$+> <$+ . $+> $1 <$2> < $(dequote $3 "_" $4 $) > # change "." to "_" -R $+ <@ $+ > $: $1 <@ $(dequote "domain_" $2 $) > +R $+ <$+> <$+ .> $: $1 <$2> < $(dequote "domain_" $3 $) > # prepend "domain_" -R $+ + $+ <@ $*> $1 <@ $3 > <+> $2 handle user+list syntax -R $+ <@ $* > $* $( $2 $1 $: <ERROR> $) $3 +dnl',`dnl +R $+ <@ $+> <$*> $: $1 <@ $2> <$2 :NOTDONE:> find domain +R $+ <$+> <$+ . :NOTDONE:> $1 <$2> < $(domainmap_regex $3 $: $3 $) > +# change "." and "-" to "_" +R $+ <$+> <$+> $: $1 <$2> < $(dequote "domain_" $3 $) > +# prepend "domain_" +dnl') +R $+ <$+> <$+> $: $1 <$2> <$3> $1 find user name +R $+ <$+> <$+> $+ + $* $: $1 <$2> <$3> $4 handle user+detail syntax +R $+ <$+> <$+> $+ $: $1 <$2> $( $3 $4 $: <ERROR> $) # do actual domain map lookup -R <ERROR> $* $#error $@ 5.1.1 $: "550 email address lookup in domain map failed" -R $* <TEMP> $* $#error $@ 4.3.0 $: "450 domain map temporarily unavailable" -R $+ @ $+ <+> $+ $1 + $3 @ $2 reset original user+list -R $+ <+> $* $1 paranoid check - remove <+> -R $+ @ $+ . $1 @ $2 strip trailing dot -R $+ @ $+ $@ $>97 $1 @ $2 recanonify -define(`_DOMAIN_MAP_',`1')') +R $+ <$+> <ERROR> $#error $@ 5.1.1 $: "550 email address lookup in domain map failed" +R $+ <@ $+> $* <TEMP> $* $#dsmtp $@ localhost $: $1 @ $2 +# queue it up for later delivery +R $+ + $* <$+> $+ @ $+ $: $1 + $2 <$3> $4 + $2 @ $5 +# reset original user+detail +R $+ <$+> $+ $@ $>Recurse $3 recanonify + +ifdef(`DOMAINMAP_NO_REGEX',`',`dnl +LOCAL_CONFIG +K domainmap_regex regex -a.:NOTDONE: -s1,2 -d_ (.*)[-\.]([^-\.]*)$ +')define(`_DOMAIN_MAP_',`1')') LOCAL_CONFIG C{MappedDomain} _ARG_ -K `domain_'translit(_ARG_, `.', `_') _ARG2_ -T<TEMP> +K `domain_'translit(_ARG_, `.-', `__') _ARG2_ -T<TEMP> diff --git a/gnu/usr.sbin/sendmail/contrib/doublebounce.pl b/gnu/usr.sbin/sendmail/contrib/doublebounce.pl index 12601d33479..dc26ab84f1a 100644 --- a/gnu/usr.sbin/sendmail/contrib/doublebounce.pl +++ b/gnu/usr.sbin/sendmail/contrib/doublebounce.pl @@ -36,7 +36,7 @@ use Socket; use Getopt::Std; -use POSIX; +use File::Temp; use Sys::Syslog qw(:DEFAULT setlogsock); use strict; use vars qw( $opt_d $tmpfile); @@ -125,7 +125,7 @@ sub main { # The bounced e-mail may be large, so we'd better not try to buffer # it in memory, get a temporary file. - $tmpfile = POSIX::tmpnam(); + $tmpfile = tmpnam(); if (!open(MSG, ">$tmpfile")) { syslog('err', "Unable to open temporary file $tmpfile"); diff --git a/gnu/usr.sbin/sendmail/contrib/expn.pl b/gnu/usr.sbin/sendmail/contrib/expn.pl index d67fb0f4e1d..85de08a7f41 100644 --- a/gnu/usr.sbin/sendmail/contrib/expn.pl +++ b/gnu/usr.sbin/sendmail/contrib/expn.pl @@ -8,6 +8,7 @@ use 5.001; use IO::Socket; +use Fcntl; # system requirements: # must have 'nslookup' and 'hostname' programs. @@ -999,7 +1000,7 @@ sub mxlookup } $0 = "$av0 - nslookup of $server"; - open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n"; + sysopen(T,"/tmp/expn$$",O_RDWR|O_CREAT|O_EXCL,0600) || die "open > /tmp/expn$$: $!\n"; print T "set querytype=MX\n"; print T "$server\n"; close(T); |