Other examples to use check_* in sendmail 8.8
Last Update 1999-11-24
Examples from Gregory Neil Shapiro
From: Gregory Neil Shapiro <gshapiro@wpi.edu>
Newsgroups: comp.mail.sendmail
Subject: Re: sendmail 8.8 and the new check_* rulesets
Date: 28 Sep 1996 10:13:11 -0400
Message-ID: <x4ranmhgnc.fsf@scooter.WPI.EDU>
bortzmeyer> (By curiosity, does anyone have used these rulesets in real world
bortzmeyer> and can provide examples? I just tried very rough setups.)
On our mail server, we block sending mail to accounts like nobody, ftp,
etc. and also block mail from junk mailers:
# Usernames that don't belong to a user and should be bounced
F{BounceNames} /shared/stations/etc/sendmail.nobody
# Junk mail sources
F{JunkMail} /shared/stations/etc/sendmail.junkmail
Scheck_rcpt
# Bounce fake usernames
R$* $: $>3 $1
R$={BounceNames} $#error $@ 5.2.1 $: Mailbox disabled for this username
R$={BounceNames} < @ $=w . > $* $#error $@ 5.2.1 $: Mailbox disabled for this username
Scheck_mail
# Bounce junk mail
R$* $: $>3 $1
R$* < @ $={JunkMail} . > $* $#error $@ 5.7.1 $: We don't accept junk mail
On our clients, we stop outside machines from using them as a relay:
# {MXhost} class contains MX hosts
C{MXhost} smtp bigboote
Scheck_relay
# Bounce non-WPI connections
R$* $| $* $: $>Check_MXhost $j $1 $| $2
R$* $| 130.215.$* $@
R$* $| 127.0.0.1 $@
R$* $#error $@ 5.7.1 $: This machine doesn't accept incoming mail.
SCheck_MXhost
R$={MXhost}.WPI.EDU $* $@ $1.WPI.EDU $| 127.0.0.1
R$*.WPI.EDU $* $@ $2
Subject: Re: check_* rulesets with m4 macros?
Date: 04 Oct 1996 17:57:44 -0400
Message-ID: <x4enjefl47.fsf@scooter.WPI.EDU>
jeffo> Is there a way to add the check_* rulesets to a cf file using the m4
jeffo> macros?
Here is what I do:
LOCAL_RULESETS
Scheck_rcpt
# Bounce fake usernames
R$* $: $>3 $1
R$={BounceNames} $#error $@ 5.2.1 $: Mailbox disabled for this username
R$={BounceNames} < @ $=w . > $* $#error $@ 5.2.1 $: Mailbox disabled for this username
Scheck_mail
# Bounce junk mail
R$* $: $>3 $1
R$* < @ $={JunkMail} . > $* $#error $@ 5.7.1 $: We don't accept junk mail
Subject: Re: Sendmail 8.8.0's check_mail
Date: 06 Oct 1996 10:12:47 -0400
Message-ID: <x44tk8fag0.fsf@scooter.WPI.EDU>
andrew> This blocks sending hosts. Is it possible to block specific senders
andrew> without blocking, say, the whole of aol.com?
Actually, I added this yesterday:
# Junk mail sources
F{JunkMail} /shared/stations/etc/sendmail.junkmail
Scheck_mail
# Bounce junk mail
R<$={JunkMail}> $#error $@ 5.7.1 $: We don't accept junk mail
R$* $: $>3 $1
R$* < @ $={JunkMail} . > $* $#error $@ 5.7.1 $: We don't accept junk mail
Where /shared/stations/etc/sendmail.junkmail contains:
mailer@aol.com
bigprofits.com
PhotoScan8.org
GiffyScan2.net
The first rule is used to block full addresses (mailer@aol.com) while the
third rule blocks anything from a domain.
[(links)]
[Hints]
[Avoiding UBE]
[cf/README]
[New]
Copyright ©
Claus Aßmann
Please send comments to:
<ca at sendmail.org>
Disclaimer: the information provided may be inaccurate or outdated
or incomplete.
Please
contact me
if you find an error.