[Mimedefang] md_check_against_smtp_server

Tory Blue tmblue at responsys.com
Fri Jun 3 16:20:59 EDT 2005


md_check_against_smtp_server($sender, $rcpt_addr, $MyFilterHostName,
$rcpt_host);aid: $msg.

So I have started to use md_check and it's sort of working. It appears to be
checking the internal server and getting the right results, the problem,
large problem, is the system appears to be bouncing after the fact, vs
return action_bounce, where my front end server would tell the connecting
host, to go fly a kite,  not a valid user.

I don't want to accept and bounce, that is the point of this option, but
that's what it's doing. Or it's in fact not working correctly, however my
unix front ending a 2003 server, would not show user unknowns in the mail
log, that the exchange server would only know about if it was not doing the
checks.

So I have to believe that my unix host is making the call to the internal
server and getting the OK (it then sends) or user unknown and it starts it's
little bounce process, instead of rejecting during the smtp session.. 

What's going on? How Is this suppose to work, I need upon a "user unknown",
to action_bounce, not REJECT (which appears to be an accept and bounce and
that is unacceptable.

Any idea what I'm doing wrong, is there a way to change the behaviour?

Thanks

Tory

Using Larry Schumacher's example.

sub filter_initialize {

  require DB_File;
  use Fcntl;
  tie %relaydomains, "DB_File", "/etc/mail/mailertable.db", O_RDONLY;

}

sub filter_recipient {

  my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host,
$rcpt_addr) = @_;

  ($user,$domain) = split /\@/, $recip;

  if( $relaydomains{$domain} =~ /^smtp:\[(.+)\]/){
    return md_check_against_smtp_server($sender, $recip, "mymailhost", $1);
  } else {
    return ("CONTINUE", "OK");
  }

}



More information about the MIMEDefang mailing list