[Mimedefang] conditionally add boilerplate in message with more than one recipient
Vieri Di Paola
vieridipaola at gmx.com
Wed Sep 21 10:09:34 EDT 2016
> Sent: Wednesday, September 21, 2016 at 2:44 PM
> From: "Richard Laager" <rlaager at wiktel.com>
> To: mimedefang at lists.roaringpenguin.com
> Subject: Re: [Mimedefang] conditionally add boilerplate in message with more than one recipient
> On 09/21/2016 07:16 AM, Vieri Di Paola wrote:
>> Suppose I have an email that's being sent To: user at domain.org, user at domain.com.
>> @Recipients will hold both addresses.
>> I'd like mimedefang to add a boilerplate only for the message being sent to user at domain.com.
>> Is that possible?
>> If so, how?
> You can stream_by_recipient() so MIMEDefang resends the message for each
> recipient. In this way, your filter code can handle recipients
> differently. Note the warnings in the mimedefang-filter man page, though.
The man page isn't too extensive on this. At a first glance it seems that calling stream_by_recipient in filter_begin does not trigger the code in filter_end, for instance. So if stream_by_recipient is true then only filter() is run?
> Alternatively, you can do all the work yourself, and only selectively
> resend when necessary. This is what I do (not for boilerplate insertion,
> but other things).
How do you do that?
Do you use resend_message()? (but that resends immediately the ORIGINAL message)
More information about the MIMEDefang