Date: Sun, 16 Nov 1997 00:10:14 +0000 From: Brian Somers <brian@awfulhak.org> To: freebsd-hackers@FreeBSD.org Subject: /etc/mail filters in 2.2.5 Message-ID: <199711160010.AAA22259@awfulhak.demon.co.uk>
next in thread | raw e-mail | index | archive | help
Hi. I'm no sendmail expert, so perhaps someone with more of a clue than I do can tell me if I've got a pilot error. I installed the /etc/mail stuff a few days ago, and added a few sites to domains.txt, specifically: BIGFOOT.DALTEK.NET^M #blocked. contact postmaster I did a ``make install'' and HUP'd sendmail and checked the log to see that it had restarted. Just to confirm things, grepping for ``bigfoot.daltek.net'' in spamsites.db says it's there, and grepping for ``spamsites.db'' in /etc/sendmail.cf gives: Kspamsites hash -o -a.REJECT /etc/mail/spamsites.db I just received this: Nov 15 23:50:50 gate sendmail[21528]: XAA21528: from=<associates@bigfoot.daltek. net>, size=1874, class=0, pri=31874, nrcpts=1, msgid=<199711152014.OAA26126@merc ury.gmds.com>, proto=SMTP, relay=punt-1a.mail.demon.net [194.217.242.134] Shouldn't this have been rejected ? I've enclosed my complete .mc if anyone's interested. The second bit was directly copied from the stuff in /etc/mail. Thanks for any suggestions. -- Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <bri@OpenBSD.org> <http://www.Awfulhak.org> Don't _EVER_ lose your sense of humour.... VERSIONID(`gate.mc version 1.2') OSTYPE(bsd4.4)dnl FEATURE(nouucp)dnl MAILER(local)dnl MAILER(smtp)dnl define(`confQUEUE_FACTOR',1)dnl Cwgate.lan.awfulhak.org Cwawfulhak.demon.co.uk Cwawfulhak.org define(`confTO_QUEUEWARN',3d)dnl define(`confFORWARD_PATH', `/var/forward/$u:$z/.forward')dnl MASQUERADE_AS(`awfulhak.org')dnl FEATURE(allmasquerade)dnl FEATURE(masquerade_envelope)dnl FEATURE(nocanonify)dnl FEATURE(nodns)dnl Dmawfulhak.demon.co.uk define(`confDOMAIN_NAME',`awfulhak.demon.co.uk')dnl define(`confDELIVERY_MODE', `d')dnl # database declarations Kdenyip hash -o -a.REJECT /etc/mail/denyip.db Kspamsites hash -o -a.REJECT /etc/mail/spamsites.db # called with host.tld and IP address of connecting host. # ip address must NOT be in the "denyip" database Scheck_relay 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, currently not used at hub.freebsd.org #R$* $| $* $: <?> <$1 $| $2> $>3 foo@$1 #R<?> <$*> $*<@$*.> $: $1 #R<?> <$*> $*<@$*> $#error $: 451 Domain does not resolve ($1) # called with envelope sender, "Mail From: xxx", of SMTP conversation # Scheck_mail 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 # for testing check_relay and check_mail # if we type "$|", sendmail will split this into two tokens "$" and "|" # this rule glues prevent sendmail from splitting "$|" # to use: /usr/sbin/sendmail -bt # host.domain.tld $| 111.222.333.444 Sxlat R$* $$| $* $: $1 $| $2 R$* $| $* $@ $>check_relay $1 $| $2
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711160010.AAA22259>