[Mimedefang] Small syntax question
NFN Smith
worldoff9908 at sacbeemail.com
Mon Dec 11 14:29:43 EST 2006
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
More information about the MIMEDefang
mailing list