The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server wide Apache SpamAssassin bayes learning not working

Discussion in 'E-mail Discussions' started by kanbam, Feb 3, 2014.

  1. kanbam

    kanbam Member

    Joined:
    Aug 16, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    WHM 11.40.1 (build 9)
    CENTOS 6.5
    spamassassin 3.003001
    VPS with multiple domains

    I tried to configure spamassassin to learn bayesian filters server wide because each domain doesnt originate sufficient mail to produce a significative leaning. Following this http://wiki.apache.org/spamassassin/SiteWideBayesSetup:

    /etc/mail/spamassassin/local.cf
    Code:
    use_bayes 1
    bayes_auto_learn 1
    bayes_path /root/.spamassassin/bayes
    bayes_file_mode 0777

    /root/.spamassassin
    directory has 0777 permissions

    Yet there is something missing or something that I did wrong because its not working log file says:
    /var/log/maillog
    Code:
    Feb  3 14:34:46 * spamd[2620]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/bayes.lock.HOSTNAME.2620 for /root/.spamassassin/bayes.lock: Permission denied
    Where HOSTNAME is our servers hostname.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    Hello :)

    Are there any additional lines in /var/log/maillog associated with the error message you referenced?

    Thank you.
     
  3. kanbam

    kanbam Member

    Joined:
    Aug 16, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    /var/log/maillog
    Code:
    Feb  4 11:08:20 * spamd[1062]: spamd: connection from localhost.localdomain [127.0.0.1] at port 47140
    Feb  4 11:08:20 * spamd[1062]: spamd: setuid to USERNAME succeeded
    Feb  4 11:08:20 * spamd[1062]: spamd: checking message <*.local> for USERNAME:503
    Feb  4 11:08:22 * spamd[1062]: plugin: eval failed: bayes: (in learn) locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/bayes.HOSTNAME.1062 for /root/.spamassassin/bayes.lock: Permission denied
    Feb  4 11:08:22 * spamd[1062]: spamd: clean message (0.0/3.0) for USERNAME:503 in 2.1 seconds, 30993 bytes.
    Feb  4 11:08:22 * spamd[1062]: spamd: result: . 0 - RCVD_IN_DNSWL_NONE,T_OBFU_PDF_ATTACH scantime=2.1,size=30993,user=USERNAME,uid=503,required_score=3.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=47140,mid=<*.local>,autolearn=unavailable,shortcircuit=no
    Feb  4 11:08:22 * spamd[22756]: prefork: child states: I
    I did change some of the log here with USERNAME, HOSTNAME and * for privacy reasons.

    The default spamassassing config for bayes learning per account works fine, I want it to learn server wide.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    Feel free to open a support ticket using the link in my signature so we can take a closer look at the permissions/ownership values on the directories/files referenced in the error message. You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  5. kanbam

    kanbam Member

    Joined:
    Aug 16, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    Thanks. I did open a support ticket. ID number 4539215.
     
  6. kanbam

    kanbam Member

    Joined:
    Aug 16, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    Support solved the problem.

    /root/.spamassassin has 777 permissions but /root has 550 and denies reading permission to spamassassin.

    I moved the files to /var/spamassassin,put "bayes_path /var/spamassassin/bayes" in local.cf and its working.

    Thanks!
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Re: Server wide spamassasin bayes learning not working

    I am happy to see the issue is now resolved. Thank you for updating this thread with the outcome.
     
Loading...

Share This Page