[Mimedefang] test md_check_against_smtp_server

Fox, Randy Randy_Fox at csgsystems.com
Thu Feb 20 10:16:01 EST 2003


Before I fully implement a filter_recipient filter using the md_check_against_smtp_server test, I wanted to run a dedicated log to see the magnitude of the issue.  However, when I write the filter this way, it returns a 554 code instead of a 250 code.  If I don't try to capture the result of md_check_against_smtp_server and simply return the results (as the example in the man page does), everything works fine.  Can anyone see a flaw in my logic.

Thanks,
Randy

sub filter_recipient {
        my($recip, $sender, $ip, $host, $first, $helo) = @_;
        if ($recip =~ /\@csgsys/) {
                my($rec_chk) = md_check_against_smtp_server($sender, $recip,
                        "$host", "internal-mailhub.csgsystems.com");
                open (rec_log, ">>/tmp/rec_log");
                print rec_log "$sender, $recip, $rec_chk\n";
                close (rec_log);
                return ('continue', "250");
        } else {
                return ('continue', "250");
        }
}




More information about the MIMEDefang mailing list