RE: [exim] Exiscan/spamassassin not rewriting subjects

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Andrew Johnson
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: RE: [exim] Exiscan/spamassassin not rewriting subjects
Then you need an system filter to migrate the we-written
subject - something like :-


if $header_X-Spam-Flag: contains "YES"
then
headers remove subject
headers add "Subject: $h_X-Exiscan-SA-New-Subject:"
headers remove X-Exiscan-SA-New-Subject endif

-Andy-

> -----Original Message-----
> From: Terry Miller [mailto:terry@millfam.org]
> Sent: 19 February 2006 21:12
> To: exim-users@???
> Subject: [exim] Exiscan/spamassassin not rewriting subjects
>
> I looked this up and can't see where I'm doing anything
> wrong, but the subject is not being rewritten.
>
> Some relevant data:
>
> /etc/mail/spamassassin/local.cf
>
> # How many hits before a message is considered spam.
> required_score 3.0
>
> # Change the subject of suspected spam
> rewrite_header Subject *****SPAM*****
>
> Changing the required score value shows up in the mail headers.
>
> /etc/sysconfig/spamassassin
>
> SPAMDOPTIONS="-d -m5 -H/var/spool/spamd "
>
>
>
> I elimininated the -c option because of the following errors.
>
>
> Feb 18 20:24:59 WBServer spamd[18388]: info: setuid to nobody
> succeeded Feb
> 18 20:24:59 WBServer spamd[18388]: Creating default_prefs
> [//.spamassassin/user_prefs] Feb 18 20:24:59 WBServer
> spamd[18388]: Cannot write to //.spamassassin/user_prefs: No
> such file or directory Feb 18
> 20:24:59 WBServer spamd[18388]: Couldn't create readable
> default_prefs for [//.spamassassin/user_prefs]
>
>
> I'm not sure whether this has anything to do with the problem
> or not. I don't see where the setuid to nobody comes from. I
> added the /var/spool/spamd after the -H option and made spamd
> & the .spamassassin subdirectory world writeable to see if
> this would eliminate the error but it didn't.
>
> From exiscan.conf
> acl_check_content:
>
>   # Reject virus infested messages.
> #  deny  message = This message contains malware ($malware_name)
> #        malware = *

>
> # Messages larger than 200k are accepted without spam
> scanning to reduce spamd load accept condition = ${if
> >{$message_size}{150k}{true}}
>
>   # Always add X-Spam-Score and X-Spam-Report headers, using 
> SA system- wide settings
>   # (user "nobody"), no matter if over threshold or not.
>   warn  message = X-Spam-Score: $spam_score ($spam_bar)
>         spam = sa:true
>   warn  message = X-Spam-Report: $spam_report
>         spam = sa:true

>
>   # Add X-Spam-Flag if spam is over system-wide threshold
>   warn message = X-Spam-Flag: YES
>        spam = sa

>
>   # Reject spam messages with score over 10, using an extra condition.
>   deny  message = This message scored $spam_score points. 
> Congratulations!
>         spam = sa:true
>         condition = ${if >{$spam_score_int}{100}{1}{0}}

>
> ##
> # Rewrite subject if email scored between 5 and 10.
> ##
>
> # For the subject tag, we prepare a new subject header in the 
> # ACL, then swap it with the original Subject in the system filter.
>         warn message =    X-Exiscan-SA-New-Subject: 
> ***SPAM***$h_subject

>         
>             condition = ${if >{$spam_score_int}{50}{1}{0}}

>
> # finally accept all the rest
> accept
>
>
> SpamAssassin version is 3.0.1, perl is 5.8.5, Exim is 4.4.3,
> exiscan patch is patch revision 28.
>
>
>
>