How to kill SpamAssassin

9 posts / 0 new
Last post
#1 Fri, 08/14/2015 - 16:44
groston

How to kill SpamAssassin

SpamAssassin is running despite being told not to All,

When I logged into the control panel today, I noticed that my disk usage was much higher than expected. I did some looking around and found the file:

/var/spool/mail/

This file is 1.6 GB is size.

I down loaded it to my computer and started poking around, and what surprised the heck out of me is that every message in the file is marked:

X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on X-Spam-Flag: YES

Why is this a surprise? Because after trying SpamAssassin for a couple of days, I turned it off. I checked Webmin->System->Bootup and Shutdown and SpamAssassin is clearly marked as No. But, it is still doing its thing - the file is growing continuously.

So, how can I kill this damnable program for once and for all?

Thanks for your help!

Fri, 08/14/2015 - 17:22
groston

Some more information:

Virtualmin->Edit Virtual Server->Enabled Features: SpamAssassin is not shown

I checked Virtualmin->System Settings->Features and Plugins: Spam filtering and virus filtering are both unchecked.

I looked for the processes:

ps uax | grep clam ps aux | grep spamd

Both returned nothing (but spam IS being filtered)

I checked Webmin->Servers->Procmail Mail Filter: Feed to program /usr/bin/spamassassin is unchecked, but /etc/procmailrc reads as follows:

DROPPRIVS=yes :0fw | /usr/bin/spamassassin :0 * ^X-Spam-Status: Yes $DEFAULT

This led me to check /var/log/procmail.log, in which I see numerous instances of:

Failed to open /etc/webmin/miniserv.conf : Permission denied at /etc/webmin/virtual-server/lookup-domain.pl line 9. procmail: Program failure (13) of "/etc/webmin/virtual-server/lookup-domain.pl"

Line 9 reads:

open(CONF, "/etc/webmin/miniserv.conf") ...

The file /etc/webmin/miniserv.conf does exist. It is owned by root and its permissions are 600.

I also spotted the following within etc/webmin/miniserv.conf:

virtual-server=virtual-server/feature-spam.pl

Sat, 08/15/2015 - 21:51
groston

I went nuclear on this problem:

yum remove spamassassin

This worked.

Sat, 08/15/2015 - 23:58
andreychek

Howdy,

If Spam filtering is not enabled in Edit Virtual Server -> Enabled Features, it definitely shouldn't be checking for spam in that domain.

Now, it might still check if the SpamAssassin daemon isn't running, it can do so using the command line.

But if the feature is disabled it shouldn't.

So that's all very odd!

I'm glad you were able to get it working.

If you reinstall SpamAssassin later, I'd be curious what the contents of your /etc/procmailrc are, as well as the output of "postconf -n".

But if things are working, no need to get all that :-)

-Eric

Sun, 08/16/2015 - 09:46
groston

Eric,

Thanks for the reply. Your comment, 'it can do so using the command line' was very enlightening - could not understand why SpamAssassin was running when everything seemed to suggest that it should not.

Here is the first few lines of /etc/procmailrc. (I had posted this earlier, but for some reason, this forum does not seem to honor lines breaks, so with the formatting screwed up, it was not at all apparent.)

[root@admin ~]# cat /etc/procmailrc

DROPPRIVS=yes
:0fw
| /usr/bin/spamassassin
:0
* ^X-Spam-Status: Yes
$DEFAULT
Mon, 08/17/2015 - 10:06
andreychek

Ah, I did notice that above now that you mention it, but it's missing a number of things that are normally in that file, and didn't stand out to me as being a procmailrc file :-)

How did you install Virtualmin, out of curiosity, was it using the install.sh script?

In that particular procmailrc, it appears to have some code manually added to it that is telling SpamAssassin to scan all incoming emails. You wouldn't actually want that, Virtualmin configures SpamAssassin to do so elsewhere.

The procmailrc file would normally look something like this:

LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl --exitcode 73 $LOGNAME
EXITCODE=$?
:0
* ?/usr/bin/test "$EXITCODE" = "73"
/dev/null
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
ORGMAIL=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
DROPPRIVS=yes
Mon, 08/17/2015 - 10:07
andreychek

Note that if you aren't using Maildir in $HOME for storing emails, you would need to change or remove the ORGMAIL and DEFAULT lines.

-Eric

Mon, 08/17/2015 - 10:22
groston

Eric,

I just showed the few lines that I thought mattered. Here is the file in its entirety:

DROPPRIVS=yes
:0fw
| /usr/bin/spamassassin
:0
* ^X-Spam-Status: Yes
$DEFAULT
LOGFILE=/var/log/procmail.log
TRAP=/etc/webmin/virtual-server/procmail-logger.pl
:0wi
VIRTUALMIN=|/etc/webmin/virtual-server/lookup-domain.pl $LOGNAME
EXITCODE=$?
:0
* ?/usr/bin/test "$EXITCODE" = "73"
/dev/null
EXITCODE=0
:0
* ?/usr/bin/test "$VIRTUALMIN" != ""
{
INCLUDERC=/etc/webmin/virtual-server/procmail/$VIRTUALMIN
}
DEFAULT=$HOME/Maildir/
ORGMAIL=$HOME/Maildir/
DROPPRIVS=yes
:0
$DEFAULT
Tue, 08/18/2015 - 09:30
andreychek

Aha! Then you'd actually simply want to comment out the lines you showed originally, and keep the rest of your procmailrc :-)

That is, comment out these lines, they shouldn't be in there:

DROPPRIVS=yes
:0fw
| /usr/bin/spamassassin
:0
* ^X-Spam-Status: Yes
$DEFAULT
Topic locked