SpamSnake SpamAssassin Scoring Stops

Discussion in 'HOWTO-Related Questions' started by ruadog, Mar 27, 2010.

  1. ruadog

    ruadog New Member

    I have been running the fantastic SpamSnake on Ubuntu 8.04 (http://www.howtoforge.com/the-perfect-spamsnake-ubuntu-8.04) for about a year and a half now with no problems.

    Recently, I tweaked a lot of settings in an attempt to fix a long-standing problem with releasing messages from quarantine. I fixed that problem, but somewhere in there I caused a problem with the SpamAssassin scoring.

    Every day around midnight, messages stop receiving a SA score, so nothing is marked as spam. Looking in MalWatch at the spam report for each message, it shows "Disabled due to 20 consecutive timeouts". If I reboot the SpamSnake everything starts working and messages are scored properly until midnight when the problem starts all over again.

    I am assuming it has something to do with the db_clean.php script, since I see that in the cron it is set to run every night around midnight.

    Code:
    58 23 * * * /usr/bin/db_clean.php &> /dev/null
    The only modification I made to the script was to change the path to functions.php.

    Any ideas how to solve this? I know just enough Linux to be dangerous so I probably messed up something very simple.

    Thanks.
    Peter
     
  2. ruadog

    ruadog New Member

    I discovered it's not the db_clean.php script. It stopped scoring last night at midnight. This morning I changed the cron to run db_clean.php at 8:00 AM and rebooted the machine. Checking it after 8 it was still scoring the messages appropriately and not timing out.

    There must be some other task that is running at midnight that is causing this.

    If it makes any difference, I discovered that Bind is not running. However, I have no idea if it was running or not before this problem started.

    Any help would be appreciated.
    Thanks.
     
    Last edited: Mar 28, 2010
  3. ruadog

    ruadog New Member

    I discovered the source of the problem. It's the sa-learn script that runs at 1:30 every morning.
    Code:
    30 01 * * * /path/to/sa-learn --force-expire --sync -p /etc/MailScanner/spam.assassin.prefs.conf
    I was a real Linux newbie when I originally built the Spamsnake and I entered the line into my cron just as you see it, not realizing that I needed to change "/path/to/sa-learn" to the actual path. I changed it to
    Code:
    30 01 * * * /usr/bin/sa-learn --force-expire --sync -p /etc/MailScanner/spam.assassin.prefs.conf
    Now if I run that sa-learn script manually, it creates the Spamassassin scoring problem. The script itself has now been running for more than 15 minutes and is still running.

    Any help would be appreciated.
    Thanks.
     
  4. ruadog

    ruadog New Member

    SpamSnake SpamAssassin Scoring Stops - SOLVED

    I think I finally figured out what was happening.
    Since I hadn't set up the sa-learn script properly when I originally built the Spamsnake, I hadn't actually run a force-expire or sync in about 18 months. When I fixed the script so it would actually run, there were hundreds of thousands of tokens to sync and it was just too many for the system to handle, causing it to timeout.

    I ended up running a --clean on the db and starting over. After doing that, sa-learn would actually finish and messages continue to be scored.
     

Share This Page