[Mimedefang] md_check_against_smtp_server and md_graphdefang_log

James Curtis jameswcurtis at hotmail.com
Tue Mar 26 20:43:39 EDT 2013


So I'm still trying to get md_check_against_smtp_server working with md_graphdefang_log.
=
I made the modification to /etc/sysconfig/mimedefang (still not sure why this is referred to as 'running with the -t option')
MX_RECIPIENT_CHECK=yes
=
I made the following additions to /etc/mail/mimedefang-filter (after filter_begin subrouting completes, before filter)
-------------Code----------------
sub filter_recipient
{
     my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
    return md_check_against_smtp_server($sender, $recip, "localhost", "192.168.1.10");
}
------------Code-----------------

I now get the following response before the data phase that rejects the user!
550 5.1.1 test at testdomain.com... User unknown 
-
Yea!  It's working

I am trying to get a log entry for all emails that are getting rejected because managers like metrics.....

I tried changing the code as suggested below:
--------------Code-------------
sub filter_recipient
{
my ($retval, $code, $dsn, $text) = md_check_against_smtp_server($sender, $recip, "localhost", "192.168.1.10");
#      if ($retval eq "Reject") {
#       md_graphdefang_log('notauser', $recip, $sender);
#       return action_discard
#}
#else{
#       md_graphdefang_log('valid', $retval, $code);
#       }
}
-------------Code--------------
Having tried with the remarked statement and having it fail, I remarked it back to just ther ecommended line and it still fails all email address', whether valid or not valid with this response:
501 5.5.4 Invalid Address

Thaks for all the info, the pros and cons.  Most of them I knew, I'll probably be looking for info on how to get MIMEDefang to work with SPF later.  
-Bill 		 	   		  


More information about the MIMEDefang mailing list