View previous topic :: View next topic |
Author |
Message |
Rakefighter n00b
Joined: 10 Feb 2004 Posts: 9
|
Posted: Fri Jul 23, 2004 11:54 pm Post subject: spamassassin with qmail-scanner is ignoring local.cf |
|
|
Hello Folks,
I've got a new gentoo server that I've set up with qmail + qmail-scanner + spamassassin. The server is working great, but I seem to be having a problem with my spamassassin config. As far as I can tell, spamassassin is ignoring the settings in /etc/mail/spamassassin/local.cf. According to what I've read, the following config should rewrite the subjects of all incoming emails by inserting the phrase "[SPAM]" at the beginning:
Code: |
postman root # cat /etc/mail/spamassassin/local.cf
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# rewrite_subject 0
# report_safe 1
# trusted_networks 212.17.35.
report_safe 1
rewrite_subject 1
subject_tag [SPAM]
required_hits 5
skip_rbl_checks 1
|
Instead, the messages arrive unaltered. The messages do include the spamassassin headers, and if I change 'required_hits' that change is also reflected in the message headers. The 'rewrite_subject' entry seems to be ignored, however.
Can anybody give me some advice on this?
Thanks,
Rakefighter |
|
Back to top |
|
|
mr_daemon n00b
Joined: 03 May 2004 Posts: 20 Location: Quebec, Canada
|
Posted: Fri Jul 23, 2004 11:59 pm Post subject: |
|
|
This is normal, the rewrite subject parameter does not take effect for some reason. It can, however, be fixed by editing the qmail-scanner file. This is how things work in my setup, at least |
|
Back to top |
|
|
Rakefighter n00b
Joined: 10 Feb 2004 Posts: 9
|
Posted: Sat Jul 24, 2004 12:05 am Post subject: |
|
|
mr_daemon wrote: | This is normal, the rewrite subject parameter does not take effect for some reason. It can, however, be fixed by editing the qmail-scanner file. This is how things work in my setup, at least |
I've read about that fix and successfully applied it, but other functionality seems to be ignored, as well:
This should alter the message so that the user recieves a "spam report" with the original message attached to it, but this setting appears to be ignored, as well. Editing the qmail-scanner scanner file isn't really a long term solution, because spam filtering will break every time qmail-scanner is upgraded, not to mention the confusion that stems from spamassassin ignoring its own configuration files... |
|
Back to top |
|
|
madrobby n00b
Joined: 27 Jun 2003 Posts: 6
|
Posted: Sun Jul 25, 2004 7:42 pm Post subject: |
|
|
Rakefighter wrote: |
This should alter the message so that the user recieves a "spam report" with the original message attached to it, but this setting appears to be ignored, as well. Editing the qmail-scanner scanner file isn't really a long term solution, because spam filtering will break every time qmail-scanner is upgraded, not to mention the confusion that stems from spamassassin ignoring its own configuration files... |
UPDATE: Found a working solution...
The script /var/qmail/binqmail-scanner-queue.pl contains the following setting:
Code: | my $spamc_options=' -c -f'; |
Change this to:
Code: | my $spamc_options=' -f'; |
Now, SpamAssassin is not used to just check the mail, but the converted mail from SpamAssassin is taken. To see the available options for the local.cf File in /etc/mail/spamassassin, use:
Code: | # man Mail::SpamAssassin::Conf |
Note that I use the rules_du_jour script to update my custom rulesets regularily. Just google "rulesdujour" for this. Also note that the version of SpamAssassin in the current ebuild (2.63) doesn't support the "report_header" and the "ok_language" directives. You have to comment these out for the rulesdujour script to work correctly, or you'll get errors on "spamassassin --lint".
thomas |
|
Back to top |
|
|
Rakefighter n00b
Joined: 10 Feb 2004 Posts: 9
|
Posted: Tue Jul 27, 2004 1:11 am Post subject: |
|
|
So...what you're really saying is that the qmail-scanner package is broken. I looked into this and found a few bugs posted on bugs.gentoo.org, but the qmail-scanner mailtainer seems to be on an arrogant high-horse about qmail-scanner NOT being broken.
He seems to feel that it is acceptable behaviour for spamassassin to not only completely ignore it's own configuration file, but to be configured from the automatically generated, transient qmail-scanner perl script!
Thanks for the detailed information, but you still haven't addressed my original issue: What happens when qmail-scanner is upgraded?
I'll tell you what happens: Spam filtering breaks! |
|
Back to top |
|
|
AlienDaycare n00b
Joined: 01 Oct 2003 Posts: 8
|
Posted: Wed Sep 01, 2004 6:25 pm Post subject: |
|
|
From everything I've read, qmail-scanner under Gentoo gets installed with the default set to use --sa-alt which uses the alternate FAST_SPAMASSASSIN code. This code essentially ignores the very things you are mentioning.
My guess is that by removing the '-c' from the option set, you are disabling the alternate code and causing spamassassin to use the normal /etc/mail/spamassassin/local.cf things.
However: I don't know if it's because I've followed so many different guides on setting qmail up, but I also have a /var/qmail/.spamassassin directory which has a user_prefs which seem to take precedence over the /etc/mail... file.
At any rate, the perl qmail-scanner script is supposedly set up to *not* get clobbered by newer versions, but will instead show up in list of files to update using etc-update.
I'm beginning to see why some people refuse to use anything related to qmail from portage opting, rather, to compile from source.
PS. qmail-scanner 1.16 is NOT recent. As of this post, 1.23 is recent.
P.P.S. I use the sa-alt feature, and rewrite my subjects using the $sa-subject=':SPAM:' in my configuration of the perl qmail-scanner. I sure hope the folks that edit the ebuilds decide to make 1.23 stable soon....
- AlienDaycare
Successfully running qmail, qmail-scanner, clamav, spamassassin, bincimap, and squirrelmail, using stable builds. It's not pretty... |
|
Back to top |
|
|
mobiusproject Tux's lil' helper
Joined: 15 Jun 2003 Posts: 129
|
Posted: Sun Sep 19, 2004 6:09 am Post subject: |
|
|
What is your /etc/conf.d/spamd look like?
Mine is Code: | SPAMD_OPTS="-d -v -u vpopmail --siteconfigpath=/etc/mail/spamassassin/local.cf" | which works great for me.
I am trying to remember where I got this line from, but I do remember looking at spamassassin.apache.org to make sure that it is exactally what I need. The line from sabrex's howto's is really screwed up. |
|
Back to top |
|
|
Cuardin l33t
Joined: 06 Feb 2003 Posts: 713 Location: vasastaden.stockholm.se
|
Posted: Thu Mar 10, 2005 9:17 pm Post subject: |
|
|
OK, I have the same symptoms, but ina different setup.
I use fetchmail->procmail->spamassassin. Since I upgraded to the most current version about a week ago I get about half of my spam with rewritten subjects.
All spam gets detected and is rewritten to a report detailing the spammyness with the original email as an attachment. But the subjectline is not allways edited.
This is rather irritating, even if all I have to do is use procmail to filter on the XSpamStatus instead of on the subject line.
Any ideas? _________________ Part of "The adopt an unanswered post initiative" |
|
Back to top |
|
|
guitard00d Tux's lil' helper
Joined: 19 Dec 2003 Posts: 81 Location: Minatare, NE, USA, Earth
|
Posted: Mon Apr 11, 2005 8:14 am Post subject: |
|
|
Rakefighter wrote: | So...what you're really saying is that the qmail-scanner package is broken. I looked into this and found a few bugs posted on bugs.gentoo.org, but the qmail-scanner mailtainer seems to be on an arrogant high-horse about qmail-scanner NOT being broken.
He seems to feel that it is acceptable behaviour for spamassassin to not only completely ignore it's own configuration file, but to be configured from the automatically generated, transient qmail-scanner perl script! |
For what it's worth, I call spamc directly from my .mailfilter script (a'la maildrop) rather than calling spamassassin from within qmail-scanner because spamassassin is a serious resource hog. Anyway, I had to add --siteconfigpath=/etc/mail/spamassassin/local.cf to the end of my SPAMD_OPTS line in /etc/conf.d/spamd in order for it to honor all of my rules (including rewriting the subject line). So even though you might think the qmail-scanner maintainer is a bit high on himself, I have to say that the problem you're having with spamassassin isn't related to qmail-scanner. The entire spamassassin package for Gentoo appears to be broken and will not read its own default config files, you now have to explicitly declare the correct site-wide configuration file. _________________ I know you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant...
--Richard Nixon |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|