[Mimedefang] Validate users before scanning?
John Nemeth
jnemeth at victoria.tc.ca
Sat May 21 05:39:25 EDT 2005
On Oct 9, 7:56am, Jan Pieter Cornet wrote:
} On Tue, May 17, 2005 at 09:23:54AM -0400, Joseph Brennan wrote:
}
} > But after the DATA command, it calls the milter again, and we do
} > most of the Mimedefang work at that time.
} >
} > What I wish we knew at that point is how many recipients were tried and
} > not just how many were valid. But I think sendmail only stores the valid
} > ones, as it has already taken care of the invalid ones with 550 response.
} > Either in milter or sendmail, it would be useful to count bad addresses
} > and take some action on that.
}
} Hm, you can from within milter, but not in mimedefang, unfortunately.
} Sendmail has two macros available: ${nbadrcpts} and ${nrcpts}, that
} contain the values you are looking for. However, mimedefang currently
} has no way to extract these macro's before calling filter_begin.
Assuming, sendmail has the macro set at the appropriate time, you
can get it. I.e., my sendmail.mc has:
define(`confMILTER_MACROS_ENVFROM', confMILTER_MACROS_ENVFROM`, {msg_size}')
Then my mimedefang.conf has: MD_EXTRA="-a msg_size"
Finally, my filter has:
sub filter_sender ($$$$) {
my($sender, $ip, $hostname, $helo) = @_;
my ($outgoing, $authuser, $msgsize, $maxmsgsize);
read_commands_file();
$msgsize = $SendmailMacros{msg_size};
[...]
}-- End of excerpt from Jan Pieter Cornet
More information about the MIMEDefang
mailing list