How do I block a domain from the recieved portion of headers

Stephen Swaney steve.swaney at fsl.com
Fri Mar 24 17:30:24 GMT 2006


> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-
> bounces at lists.mailscanner.info] On Behalf Of Brandon Hoppe
> Sent: Friday, March 24, 2006 11:32 AM
> To: MailScanner discussion
> Subject: Re: How do I block a domain from the recieved portion of headers
> 
> 
> 
> Brandon Hoppe wrote:
> 
> >
> >> Look at adding bogus HELO checking to sendmail. Download:
> >>
> >> http://www.cs.niu.edu/~rickert/cf/hack/block_bad_helo.m4
> >>
> >> Install the contents as /usr/share/sendmail-cf/hack/block_bad_helo.m4
> >>
> >> Then add the line below line to the top of your sendmail.mc file
> >> right after
> >> the line "include(`/usr/share/sendmail-cf/m4/cf.m4')dnl":
> >>
> >> Here is the line to add:
> >>
> >> include(`/usr/share/sendmail-cf/hack/block_bad_helo.m4')dnl:
> >>
> >> The rebuild your sendmail.cf file:
> >>
> >>     m4 sendmail.mc > sendmail.cf
> >>
> >> Then restart MailScanner.
> >>
> > Ok, i've created the block_bad_helo.m4 file under
> > <install_path>/sendmail/cf/m4
> >
> > Now, in my sendmail.mc file, I didn't have the include line of cf.m4.
> > I'm on sendmail 8.13.3 currently. This is my current sendmail.mc file:
> >
> > divert(-1)
> > divert(0)dnl
> > VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
> > Exp $')
> > OSTYPE(solaris2)dnl
> > DOMAIN(generic)dnl
> > define(`confAUTH_OPTIONS', `A')dnl
> > define(`confAUTH_MECHANISMS',`LOGIN PLAIN')dnl
> > define(`SMART_HOST', `outgoing.verizon.net')
> > TRUST_AUTH_MECH(`LOGIN PLAIN')dnl
> > FEATURE(`virtusertable', `dbm /etc/mail/virtusertable')dnl
> > FEATURE(`authinfo', `dbm /etc/mail/authinfo')dnl
> > FEATURE(`masquerade_envelope')dnl
> > FEATURE(dnsbl)dnl
> > FEATURE(`dnsbl', `sbl.spamhaus.org', `Spam blocked see:
> > http://spamhaus.org/')dnl
> > FEATURE(`dnsbl', `bl.spamcop.net', `"Spam blocked see:
> > http://spamcop.net/bl.shtml?"$&{client_addr}')dnl
> > FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to
> > sending server misconfiguration"')dnl
> > MAILER(local)dnl
> > MAILER(smtp)dnl
> >
> >
> > Now, I wasn't sure where to put it so I added these two lines after
> > the divert(-1) line:
> >
> > include(`../m4/cf.m4')dnl
> > include(`../m4/block_bad_helo.m4')dnl
> >
> > and restarted sendmail. When I send an email to my account, I get a
> > return message that says:
> >
> >    (reason: 554 5.3.5 Infinite loop in ruleset Local_check_rcpt, rule 2)
> >
> >
> > Am I placing the include of the m4 files incorrectly?
> >
> >
> 
> Any ideas on what I did incorrectly on the above?
> 

here's where the line resides in my sendmail.mc file:

divert(-1)dnl
dnl #
dnl # This is the sendmail macro config file for m4. If you make changes to
dnl # /etc/mail/sendmail.mc, you will need to regenerate the
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package
is
dnl # installed and then performing a
dnl #
dnl #     make -C /etc/mail
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
include(`/usr/share/sendmail-cf/hack/block_bad_helo.m4')dnl
VERSIONID(`@(#)sendmail.mc        1.00 (Berkeley) 12/03/99')
OSTYPE(`linux')dnl
-----------snip---------------

Steve

Stephen Swaney
Fort Systems Ltd.
stephen.swaney at fsl.com
www.fsl.com



More information about the MailScanner mailing list