From fd0c3e573362b165370b9745d874c7960cc2996f Mon Sep 17 00:00:00 2001 From: jmb Date: Mon, 6 Oct 1997 00:09:17 +0000 Subject: record the envelope-from address in the received headers for all mail received at hub.freebsd.org Obtained from: Peter Wemm --- usr.sbin/sendmail/cf/cf/hub.mc | 50 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'usr.sbin/sendmail') 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 +# ... 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 -- cgit v1.1