[Exim] Solution to the legal disclaimer 'problem'

Inizio della pagina
Delete this message
Reply to this message
Autore: Laurence Whittle
Data:  
To: exim-users
Oggetto: [Exim] Solution to the legal disclaimer 'problem'
Hi

Please do not flame me for this! I think it might be useful for a small
number of people.

For years there has been a debate about the issue of adding a legal
disclaimer to outbound mails. Rather than solutions it usually ends up as a
debate about their worth (or lack of rather), their MIME breaking and their
digital signature ruining.

I have a quick solution for those using the amavis package. I think that
quite a lot of exim users have amavis so this is just about on topic ;)

1) Download and install amavis-perl (if not already done)
2) Download and install altermime (http://freshmeat.net/projects/altermime)
3) Create a disclaimer file (say /etc/disclaimer)
4) Make sure that the disclaimer is chowned to the amavis user
4) Edit /usr/sbin/amavisd
5) Make these changes

after these lines...

"...

# Handle empty sender address
$SENDER = "<>" if ($SENDER eq "");

# The same file also serves as input to the parser!
$fh->flush();
$fh->seek(0,0);
"

add "$fh->close;"

Then there should be these lines ...

"...

# Must be global

use vars qw($entity $output $errval);

"

add

"$_ = $SENDER;

if (/^*domain/) {
system("/usr/local/bin/altermime --input=$TEMPDIR/email.txt --htmltools --di
sclaimer=/etc/disclaimer"); }
$fh = IO::File->new("$TEMPDIR/email.txt") || do_exit($REGERR, __LINE__);
"

Replace 'domain' with your domain (without the .com or whatever). This will
stop the disclaimer being added to incoming mail. I don't know much about
perl, but I know that this works for me. It's a start for anybody that has
an anal boss that want's a Virus Scanning, Disclaimer adding MTA (Exim and
Amavis make a great package IMHO)

Laurence