My mistake. Thanks for pointing this out. Dale Moore
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, April 16, 2013 2:32 PM To: [email protected] Subject: Re: [Mimedefang] How to count recipients in filter_recipient --- On Tue, 4/16/13, Dale Moore <[email protected]> wrote: > In this case, we merely main::delete_recipient($recipient_A); > then main::action_accept() for the rest of the recipients. > > You cant tempfail individual recipients once you peek at the message > and see that it is spam. By the time you see the message, you've already > accepted the recipients. > > Different mimedefang-milter processes might handle the same message. > One milter process could handle the relay while a different one handles > the sender. In fact, different processes could handle different recipients > of the same message. This makes persistent variables like $rcpt_count > difficult to implement. Look at how the Recipients array is defined during filter_recipient: "[A]fter calling read_commands_file within filter_recipient, the current recipient under consideration is in the final position of the array, at $Recipients[-1], while any previous (and accepted) recipients are at the beginning of the array, that is, in @Recipients[0 .. $#Recipients-1]." At the array lists only accepted recipients, one can easily reject or tempfail any future recipient that has a different spam policy than the first recipient (and only the first need be checked, since one checked for differences with the other elements as the array was built -- one recipient at a time). _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang _______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

