sa-learn and different parh - SpamAssassin

This is a discussion on sa-learn and different parh - SpamAssassin ; Hi all, my SA version: 3.2.4 when launching this command, I noticed that the files are updated in two different folders. user: root foo:~# sa-learn --sync --spam --mbox /home/foo/spam.mbox /root/.spamassassin/bayes_seen /root/.spamassassin/bayes_toks /home/spamassassin/.spamassassin/auto-whitelist /home/spamassassin/.spamassassin/bayes_journal Why? I don't think it's the right ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: sa-learn and different parh

  1. sa-learn and different parh

    Hi all,

    my SA version: 3.2.4

    when launching this command, I noticed that the files are updated in
    two different folders.

    user: root
    foo:~# sa-learn --sync --spam --mbox /home/foo/spam.mbox

    /root/.spamassassin/bayes_seen
    /root/.spamassassin/bayes_toks

    /home/spamassassin/.spamassassin/auto-whitelist
    /home/spamassassin/.spamassassin/bayes_journal

    Why? I don't think it's the right way.

    My local.cf:

    rewrite_header Subject ****SPAM(_SCORE_)****
    report_safe 0
    required_score 4.0

    ## I've tried to uncomment and re-launch spamd but don't work
    #bayes_path /etc/mail/spamassassin/bayes
    #bayes_file_mode 0770

    use_bayes 1
    bayes_auto_learn 1
    bayes_auto_expire 0
    bayes_learn_to_journal 1
    bayes_journal_max_size 0

    --
    Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
    "It's easier to invent the future than to predict it." -- Alan Kay


  2. Re: sa-learn and different path

    Any hint?

    --
    Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
    "It's easier to invent the future than to predict it." -- Alan Kay


  3. Re: sa-learn and different parh

    Massimiliano Marini wrote:
    > Hi all,
    >
    > my SA version: 3.2.4
    >
    > when launching this command, I noticed that the files are updated in
    > two different folders.
    >
    > user: root
    > foo:~# sa-learn --sync --spam --mbox /home/foo/spam.mbox
    >
    > /root/.spamassassin/bayes_seen
    > /root/.spamassassin/bayes_toks
    >
    > /home/spamassassin/.spamassassin/auto-whitelist
    > /home/spamassassin/.spamassassin/bayes_journal
    >
    > Why? I don't think it's the right way.
    >

    Coincidence. The files in /home/spamassassin is being updated by
    incoming mail, the files in /root is being updated by sa-learn. The key
    here is sa-learn does *NOT* update the auto-whitelist file, so that
    indicates it must be happening via inbound mail.

    However, this does suggest you're running sa-learn as the wrong user.
    Generally speaking, if you're using spamd, root is the wrong user.
    sa-learn never scans mail while running as root, so it will never use a
    bayes DB in root's homedir.

    su yourself to the spamassassin user before performing sa-learn calls.


  4. Re: sa-learn and different parh

    Hi Matt,

    > su yourself to the spamassassin user before performing sa-learn calls.


    Thanks 1K hor your help
    --
    Massimiliano Marini - http://www.linuxtime.it/massimilianomarini/
    "It's easier to invent the future than to predict it." -- Alan Kay


+ Reply to Thread