anyway the whitelisting fucntion appears to be working now.
<snip>
oops, spoke too soon. Now I can't send any mail at all. The whitelisting
'appears' to be working (for incoming mail) but all mail outward bound is
reporting socket error. In etc/sysconfig/mimedefang I did MD_EXTRA="-t" and
this is a snippet of my current md-filter:
# Detect and load Perl modules
detect_and_load_perl_modules();
$IncomingWhitelist{'whitelisteddomain.com'} = 1;
$IncomingWhitelist{'[email protected]'} = 1;
sub filter_recipient {
my ($recipient, $sender, $ip, $hostname, $first, $helo, $rcpt_mailer,
$rcpt_host, $rcpt_addr) = @_;
my @senderparts = split(/@/, $sender);
my $senderdom = $senderparts[1];
$senderdom =~ s/[<>]//g;
if (
(exists $IncomingWhitelist{lc($sender)}) ||
(exists $IncomingWhitelist{lc($senderdom)}) ||
(exists $IncomingWhitelist{lc($recipient)}) )
{
return ('ACCEPT_AND_NO_MORE_FILTERING', "ok");
}
}
sub filter {
my($entity, $name, $ext, $type) = @_;
if ($type =~ /text.html/i) {
return action_bounce("HTML mail not allowed here, plain text
only.");
}
}
_______________________________________________
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