diff options
author | jmb <jmb@FreeBSD.org> | 1997-10-06 00:09:17 +0000 |
---|---|---|
committer | jmb <jmb@FreeBSD.org> | 1997-10-06 00:09:17 +0000 |
commit | fd0c3e573362b165370b9745d874c7960cc2996f (patch) | |
tree | 2333bda56d299deb10adeb0f07ba0d140a43a521 | |
parent | a7fe67864a691010324c1eeacd7577f7939928ff (diff) | |
download | FreeBSD-src-fd0c3e573362b165370b9745d874c7960cc2996f.zip FreeBSD-src-fd0c3e573362b165370b9745d874c7960cc2996f.tar.gz |
record the envelope-from address in the received headers
for all mail received at hub.freebsd.org
Obtained from: Peter Wemm <peter@freebsd.org>
-rw-r--r-- | usr.sbin/sendmail/cf/cf/hub.mc | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/usr.sbin/sendmail/cf/cf/hub.mc b/usr.sbin/sendmail/cf/cf/hub.mc index 535fe4f..0ba62f1 100644 --- a/usr.sbin/sendmail/cf/cf/hub.mc +++ b/usr.sbin/sendmail/cf/cf/hub.mc @@ -39,7 +39,8 @@ divert(-1) # divert(0)dnl -VERSIONID(`$Id: hub.mc,v 1.1 1997/08/14 14:42:06 peter Exp $') +include(../m4/cf.m4) +VERSIONID(`$Id: hub.mc,v 1.1.4.3 1997/09/28 12:37:50 peter Exp $') OSTYPE(bsd4.4)dnl DOMAIN(generic)dnl @@ -70,9 +71,11 @@ define(`confTO_HOSTSTATUS', `30m')dnl define(`confMIN_QUEUE_AGE', `30m')dnl define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl define(`confTRUSTED_USERS', `majordom')dnl -define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_)$. - by $j ($v/$Z)$?r with $r$. id $i$?u$|;$. - $?ufor $u; $.$b')dnl +define(`confRECEIVED_HEADER', `$?sfrom $s $.$?_($?s$|from $.$_) + $.by $j ($v/$Z)$?r with $r$. id $i$?u + for $u; $|; + $.$b$?g + (envelope-from $g)$.')dnl$|;$. define(`confHOST_STATUS_DIRECTORY', `.hoststat')dnl define(`confMAX_DAEMON_CHILDREN', `8')dnl define(`confCONNECTION_THROTTLE_RATE', `1')dnl @@ -80,3 +83,42 @@ define(`confFORWARD_PATH', `/var/forward/$u')dnl LOCAL_CONFIG Cw localhost freefall.freebsd.org + +Kdenyip hash -o -a.REJECT /etc/mail/denyip.db +Kspamsites hash -o -a.REJECT /etc/mail/spamsites.db + +Scheck_relay +# called with host.tld and IP address of connecting host. +# ip address must NOT be in the "denyip" database +R$* $| [$+ $1 $| $2 should not be needed +R$* $| $+] $1 $| $2 same (bat 2nd ed p510) +R$* $| $* $: $1 $| $(denyip $2 $) +R$* $| $*.REJECT $#error $: 521 blocked. contact postmaster@FreeBSD.ORG ($2) +# host must *not* be in the "spamsites" database +R$+.$+.$+ $| $* $2.$3 $| $4 +R$+.$+ $| $* $: $(spamsites $1.$2 $) $| $3 +R$*.REJECT $| $* $#error $: 521 blocked. contact postmaster@FreeBSD.ORG ($1) +# Host must be resolvable +#R$* $| $* $: <?> <$1 $| $2> $>3 foo@$1 +#R<?> <$*> $*<@$*.> $: $1 +#R<?> <$*> $*<@$*> $#error $: 451 Domain does not resolve ($1) + +# spamsites database optional--fail safe, deliver the mail. +Scheck_mail +# called with envelope sender, "Mail From: xxx", of SMTP conversation +# +# can't force DNS, Poul-Henning Kamp and others dont resolve +# <root@dgbmsu1.s2.dgb.tfs>... Domain does not resolve +# +R$* $: <?> $>3 $1 +R<?> $* < @ $+ . > $: $2 +# R<?> $* < @ $+ > $#error $: "451 Domain does not resolve" +R<?> $* < @ $+ > $: $2 +R$+.$+.$+ $2.$3 +R$* $: $(spamsites $1 $: OK $) +ROK $@ OK +R$+.REJECT $#error $: 521 $1 + +Sxlat # for sendmail -bt +R$* $$| $* $: $1 $| $2 +R$* $| $* $@ $>check_relay $1 $| $2 |