[Mimedefang] Disclaimer for selected target domains only
Patrick Morris
pmorris at wilshire.com
Fri Oct 24 09:46:43 EDT 2003
David Chang wrote:
> May anybody help..? We would like to know if MIMEDefang is able to
> process a email with a few outgoing email recipients separately. The
> situation is:
>
> a local user sent an email with three recipients: a at abc.com,
> b at abc.com and c at somewhere.com
>
> I want to add disclaimer to "c at somewhere.com" only while a at abc.com
> and b at abc.com should be receiving the same email without disclaimer. I
> know how to use simple perl filter scripting but I found no matter to
> "separate out" the content for target recipient.
Here's what I do at my site, where I don't want a cisclaimer on internal
mail, but do want it everywhere else.
sub filter_begin () {
if (stream_by_domain()) {
# More than one domain -- do nothing!
return;
}
[snippage]
sub filter_end ($) {
[more snippage]
# Add annoying disclaimer to outbound mail
if (lc ($Domain) eq "wilshire.com") {
# Local mail -- Leave alone
} else {
action_add_part($entity, "text/plain", "-suggest", $disclaimer,
"disclaimer.txt", "inline");
[final snippage]
More information about the MIMEDefang
mailing list