[Mimedefang] Boilerplate text

Ryan Hardy rhardy at lodging.com
Fri May 9 10:07:01 EDT 2003


> Unfortunately this still adds the boilerplate for e-mail between local
> users, but it doesn't add it for incoming mail.  If anyone knows how to
> prevent its inclusion on local mail, please let me know.  My users will be
> thrilled.

It's really just a matter of making decisions on who should get the
boilerplate in what situations, when dealing with the "internal boilerplate"
issue.

For my implementation, I just decided that any message that was from an
internal address and contained ONLY recipients with internal addresses, then
I would drop the boilerplate.  If there is even one external address,
however, the boilerplate gets appended.  This keeps the lawyers happy, but
keeps the impact on local users to a minimum.

I imagine that you could also use stream_by_recipient() to individually
analyze each address once it got re-sent, but the server I implemented this
on is fairly high-traffic, and I was trying to avoid things which could
potentially increase the load without providing functionality to justify it.

Slightly edited example of my solution follows:

--CODE--
# If the $Sender and ALL @Recipients are internal (domain.com),
# don't append the boilerplate -- RNH/040503
$internal = 1;
foreach $recip (@Recipients) {
    $internal = 0 if (!($recip =~ m/\@[A-Za-z0-9\-\_]*\.?domain\.com/));
}
$SenderNoBoilerplate = 1 if ($internal && $Sender =~
m/\@[A-Za-z0-9\-\_]*\.?domain\.com/);

    append_text_boilerplate($entity,$boilerplate,0) if ($Sender =~
m/\@[A-Za-z0-9\-\_]*\.?domain\.com/ && !$SenderNoBoilerplate);
--/CODE--

Also, I added a small handy rule for myself so that I could include a string
in the subject, and the filter would not include the boilerplate.  This is a
little easier than specifically excluding certain addresses from getting it,
but keeps the legal spam out of places it shouldn't be :)

--
Ryan N. Hardy
Unix Systems Administrator



More information about the MIMEDefang mailing list