Watermark+Exim don't work together
Miguelanxo Otero Salgueiro
miguelanxo at telefonica.net
Mon Aug 11 16:33:04 IST 2008
Hello List!
In order to get rid of bounce-back SPAM, I've tried to configure
MailScanner to use watermarks, but
It just doesn't work. I've just started to do the debugging and asked in
the freenode #MailScanner channel
and someone suggested I post my findings here, so here I go...
Setup: MailScanner 4.70.7-1 + Exim 4.50 + ClamAV
As the first symptom is outbound email having no watermark header, I
will try to fix that first.
I just greped for "watermark" and found some code in
lib/MailScanner/Message.pm that deals with watermarking.
Line 340...
$global::MS->{mta}->AppendHeader($this, $mshmacheader,
"$expiry\@$hash");
...adds in fact the watermark header to a header set, but as I print
that set of headers just after
every call to that sub, I can see it gets removed somewhat after the
antivirus (ClamAV) is called
(I can see the debug messages of ClamAV intermixed).
I tried to find AppendHeader and looks like, as I'm using exim, it
should be the one defined in
lib/MailScanner/Exim.pm
In that file, line 699 I found this
$message->{metadata}{headers} = [];
just after something about MIME::Tools and the lack of proper heading
processing.
I just can say the Watermark header is wiped in that line, and not
reconstructed after.
Would be glad if someone just takes a pick on this.
Best regards,
Miguelanxo.
More information about the MailScanner
mailing list