[Mimedefang] Disclaimer messages - no text part

Geoff Steer gsteer at firstwave.com.au
Fri Feb 27 08:14:43 EST 2004


I've been working on adding disclaimers to messages based on the
recipient domain. 
To do this, I'm using  a table lookup to get a message based on the
value of Domain as returned by stream_by_domain and using this in the
append_text_boilerplate in filter_end.
It all works as expected with the correct stamp being appended to the
end of the first text part of the message. Different recipients get the
correct stamp for their domain.

Where it all falls apart is if the mail message doesn't have a text
part.
I've tried to get around this by using action_add_part to add a
text/plain part with the disclaimer text in it e.g.

action_add_part($entity, "text/plain", "-suggest",
                                  "$disclaim",
                                  "", "inline",-2);

The text part gets inserted as expected as the first part of the message
but the $disclaim variable is not inserted. If I change the "$disclaim"
to a string of text, it does get inserted.

Can anyone suggest a way around this? The table that I do the domain to
text lookup is in the filter_end section if that is relevant. 

Regards
Geoff




More information about the MIMEDefang mailing list