SpamAssassin Bayesian

Discussion in 'Server Operation' started by joel_griego, Apr 30, 2009.

  1. joel_griego

    joel_griego New Member

    Hi!

    Can someone teach me how to use bayesian filtering for spamassassin?
    Where for example i will put all spam email on a folder and then spamassassin will check that folder and then try to learn spam pattern? I dont know how to configure it on ubuntu. can you help me? thanks!

    Joel
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. joel_griego

    joel_griego New Member

    Good Morning Sir,

    Thank you very much for the information. I have some questions:

    . Train SpamAssassin
    SSH to your web server
    Change your directory to the mail folder location containing the HAM & SPAM folders you created earlier. For example:
    cd /home/<myusername>/mail/<mydomain>/<mymailbox>/

    Run the following commands on the HAM & SPAM files contained in this directory:
    sa-learn --siteconfigpath=/usr/share/spamassassin --showdots --mbox --spam SPAM
    sa-learn --siteconfigpath=/usr/share/spamassassin --showdots --mbox --ham HAM


    for example:
    my spam messages are in /home/user/Maildir/.spam and
    my ham messages are in /home/user/Maildir/.ham,

    my question is, where should i execute
    sa-learn --siteconfigpath=/usr/share/spamassassin --showdots --mbox --spam SPAM ?
    to /?
    or to /home/user/Maildir/?
    Im a bit confused on how the command knows the path of the folder where the spams and hams reside. Thanks!

    Joel
     
  4. falko

    falko Super Moderator Howtoforge Staff

    I'd use the full paths. I don't think the --mbox option wil work because you're using Maildir. Run
    Code:
    sa-learn --help
    to find out what option you have to use for Maildir.
     
  5. joel_griego

    joel_griego New Member

    Thank you sir!

    Joel
     

Share This Page