> From: "Richard Laager" <rlaa...@wiktel.com>
> So in your case, you would resent to u...@domain.org,
> delete_recipient(u...@domain.org), and then add the boilerplate.

It's a typo, I presume? In my example, u...@domain.com wants the boilerplate 
and u...@domain.org doesn't. So I guess you meant "resend to u...@domain.com, 
delete_recipient(u...@domain.org) and add boilerplate", right?

The man page says to call this function (resend_message) in either 
filter_begin() or filter_end(). The *boilerplate* functions can only be called 
in filter_end().
I haven't tried it yet but would it look something like this pseudo-code below?

sub filter_end() {
  @want_boilerplate = get_recipients_with_boilerplate_from(@Recipients);
  @dont_want_boilerplate = get_recipients_without_boilerplate_from(@Recipients);
  if (scalar(@dont_want_boilerplate) > 0 && resend_message(@want_boilerplate)) {
    foreach $recip (@dont_want_boilerplate) {
      delete_recipient($recip);
    }
    append_text_boilerplate();
    append_html_boilerplate();
  }
  [continue with other filtering code in this function...]

Sorry if I only have a vague idea of how the mimedefang filtering process works 
but I don't know if the new ORIGINAL message created by resend_message will 
also go through the filter_begin(), filter() and filter_end() functions again. 
That's because I have other filtering needs in those functions not just 
appending a boilerplate (such as virus scanning, etc). In other words, I need 
ALL messages to be processed via all filter*() functions and SOME messages sent 
to specific recipients should not have a boilerplate appended. So does the 
filtering process start over again with resend_message()?

Finally, I'm using Postfix 3.1.0 with mimedefang and it's working fine. 
However, I'm concerned that resend_message() might not work as expected since 
the man page only refers to Sendmail-specific flags.

Thanks,

Vieri

_______________________________________________
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@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to