[Mimedefang] SendmailMacros, greylisting and filter_recipient

David F. Skoll dfs at roaringpenguin.com
Sat Nov 8 21:01:57 EST 2003

On Sat, 8 Nov 2003, Michael Faurot wrote:

> Having run into the situation of how to exempt SMTP authenticated
> users previously, with respect to SpamAssassin, I added some logic
> to use $SendmailMacros{'auth_authen'} to the filter_recipients()
> function.  After some research[2] through the list archives, I
> discovered this won't work because SendmailMacros aren't available
> within filter_recipient().

This is not quite true.  By the time filter_recipient() is called, the
macros are written to the COMMANDS file, described in the
mimedefang-protocol(7) man page.

If you really need to, you can open ./COMMANDS from within filter_recipient
and parse it for a line beginning with:


to find out if the user is authenticated.  See the mimedefang.pl code for
details on how to parse the COMMANDS file.

> Any chance of that changing that?  Obviously it's most efficient to do
> the greylisting within filter_recipient() so as to avoid bringing in
> the whole message body.

It is, but we've had to offer both options in our commercial CanIt
product.  Some buggy MTAs (Novell Groupwise, for one) bounce a
message if every RCPT command is tempfailed.  This is clearly incorrect
behavior, but it is common enough that we've had to offer the workaround
of doing greylisting after DATA.



More information about the MIMEDefang mailing list