[Mimedefang] Rejecting Mails for More Than 3 Unknown Users

Ben Kamen bkamen at benjammin.net
Tue Mar 27 16:00:09 EDT 2007


imacat wrote:
> On Tue, 27 Mar 2007 08:40:05 -0400
> Joseph Brennan <brennan at columbia.edu> wrote:
>> --On Tuesday, March 27, 2007 13:10 +0800 imacat <imacat at mail.imacat.idv.tw> 
>> wrote:
>>> Dear all,
>>>     Hi.  This is imacat from Taiwan.  Is it possible to reject mails for
>>> more than 3 unknown users, to fight against dictionary attacks?
>> Put this in sendmail.mc and generate sendmail.cf.  Test it.
>> LOCAL_RULESETS
>> SLocal_check_rcpt
>> R$*                 $: $1 $| $( arith l $@ $&{nbadrcpts} $@ 3 $)
>> R$* $| FALSE        $#error $: 450 Too many bad recipients
> 
>     That's amazing.  I like clean and neat solutions that won't give
> too much possibility for bugs and exceptions.
> 
>     I shall give it a try.  Thank you very much for this.  (Though I'm
> still waiting for MIMEDefang to support SMFIP_RCPT_REJ.)

for more fun: 

Put this in your sendmail config in domain/.m4 file:

define(`confBAD_RCPT_THROTTLE',`2')dnl

this will slow 'em down too.




More information about the MIMEDefang mailing list