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? shell command is run with php exec(); Thank You!
somthing like this: sudo /usr/bin/sa-learn --spam --single < /www/host/web1/web/spam/sb_tmp_183_1166219586
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.
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!
Please have a look at this thread: http://www.howtoforge.com/forums/showthread.php?t=2064&highlight=sudo+statistics I posted there some links for sudo. The thread is about running the du command with root priveliges, so you will have to replace the /usr/sbin/du with the path to the sa-learn command. Hope this helps a bit.