[Mimedefang] Filter Recipient Coding Help
Jeff Grossman
jeff at stikman.com
Fri Aug 19 12:05:36 EDT 2005
I need some help with some coding in filter recipient. I have the following
code in my filter recipient section:
my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host,
$rcpt_addr) = @_;
$recip2 = $recip;
$recip2 =~ tr/<>//d;
$recip2 = lc($recip2);
if ($recip2 eq 'test at turners.com' or
$recip2 eq 'test2 at turners.com') {
action_notify_administrator("Recipient: $recip2\nSender:
$sender
\nIP: $ip");
return ('REJECT', 'The intended recipient is not allowed to
rece
ive e-mail');
}
And, it is working perfectly. But, now I want a particular e-mail address
to be able to send to those e-mails I am blocking mail to. So, I did the
following:
my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer, $rcpt_host,
$rcpt_addr) = @_;
$recip2 = $recip;
$recip2 =~ tr/<>//d;
$recip2 = lc($recip2);
$sender2 = $sender;
$sender2 =~ tr/<>//d;
$sender2 = lc($sender2);
if ($recip2 eq 'test at turners.com' or
$recip2 eq 'test2 at turners.com' and
$sender2 ne 'test at aol.com') {
) {
action_notify_administrator("Recipient: $recip2\nSender:
$sender
\nIP: $ip");
return ('REJECT', 'The intended recipient is not allowed to
rece
ive e-mail');
}
But, it is still blocking mail from that aol.com account. There must be a
problem with my logic. And, I am sure it is something pretty easy. Any
help would be appreciated.
Thanks,
Jeff
More information about the MIMEDefang
mailing list