Gentoo Archives: gentoo-user

From: Michael Sullivan <michael@××××××××××××.com>
To: gentoo-user <gentoo-user@l.g.o>
Subject: [gentoo-user] OT - spamassassin not rewriting subject headers
Date: Tue, 29 May 2007 23:21:29
Message-Id: 1180473771.11364.15.camel@camille.espersunited.com
1 I'm having a problem. I'm running spamassassin with exim:
2
3 baby ~ # emerge -pv exim spamassassin
4
5 These are the packages that would be merged, in order:
6
7 Calculating dependencies... done!
8 [ebuild R ] mail-mta/exim-4.67 USE="exiscan exiscan-acl ldap mysql
9 pam perl sasl ssl syslog tcpd -X -dnsdb -domainkeys -dovecot-sasl
10 -gnutls -ipv6 -lmtp -mailwrapper -mbox -mbx -nis -postgres -radius -spf
11 -sqlite -srs" 0 kB
12 [ebuild R ] mail-filter/spamassassin-3.1.8-r1 USE="berkdb doc mysql
13 ssl -ipv6 -ldap -postgres -qmail -sqlite -tools" 980 kB
14
15 and I've finally gotten spamassassin to add X-Spam headers to potential
16 spammish emails, but it's not rewriting the Subject header. Here's the
17 ACL from /etc/exim/exim.conf:
18
19 acl_check_data:
20
21 # Deny if the message contains a virus. Before enabling this check,
22 you
23 # must install a virus scanner and set the av_scanner option above.
24 #
25 # deny malware = *
26 # message = This message contains a virus ($malware_name).
27
28 # Add headers to a message if it is judged to be spam. Before enabling
29 this,
30 # you must install SpamAssassin. You may also need to set the
31 spamd_address
32 # option above.
33 #
34
35 warn spam = nobody
36 add_header = X-Spam_score: $spam_score\n\
37 X-Spam_score_int: $spam_score_int\n\
38 X-Spam_bar: $spam_bar\n\
39 X-Spam_report: $spam_report
40
41 # Accept the message.
42
43 accept
44
45
46 Here's my /etc/mail/spamassassin/local.cf:
47
48 baby ~ # cat /etc/mail/spamassassin/local.cf
49 # This is the right place to customize your installation of
50 SpamAssassin.
51 #
52 # See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
53 # tweaked.
54 #
55 # Only a small subset of options are listed below
56 #
57 ###########################################################################
58
59 # Add *****SPAM***** to the Subject header of spam e-mails
60 #
61 rewrite_header Subject *****SPAM*****
62
63
64 # Save spam messages as a message/rfc822 MIME attachment instead of
65 # modifying the original message (0: off, 2: use text/plain instead)
66 #
67 report_safe 0
68
69
70 # Set which networks or hosts are considered 'trusted' by your mail
71 # server (i.e. not spammers)
72 #
73 #trusted_networks 70.234.122.
74
75
76 # Set file-locking method (flock is not safe over NFS, but is faster)
77 #
78 lock_method flock
79
80
81 # Set the threshold at which a message is considered spam (default:
82 5.0)
83 #
84 required_score 5.0
85
86
87 # Use Bayesian classifier (default: 1)
88 #
89 use_bayes 1
90
91
92 # Bayesian classifier auto-learning (default: 1)
93 #
94 bayes_auto_learn 1
95
96
97 # Set headers which may provide inappropriate cues to the Bayesian
98 # classifier
99 #
100 # bayes_ignore_header X-Bogosity
101 # bayes_ignore_header X-Spam-Flag
102 # bayes_ignore_header X-Spam-Status
103 #
104 #
105 header CITIBANK Body =~ /Citi/
106 score -100
107
108 header YAHOOGROUPS Reply-To =~ /yahoogroups.com/
109 score -100
110
111 So why isn't it rewriting the Subject header?
112
113 --
114 gentoo-user@g.o mailing list