[Mimedefang] Disable filter on smtp-auth

Michiel Brandenburg apex at xepa.nl
Sun Jan 27 16:21:24 EST 2013


Hi Wesley,
 > Is there a way to disable this filter only for SMTP Auth ?
Sure there is, I use the following function

# Checks authentication
sub check_authenticated {

         load_sendmail_macros();
         if ( defined( $SendmailMacros ) &&
              defined( $SendmailMacros{auth_authen})) {
              return $SendmailMacros{auth_authen};
         }
         # check COMMANDS file for info, we use auth_authen
         # =auth_authen apex
         # =auth_ssf 0
         # =auth_type LOGIN
         # =auth_authen apex
         open( COMM, "<./COMMANDS" ) or return 0;
         while (<COMM>) {
                 if (/^=auth_authen/) {
                         close(COMM);
                         return 1;
                 }
         }
         close(COMM);
         return 0;
}

Make sure that sendmail passes along the macro auth_authen, think this 
is default not sure though.

then u can use something like this

// authenticated users are not scanned
if (!check_authenticated()) {
	check_spam();
}

 > Here's my mimedefang-filter :
<snip>

Have fun,
Michiel Brandenburg



More information about the MIMEDefang mailing list