[Mimedefang] Filter by sender/recipient
Jim McCullars
jim at info.uah.edu
Thu Oct 14 09:54:29 EDT 2004
On Thu, 14 Oct 2004, Richard Whelan wrote:
> MD/SA checks. Considering the amount of mail that goes into the
> postmaster mailbox, allowing through a little spam, is relatively
> insignificant.
>
> Where is the best place to add a check, and does anyone have a simple
> example, as my perl is, well it's better to say it isn't.
This might be what you want:
sub filter_recipient {
my ($recipient, $sender, $ip, $hostname, $first, $helo,
$rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
if($recipient =~ /<?postmaster\@/i) {
return('ACCEPT_AND_NO_MORE_FILTERING', "ok")
}
return ('CONTINUE', "ok");
}
HTH...
Jim McCullars
University of Alabama in Huntsville
More information about the MIMEDefang
mailing list