[Mimedefang] Modifying Headers Before Milter Does
Steffen Kaiser
skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Tue Aug 7 03:26:23 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 6 Aug 2007, Roberto Ullfig wrote:
> ### new code
> if( $VirusName =~ /Sanesecurity/ )
> {
> md_syslog('info', "$MsgID: *** Inserting X-ClamAV: Virus $VirusName
> ***");
> push(@sahdrs, "X-ClamAV: Virus $VirusName\n");
> }
If the message already carries X-ClamAV, you'll end up having two or more.
> if the message is not eventually rejected. Interestingly, the header added
> here in spam_assassin_mail does not survive until the end of processing and
> action_add_header needs to be called. Why is that? Everything seems to be
> working the way we want it.
Well, why do you expect an in-memory array survive? The call to
SpamAssassin is just informative, it cannot mangle the mail directly. This
is the documented (and wanted) design of Mimedefang.
action_add_header() reports the header change via Milter and unless you
have changed the message or actively called action_rebuild(), no
modification of a locally cached file is propagated to sendmail.
Also, when modifying the headers for SpamAssassin, any changes (add,
replace, delete) need to be done manually, incl. all parsing. I guess,
MIMEDefang simply tried to avoid this.
> P.S. How do you reply to this mailman list?
By activating the "Reply"-functionality???
Bye,
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBRrgeo+gJIbZtwg6XAQLCtwgAq+P1GU2LnU4HbbtE6tqipVjPNgN09sSl
armraQQndVpM4ZFRhxbUm62s2FAUGCXdiH5r5Z+ZEQsbF4+XRBOBVTCnq9Yc4Tfb
ob7ew+MfwmaloMVvh0KLIyfmN71f3t9/8Zy3JrTumauEfc/uR0Hb/82A66Q+Y6Uc
2xZX5cBnZzkPMCYKaZeRjqdrLHZmL6yfxAFfzGMRmgYBU80ruiFusTKrgX7G+ElM
BEmzMUcerCFpsLofvdGRgmWbNwY7Cu/4QYfGwEuPe3VBwWRywCS9fi8pbxZUB6g9
xVOVdKRfK3xkXgh3i/T6mp+pSav9pwRXE/e1jAzfE0lDxIl22SnvbQ==
=40w+
-----END PGP SIGNATURE-----
More information about the MIMEDefang
mailing list