Results 1 to 4 of 4
  1. #1

    SpamAssassin sa-learn


    We've been running Spamassassin for a while now and want to move into using its sa-learn feature for bayesian classification. One thing we'd like to do is setup a spam and ham email account that emails could be forwarded to. For example, spam that gets through could be forwarded to the spam email, and ham that's marked as spam could be forwarded as well. These emails would then be run through sa-learn via cron every day so it could become more accurate.

    The problem is that the only way I know of to preserve the original message so that spamassassin correctly processes the original email instead of the email with the forwarded information added is by having the original email be an attachment. We have our server setup to block email attachments because of the numerous amount of viruses sent in that manner.

    Does anyone have any recommendations for us to easily allow the creation of spam/ham accounts that spamassassin could learn from? What I've started doing is manually copying/pasting the raw message source from outlook into a blank file, uploading it, and running it through spamassassin, but there must be a better way.

    Jason Rodzik

  2. #2
    Join Date
    Jul 2002
    That depends on the type of the mailboxes you're using. If you're using Maildir-style boxes, you could just invoke sa-learn recursively on each account.

    As for regular mbox files, you could write a small script to extract each message in the file and pipe it into sa-learn.
    C#/C++/TCL/Python/PHP developer.
    mark at mark org il

  3. #3
    We're running WHM/Cpanel with Exim.

  4. #4
    Join Date
    Aug 2003
    Montreal, Quebec
    Well the way i'm doing it now is I have setup a new mailbox into my mail system, Since i'm using amavisd for the spam check, I was able to indicate my new account to not check spam/virus.
    I redirect all the not founded spam into this account and in the command line i'm doing
    sa-learn --spam --showdots *
    (Check the help screen for info on each params)
    This is for maildir setup

    For mailbox, you can check the sa-learn help, you can supply --mbox IIRC

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts