[Mimedefang] skip filtering if smtp auth even for local mail

Steffen Kaiser skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Wed Apr 16 07:02:51 EDT 2014


-----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-----



More information about the MIMEDefang mailing list