Need help with spamassassin configuration.

Discussion in 'Installation/Configuration' started by iovo, Dec 15, 2006.

  1. iovo

    iovo New Member

    Hello everybody, i need some help with spam configuration.
    I've install squerelmail and spam button plugins.

    Everything else run fine, just sa-learn

    When i try to learn spamassassin, is error showing in apache2 error.log file:

    shell command: /usr/bin/sa-learn --spam --single < /www/host/web1/web/spam/sb_tmp_183_1166219586

    where sb_tmp_183_1166219586 is a spam mail,
    spamassassin return: Learned tokens from 0 message(s) (1 message(s) examined)

    and error log was: bayes: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/bayes.lock.server.web1.com.19863 for /root/.spamassassin/bayes.lock: Permission denied

    can you help me with that, how can i change permission?:confused: :confused: :confused:

    shell command is run with php exec();

    Thank You!
     
  2. falko

    falko Super Moderator Howtoforge Staff

    You must run this command as root.
     
  3. iovo

    iovo New Member

    How can i do this?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can use e.g. sudo to run the command as root.
     
  5. iovo

    iovo New Member

    somthing like this:
    sudo /usr/bin/sa-learn --spam --single < /www/host/web1/web/spam/sb_tmp_183_1166219586
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes. And you will have to enable the sa-learn command in the sudoers file to be executed as root user without prompting for a password.
     
  7. iovo

    iovo New Member

    Thank You for help till, but how can i do this? Sorry about this stupid question, but i don't know what and how to do!

    Thank You!
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page