Re: [Mimedefang] skip filtering if smtp auth even for local mail
Le 16/04/2014 13:02, Steffen Kaiser a écrit : md_syslog('warning', $RelayAddr . "/" . $SendmailMacros{"auth_authen"}) ok you helped me found the bug as the auth appear there, it seems that it was the comparison operator that was not a good perl one && ($SendmailMacros{"auth_authen"} != 'monitoringemail') instead of && ($SendmailMacros{"auth_authen"} ne 'monitoringemail') Thanks a lot for your help i was trying to figure out but was searching the wrong way ! Regards, Ghislain. ___ 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 MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] skip filtering if smtp auth even for local mail
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 16 Apr 2014, Ghislain wrote: i use a filter_sender clause to skip any filtering if the mail is sent by authentified users from smtp_auth ii mimedefang 2.69-1 e-mail filter program for sendmail ii sendmail 8.14.3-9.4 powerful, efficient, and scalable Mail Transport Agent sub filter_sender { read_commands_file(); if( (defined($SendmailMacros{"auth_authen"})) && ($SendmailMacros{"auth_authen"} != 'monitoringemail') ){ ^^ this should be ne instead of != md_syslog('warning',"smtp auth depuis $ip, $name, $sender, $MsgID"); return ('ACCEPT_AND_NO_MORE_FILTERING', "ok"); }elsif($RelayAddr eq "127.0.0.1") { md_syslog('warning', "local Email, $MsgID"); return ('ACCEPT_AND_NO_MORE_FILTERING', "ok"); }else{ md_syslog('warning',"pas de smtp auth depuis $ip, $name, $sender, $MsgID "); return('CONTINUE', "ok"); } } my issue is when a user connect with smtp auth on port 587 and send a mail to a local user ( someone from the same domain) then it get filtered and never trigger the defined($SendmailMacros{"auth_authen"})) part. Is there any solution to that ? It seems that smtp auth is simply ignored for local delivery even if the log show a successful smtp-auth for this connection. I don't believe this. To verify add a md_syslog('warning', $RelayAddr . "/" . $SendmailMacros{"auth_authen"}) before the if() statement. Or do you happen to have separate configurations for port 25 and 587? the filter_sender works for external recipient and skip all filtering but impossible to do it for this case. I want to skip filtering because spamassassin trigger a LOT of false positive rules when in this configuration (all RCPT and HELO rules). - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQEVAwUBU05jXJSHNCne69JnAQJTpAf8D5wn48Lmtg+coWvrWyYs+UwxPWHwJcu0 b7r2SAuMKfHLjJ/j42JVILvb6u9KAVBXjmqddCIYn2M9yUyvWltDtyLiSPVQ4qgX 2WJv/R1GqKQDNhxH8HEnSWiDcnxI0HY1onS4nLvf5ElG9QdNXWk4hdlnjeueYaxO 9OJfIezxqf4Zk8OnX6ggXd1QX4FQHoI1ro5sbsT7IhO5UX4GAMdDGfEKc8fQdNYo ED6XmxpyGmBqIE1WOuIhtoBJh4eFYjCLBUs7jQNRQfO0b5/OfEwPUGjEgmRxSckW OAZKObkiNRDetCz73CW/OWKsNif37iDLQI+pk+jXaJegSkCLbW5n2Q== =7E7F -END PGP SIGNATURE- ___ 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 MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
[Mimedefang] skip filtering if smtp auth even for local mail
Hi, i use a filter_sender clause to skip any filtering if the mail is sent by authentified users from smtp_auth ii mimedefang 2.69-1 e-mail filter program for sendmail ii sendmail 8.14.3-9.4 powerful, efficient, and scalable Mail Transport Agent sub filter_sender { read_commands_file(); if( (defined($SendmailMacros{"auth_authen"})) && ($SendmailMacros{"auth_authen"} != 'monitoringemail') ){ md_syslog('warning',"smtp auth depuis $ip, $name, $sender, $MsgID"); return ('ACCEPT_AND_NO_MORE_FILTERING', "ok"); }elsif($RelayAddr eq "127.0.0.1") { md_syslog('warning', "local Email, $MsgID"); return ('ACCEPT_AND_NO_MORE_FILTERING', "ok"); }else{ md_syslog('warning',"pas de smtp auth depuis $ip, $name, $sender, $MsgID "); return('CONTINUE', "ok"); } } my issue is when a user connect with smtp auth on port 587 and send a mail to a local user ( someone from the same domain) then it get filtered and never trigger the defined($SendmailMacros{"auth_authen"})) part. Is there any solution to that ? It seems that smtp auth is simply ignored for local delivery even if the log show a successful smtp-auth for this connection. the filter_sender works for external recipient and skip all filtering but impossible to do it for this case. I want to skip filtering because spamassassin trigger a LOT of false positive rules when in this configuration (all RCPT and HELO rules). best regards, Ghislain. ___ 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 MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang