[Mimedefang] Unfilter single Recipient -
Kelson
kelson at speed.net
Mon Mar 7 13:53:04 EST 2005
Gerry Herrera wrote:
> I've setup a SPAM Filter mail gateway using Sendmail (8.13.1),
> MimeDefang (2.44), and SpamAssassin (2.63). I had a request from one
> user to "not filter" his mail. Since I'm using Sendmail on the mail
> gateway, would that be accomplished by using the "access" database
> feature in Sendmail? Add a line in that text file to tag his e-mail
> address as FRIEND. Therefore, this single recipient's e-mails would not
> be filtered and just pass through the mail gateway?
No, that just exempts them from DNSBL and similar checks. All mail will
go through the milter.
What you'll need to do is either
(a) Use filter_recipient to allow that recipient to bypass the rest of
MIMEDefang's checks. Drawbacks: messages sent to multiple recipients
including that user will bypass MD for *everyone* -- and you bypass both
spam and virus checks.
Or...
(b) Check @Recipients early in filter_begin and call stream_by_recipient
if that user shows up, then check again before each scan you want to
bypass. (Or if you want to bypass all checks for that user, just issue
a conditional return at the beginning of each filter section.) This way
you still filter for other recipients of the same message, and you can
also choose which scans to bypass. Drawbacks: you can no longer
reliably use action_bounce to issue an SMTP reject in these cases,
because the message is re-sent locally, and you need to make sure MD can
preserve the original relay info (see the man page for mimedefang-filter).
--
Kelson Vibber
SpeedGate Communications <www.speed.net>
More information about the MIMEDefang
mailing list