--On Thursday, May 19, 2005 9:49 -0400 Joseph Brennan <[EMAIL PROTECTED]> wrote:
Sendmail has two macros available: ${nbadrcpts} and ${nrcpts}, that contain the values you are looking for. However, mimedefang currently has no way to extract these macro's before calling filter_begin.
New in sendmail 8.13! I missed this addition. I suppose this could be used in local_check_rcpt too. I have to look at this. Thanks!
This works, but with qualifications:
SLocal_check_rcpt
R$* $: $1 $| $&{nbadrcpts}
R$* $| 2 $#error $@ 5.7.1 $: "550 Too many bad recipients"
The catch is that the count is necessarily one behind.
Send to 1st bad recipient: nbadrcpts = 0 so far, so OK Send to 2nd bad recipient: nbadrcpts = 1 so far, so OK Send to any 3rd recipient: nbadrcpts = 2 so far, so reject
So the reject could happen on a valid recipient. Still this might be useful in stopping dictionary attacks.
The number 2 seems too small.
In a milter, we could more easily write conditions around this rule.
Joseph Brennan Academic Technologies Group, Academic Information Systems (AcIS) Columbia University in the City of New York
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

