Justin Mason wrote:
> When using a milter, it'll scan the message only once, even if that
> message is being delivered to multiple recipients. The fix is to
> use a system that'll scan the message once for each individual
> recipient; we can't fix it inside SpamAssassin.
>
MIMEDefang is a milter that will do just this.
Feature is stream_by_recipient()
>From mimedefang-filter man pages:
stream_by_recipient()
Do not use this function unless you have Sendmail 8.12 and locally-
submitted e-mail is submitted using SMTP.
sub filter_begin {
if (stream_by_recipient()) {
return;
}
# Rest of filter_begin
}
If there is more than one recipient, stream_by_recipient() resends the
message once to each recipient. That way, you can customize your
filter rules on a per-recipient basis. This may increase the load on
your mail server considerably.
Also, a "recipient" is determined before alias expansion. So
"[EMAIL PROTECTED]" is considered a single recipient, even if Sendmail
delivers to a list.
If you have Sendmail 8.12, then locally-submitted messages are sent via
SMTP, and MIMEDefang will be called for each resent message.
It is possible to set up Sendmail 8.12 so locally-submitted messages
are delivered directly; in this case, stream_by_recipient() will \fInot\fR
work.
stream_by_recipient() allows you to customize your filter rules for
each recipient in a manner similar to stream_by_domain().