Re: [AMaViS-user] Disable X-Spam-Status header field

This is a discussion on Re: [AMaViS-user] Disable X-Spam-Status header field within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Vladimir, > I'm using postfix + amavisd-new-2.4.2 + spamassassin. > Is there any chance to completely disable ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-28-2006
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Disable X-Spam-Status header field

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?p...rge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:05 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0