[Mimedefang] Side effect of stream_by_recipient

David F. Skoll dfs at roaringpenguin.com
Tue Mar 9 08:28:29 EST 2004


On Tue, 9 Mar 2004, Jim Hatfield wrote:

> This might be obvious to many but it wasn't to me. If you
> use stream_by_recipient, the original mail is accepted. So if
> you subsequently call action_bounce, bounce mails get generated.

Right.  That's a limitation of SMTP.

> So my current take is, if SpamAssassin says it's spam, loop through
> the Recipients array, and use delete_recipient for each address
> in the "want it rejected" list.

That will work.

> Then what I want to do is to call action_bounce if there are no
> recipients left. But how can I do that if delete_recipient doesn't
> change the Recipients array?

You need to do your own book-keeping.  You could (for example) keep a
count of the original number of recipients and decrement it each time
you delete one.  If it goes down to zero, then bounce.

Regards,

David.



More information about the MIMEDefang mailing list