[Mimedefang] Problem with backscatter

David F. Skoll dfs at roaringpenguin.com
Tue Mar 23 15:55:48 EDT 2010

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 "");

 	if ($ip eq '') {
 		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 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.



More information about the MIMEDefang mailing list