System (fresh installation): Debian 12,5, Postfix, Dovecot, Amavis
(Clamav, Spamassassin)
Hello,
when a send a test spam message to my server it recognizes it as spam
and puts it into /var/lib/amavis/virusmails as a gz file. In this file I
can find the complete X-Spam-Header, etc:
X-Envelope-To-Blocked:
X-Quarantine-ID: <jHlhUJlEgQJC>
X-Spam-Flag: YES
X-Spam-Score: 999.8
X-Spam-Level:
****************************************************************
X-Spam-Status: Yes, score=999.8 tag=2 tag2=6.31 kill=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, GTUBE=1000,
RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_PASS=-0.001,
SPF_PASS=-0.001,
URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001]
autolearn=no autolearn_force=no
But this header is missing in the passed mail. I use the standard
settings of amavis
in /etc/amavis/conf.d/20-debian_defaults
$final_virus_destiny = D_DISCARD; # (data not lost, see virus
quarantine)
$final_banned_destiny = D_DISCARD;
$final_spam_destiny = D_PASS;
$final_bad_header_destiny = D_PASS; # False-positive prone (for
spam)
I want to use a global sieve rule for the X-Spam-Flag = YES to get this
mail into the Junk-folder of the recipient.
Why is the header missing in the passed mail ($final_spam_destiny =
D_PASS) although it is saved with the header in the quarantine folder?