Jakub Wasielewski wrote:

sub filter_recipient {
        my ($recipient, $sender, $ip, $hostname, $first, $helo, $rcpt_mailer,
            $rcpt_host, $rcpt_addr) = @_;

        return('CONTINUE', "ok") if ($ip eq "127.0.0.1");

        read_commands_file();
        if ($ip eq '127.0.0.1') {
                return ('CONTINUE', "ok");
        } elsif ($recipient =~ /\...@example\.pl/i) {
                return ('CONTINUE', "ok");
        } elsif ($recipient =~ /\...@example2\.pl/i or $recipient =~
 /\...@example3\.pl/i or $recipient =~ /\...@example4\.pl/i or $recipient =~
 /\...@example5\.pl/i or $recipient =~ /\...@example6\.pl/i) {
                my ($result, $msg) = md_check_against_smtp_server($sender,
 $recipient, "smtp1.example.pl", "smtp2.example.pl");
                md_syslog('info', "Recipient check: $result - $msg");
                return ($result, $msg);

        }

        return ('CONTINUE', "ok");
}

The second check for 127.0.0.1 is redundant.  Also, you are only
validating recipients in some domains, not all domains.

You've sanitized your filter.  We can't help if you do that.  We need
to see an un-edited version of filter_sender complete with the actual
email addresses that are causing DSNs.  Changing real domains to "exampleN"
means you're hiding useful information.

Regards,

David.
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to