[Mimedefang] Re: filter_relay() and the access map

Jeremy Mates jmates at sial.org
Thu Apr 3 15:21:01 EST 2003


* Bob Robichaud <support at compmore.net>
> I have a user who does not want her email passed through milter.  I know I
> can use access to bypass the DNSBL checks.
> Can you use access to skip filter_relay for a particular user?

Warning!  Beta notes follow!  Try at own risk and sanity!

One can abort milter processing, by having the milter filter return an
"accept and no more filtering" code.  Additionally, you can have
sendmail define macros via a custom ruleset.  Also, mimedefang can be
hacked to read in custom macros, and even moreso hacked to populate the
SendmailMacro hash early.

In other words, you can have a ruleset in sendmail set a custom macro,
and abort mimedefang filtering if that macro entry is present.  A better
solution that involves less hackery with mimedefang would be to write a
custom milter that gets called before mimedefang does, and returns the
"accept and no more filtering" if certain sendmail macros are set.
However, I have not had time yet to see whether such a milter exists or
to write it, failing that.

My current notes on this approach can be found at:

http://www.sial.org/sendmail/rulesets/#id2767236

In your case, you would need a custom sendmail ruleset that sets the
"md_tag" macro should the user be one that does not want filtering.

I have figured out how to set a macro with rulesets if the "verify"
macro is set (STARTTLS) or if the user authenticated (SMTP AUTH), but
have not yet figured out how to set md_tag should an "OK" or "RELAY"
entry exist for the connection in the access map.



More information about the MIMEDefang mailing list