Spam filter loosing loads of mail

Discussion in 'Installation/Configuration' started by zetnsh, Apr 8, 2010.

  1. zetnsh

    zetnsh New Member

    Hi there,

    I've recently migrated an ISPConfig2 installation to a new server using the procedure at - you may have noticed the odd posting about it :)

    Everything's working great on the first server I migrated, except e-mail. Unless you turn Spam Filtering off for each user account, that account looses most if not all incoming mail. It just disappears into procmail never to be seen again!

    Anyone know where to start debugging this?

    Thanks in advance,

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you mix up the spamfilter with the mailfilter option. Please disable the "mailfilter" checkbox. mailfilter is a system that removes potential harmful content and should normally niot be used as it is possible that complete emails will be removed.
  3. zetnsh

    zetnsh New Member

    Thanks Till, but I don't think that's the case, particularly since the ISPConfig database was migrated as-is from the old server (apart from the isp-server table which was taken from a fresh test install on the system). This was all working fine on the old server...

    For each affected user MailScan is NOT ticked, Antivirus IS ticked, Spamfilter WAS ticked, but is now NOT ticked, which fixes the problem, except that I would actually like spam filtering :)

    I was wondering if it was a case of training SpamAssassin with Ham/Spam, but I don't remember having to do that in the past. What do you think? Happy to post any relevant configs as needed.

    Thanks again, Neil
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. zetnsh

    zetnsh New Member

    I've done the following:

    :~$ /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin -V
    SpamAssassin version 3.2.5
      running on Perl version 5.10.0
    But I don't think the version of spam assassin actually changed, particularly since the ISPConfig was only downloaded a week or two ago.

    Can you think of any log files I could check in which will show SpamAssassin's scoring? Can't see anything obvious...


  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please do the update procedure that is described on faqforge.
  7. zetnsh

    zetnsh New Member

    Sorry, I should have clarified I have done that procedure, I ran this:

    I checked the spam assassin version before and after and nothing seemed to have changed... I couldn't find any spam assassin rule files with changed modification dates, but of course I may have been looking in the wrong place, I was expecting to see changed files in /home/admispconfig/ispconfig/tools/spamassassin/etc/mail/spamassassin as well...

    Thanks, Neil
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok, as this does not update the spamassasin version, it updates the ruleset.
  9. peterj

    peterj New Member

    You might check your spamassassin.rc file and verity that tagged mail is not being sent to /dev/null
  10. zetnsh

    zetnsh New Member

    Sorry for the delay in replying to this thread, and thank you both for your comments. The sa-update script seems to have done the trick, the server in question is now processing mail as it should.

    Do you reckon it's worth running this automatically from cron, as it doesn't seem to be set up in root's crontab by ISPConfig?

    Thanks, Neil
  11. zetnsh

    zetnsh New Member

    Oh and Peter, it does look like tagged mail is being sent to /dev/null, but I suspect that's standard with ISPConfig 2 if you've set it to reject rather than deliver spam...

    For the record, here's a sample .spamassassin.rc file from one of the users, as set up by ISPConfig presumably:

    # SpamAssassin sample procmailrc
    # Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
    # if you use the spamc/spamd combination)
    # The condition line ensures that only messages smaller than 250 kB
    # (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
    # isn't bigger than a few k and working with big messages can bring
    # SpamAssassin to its knees.
    * < 256000
    | /home/admispconfig/ispconfig/tools/spamassassin/usr/bin/spamassassin --prefs-file=/var/www/web8/user/web8_pete/.user_prefs
    # Mails with a score of 15 or higher are almost certainly spam (with 0.05%
    # false positives according to rules/STATISTICS.txt). Let's put them in a
    # different mbox. (This one is optional.)
    #* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
    # All mail tagged as spam (eg. with a score higher than the set threshold)
    # is moved to "/dev/null".
    * ^X-Spam-Status: Yes
    # Work around procmail bug: any output on stderr will cause the "F" in "From"
    # to be dropped.  This will re-add it.
    * ^^rom[ ]
      LOG="*** Dropped F off From_ header! Fixing up. "
      :0 fhw
      | sed -e '1s/^/F/'

Share This Page