At 04:22 PM 2/2/2004 -0800, you wrote:
At 03:52 PM 2/2/2004, Xiaoyan Ma wrote:1. Does action_tempfail affects all recipients?
Yes.
How can I only tempfail 2 of 5 recipients then? Is stream_by_recipient the right approach or I can hold them in @tempfail, tempfail them at the end of filter_begin. If the second approach should work, do I need to delete_recipient them all so they won't receive the message since @Recipients is global?
Please bear with me if I am confused.
Thanks. Xiaoyan
2. Is delete_recipient needed? If not, wouldn't tempfailed recipient receive a copy of the message?
No, and no.
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);
}
}
Remember, any time you call return, it'll stop processing the subroutine. So in this case, it will *never* call delete_recipient, and it will only run up to the first recipient that triggers should_greylist().
Kelson Vibber SpeedGate Communications <www.speed.net>
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

