Keep X-Spam-... header lines when releasing message from quarantine?

Dominic Raferd dominic at
Thu Mar 30 07:46:35 CEST 2017

On 30 March 2017 at 05:09, Rich Wales <richw at> wrote:

> From examining the amavisd-new code, it appears the relevant portion is at
> line 11554:
> *11554*       } elsif (!$reporting && /^(?:X-Spam|X-CRM114)-.+:/si) {
> *11555*         # skip header fields inserted by us
> *11556*       } else {
> This is amavisd-new-2.10.1 (20141025).
> So it doesn't look like changing *$sa_tag_level_deflt*, or any other
> user-tunable value, is going to do what I want.
> I suppose I could try commenting out lines 11554 and 11555 if I really,
> really want the X-Spam lines to be retained when releasing a message from
> quarantine.  Any other ideas?

​Could you just pick up the spam file(s) from /var/lib/amavis/virusmails
(or wherever you have amavisd-new set to store them) and re-inject them
into postfix via the port used by amavisd-new? Often this is
This would avoid them being picked up again by amavisd-new so they should
be sent on to their original destination with all headers intact.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amavis-users mailing list