[Mimedefang] Validate users before scanning?
David F. Skoll
dfs at roaringpenguin.com
Sat May 14 21:08:48 EDT 2005
Jan Pieter Cornet wrote:
> (currently - if David is prepared to make MD jump three flaming hoops
> while doing limbo dancing, then that might change - see my other post on
> this subject.)
Here's an odious solution (untested):
sub filter_recipient {
my($recipient, $sender, $ip, $hostname, $firstRecip, $helo,
$rcpt_mailer, $rcpt_host, $rcpt_addr) = @_;
if ($sender ne '<mimedefang-recip-probe at mydomain.net>' or
$ip ne '127.0.0.1') {
my($val, $text, $code, $dsn) =
md_check_against_smtp_server('<mimedefang-recip-probe at mydomain.net>',
$recipient, $helo, '127.0.0.1');
if ($val ne 'CONTINUE') {
return ($val, $text, $code, $dsn);
}
}
# Do normal filter_recipient processing here.
}
If your local Sendmail would reject the recipient (for whatever
reason), then MIMEDefang is informed of it and the recipient doesn't
get added to @Recipients in filter_begin. It's odious because
Sendmail's recipient processing is invoked twice for each
recipient. :-( But at least it doesn't involve source code changes.
Regards,
David.
More information about the MIMEDefang
mailing list