Have been running MD using example filter for awhile. First time trying to add some code. I would like to move David's greylist code from filter_recipient to filter_begin. Searched list archive, read and reread man page. This is what I came up with:

sub filter_begin () {
    my $sender = canonicalize_email ($Sender);
    my $ip =  $RelayAddr;

foreach $recip (@Recipients) {
if (should_greylist($sender, $recip)) {
md_syslog('warning', "Filter Recipient:$sender:$recip");
#delete_recipient($recip);
return action_tempfail("Tempfailed as anti-spam measure. Please try again.");
delete_recipient($recip);
}
}


.....


It works when there is one recipient and broke when there are more -- tempfailed all recipients. I have 2 questions:


1. Does action_tempfail affects all recipients?

2. Is delete_recipient needed? If not, wouldn't tempfailed recipient receive a copy of the message?

or maybe my logic does not flow at all ?

Thanks.
Xiaoyan

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to