[Mimedefang] md_check_against_smtp_server

Robert Covell rcovell at rolet.com
Thu Nov 20 09:17:37 EST 2003


I am trying to use md_check_against_smtp_server.  The filter chooses what
mail server to check based the global $Domain variable.

Two things:
1) $Domain does not seem to be available from within filter_recipient but is
available from other functions.  How can I make this see from here?

2) When I check against mail2.domain.com everything is accepted (i.e. even
bad addresses).  When I check against mail1.domain.com it SEEMS that things
are not accepted (i.e. it is working fine).  On mail2.domain.com I am using
sendmail 8.11.5(patched) + cyrus 1.5.24 and on mail1.domain.com I am using
8.12.10 + cyrus 2.1.15.  Could the older sendmail version be causing the
problem?  Does it not return the proper information for the
md_check_against_smtp_server function?  Or am I not using it correctly?

Here is my function:

sub filter_recipient {
    my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host,
$rcpt_addr) = @_;
    if ((lc $Domain) eq "domain1.com") {
       return md_check_against_smtp_server($sender, $recip,
"spam1.domain.com","mail2.domain.com");
    } elsif ((lc $Domain) eq "domain2.com") {
       return md_check_against_smtp_server($sender, $recip,
"spam1.domain.com","mail2.domain.com");
    } else {
       return md_check_against_smtp_server($sender, $recip,
"spam1.domain.com","mail1.domain.com");
    }
}

Thanks,
-Bob



More information about the MIMEDefang mailing list