Vladimir,
> I'm using postfix + amavisd-new-2.4.2 + spamassassin.
> Is there any chance to completely disable the insertion of the
> "X-Spam-Status" header field with all the scores, tests, etc. even if the
> message is considered spam? I only need the "X-Spam-Flag" header field
> set to YES without all the other spam-related headers.
This is possible with the most recent 2.4.3 (rc2 is out,
final release hopefully tomorrow). With earlier versions
you'd need to hack the code.
>From RELEASE_NOTES:
- a new hash variable %allowed_added_header_fields (also member of policy
banks) is consulted for each header field insertion, and if the result is
false the header field is not inserted into passed mail. Can be used to
suppress inserting header fields such as X-Virus-Scanned, X-Spam-Report,
X-Spam-Level, X-Amavis-PenPals, X-Amavis-OS-Fingerprint, X-Amavis-Modified,
Received, etc. Only applies to passed mail, not to mail that is being
written into a quarantine or to a copy submitted to SA for checking.
Keys (header field heads) must be in lowercase.
Example use - disables insertion of certain header fields:
$allowed_added_header_fields{lc('X-Amavis-OS-Fingerprint')} = 0;
$allowed_added_header_fields{lc('X-Amavis-PenPals')} = 0;
$allowed_added_header_fields{lc('X-Spam-Report')} = 0;
$allowed_added_header_fields{lc('X-Virus-Scanned')} = 0;
Note that turning off 'X-Spam-Report' through %allowed_added_header_fields
is equivalent to having $sa_spam_report_header at false, turning off
'Received' is equivalent to having $insert_received_line at false, and the
last line in the above example is equivalent to setting $X_HEADER_TAG to
undef or $X_HEADER_LINE to undef. For compatibility the $X_HEADER_TAG is
treated somewhat specially: if explicitly set to a nonstandard value, it is
implicitly added to the %allowed_added_header_fields in the base policy
bank. No automatism is provided for $X_HEADER_LINE in other policy banks.
Example use in a policy bank:
$policy_bank{'ALT'} = {
allowed_added_header_fields => {
lc('X-Amavis-PenPals') => 0, # turn it off
lc('X-Amavis-OS-Fingerprint') => 0, # turn it off
},
};
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/