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

Brandon Hoppe bhoppe at ti.com
Fri Mar 24 16:31:40 GMT 2006



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?



More information about the MailScanner mailing list