I'm updating my MD configs to exempt submissions by trusted users from SpamAssassin scanning. By "trusted", I mean users that authenticated themselves with SMTP AUTH, and have submitted via the MSA daemon on ports other than 25.

I'm still novice enough at perl code that I don't quite have this working.

What I've done is to add code to sub filter_end, following the default exit, if the message has been rejected:

sub filter_end ($) {
    my($entity) = @_;

    # No sense doing any extra work
    return if message_rejected();

    # If the message has been submitted via the MSA daemon (that is,
    # an authenticated user, on ports 465 or 587), exempt
    # from SpamAssassin scanning.  If the message is submitted with
    # the MTA daemon on port 25, then scan.

md_graphdefang_log('=== macro check', $SendmailMacros{daemon_name});

    return if ($SendmailMacros{daemon_name}) = "MSA";


My log entries are showing that it's correctly telling which service has been used to submit the message, but my "return if" syntax isn't correct, and the result is that whether the daemon_name is "MTA" or "MSA", the return is being executed. In short, this is completely disabling all calls to SA.

What's the correct syntax to do what I'm doing?

TIA

Smith

_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to