[Mimedefang] How to count recipients in filter_recipient

Dale Moore Dale.moore at cs.cmu.edu
Tue Apr 16 15:17:36 EDT 2013


My mistake.  Thanks for pointing this out.

Dale Moore

-----Original Message-----
From: mimedefang-bounces at lists.roaringpenguin.com [mailto:mimedefang-bounces at lists.roaringpenguin.com] On Behalf Of kd6lvw at yahoo.com
Sent: Tuesday, April 16, 2013 2:32 PM
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] How to count recipients in filter_recipient

--- On Tue, 4/16/13, Dale Moore <Dale.moore at cs.cmu.edu> 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 MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang




More information about the MIMEDefang mailing list