On 2004-05-12, 20:08:47 (+0200), Alexander Gretencord wrote:
> Is there a possibility to add a header depending on the outcome of virus
> scanning? For now anomy just adds a header for the virus scanner (or to be
> more precise f-prot's scan-mail.pl adds a X-Antivirus: scanned by... header.
> What I would like to be able to do is define what kind of header is added in
> response to the outcome of the virus scanning.
This can only be done after-the-fact, as Anomy scans the mail
from beginning to end - to add a header after it's done scanning
it would have to backtrack to the beginning of the message.
The sanitizer would pretty much have to be redesigned from
scratch to support this natively, since one of the core ideas of
the Sanitizer is to process the e-mail as a stream. :-)
However, if you're using procmail this sort of thing can easily be
done after the fact using a follow-up rule after the rule which
calls the sanitizer, using formail to insert the header. This
can be done either by using exit codes, or grepping the sanitizer
log. I'm going to send a seperate message to the mailing list in
a few minutes soliciting comments on a sample .procmailrc ruleset
which does just that, so please download it and test it if you're
Other environments can almost certainly achieve similar results,
but I'm less familiar with them.
> Is scan-mail.pl from fprot very differrent, I've not checked that yet? I'd
> probably want to patch that directly.
Scan-mail adds quite a few conveniant features which customers have
requested, such as quarantining messages. It's primary purpose
is to simplify plugging Anomy into various mail delivery systems.
It also boosts performance significantly when allowed to run as a
persistant process (daemonized), since then you get rid of all
the overhead of compiling the Sanitizer perl code for each message.
-- Bjarni Rúnar Einarsson email@example.com http://bre.klaki.net/
PGP: 02764305, B7A3AB89