[Mimedefang] Rejecting Mails for More Than 3 Unknown Users

Joseph Brennan brennan at columbia.edu
Tue Mar 27 08:40:05 EDT 2007



--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?
>
>     I have thought about this in 2 ways,
>
>      1. In filter_recipient(), if there are already 3 unknown recipients,
> drop all the following recipients.


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

This says, after we have seen 3 bad recipients, we give 450 "Too many
bad recipients" to all remaining recipients.

Joseph Brennan
Lead Email Systems Engineer
Columbia University Information Technology




More information about the MIMEDefang mailing list