[Mimedefang] Boilerplate on outgoing mail ... with multiple servers

Ed Holden eholden at mclean.harvard.edu
Fri Apr 18 13:19:01 EDT 2003


Hi.  I've just implemented MIMEDefang 2.31 to satisfy my company's lawyers
by adding a boilerplate disclaimer to all outgoing mail.  (Yes, I hate the
plan, but I like MIMEDefang.)

The filter should add the boilerplate to our outgoing mail ... in theory.
The problem is that the boilerplate is *also* added to mail sent between
local users.  And to add another wrench to the gears: we have three mail
servers on our network.  Any of those servers counts as a "local" host, so
the boilerplate gets appended twice to messages sent between servers - once
as it leaves a MIMEDefang-enabled server, and once on its way *into* the
next server (under the assumption that the message is coming from a local
user, when it's actually coming from another server).  So I'd like to find a
way to avoid adding the boilerplate when (a) the message is intended for a
local user, and (b) when it is intended for a user on another local server.

The boilerplate works using the following text in mimedefang-filter:
_____________________________________________________________
 sub filter_end ($) {
    my($entity) = @_;

    return if message_rejected();

    my($textboilerplate) = "\nBoilerplate";
    my($htmlboilerplate) = "\n<p><small>Boilerplate</small>";

    if ($RelayAddr =~ "^10\.0\.") {
      append_text_boilerplate($entity,$textboilerplate, "0");
      append_html_boilerplate($entity,$htmlboilerplate, "0");
    }
 }
_____________________________________________________________

As you can see our local IPs are all 10.0.0.0/16.  Our Perl guru wasn't able
to puzzle it out (though he did get me interested in learning Perl).  Can
anyone help modify this filter?

Regards,
Ed



Any information, including protected health information (PHI), transmitted in this email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential and or exempt from disclosure under applicable Federal or State law. Any review, retransmission, dissemination or other use of or taking of any action in reliance upon, protected health information (PHI) by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the material from any computer.


More information about the MIMEDefang mailing list