I did further testing to narrow down the problem.
Some more infos to my system: I'm on OpenSuse 11.1 + Plesk 9.2.3 + Qmail + SA setted up to use individual Bayes-DB for each user.
(DB is in /var/qmail/mailnames/domain/user/.spamassassin)
I altered config.inc.php to let markasjunk2 execute following command to see if the executing out of markasjunk2 is working correctly itself:
$rcmail_config['markasjunk2_spam_cmd'] = 'echo "Test" > /var/qmail/mailnames/%d/%l/.spamassassin/debug.txt';No debug.txt was written.
OK, probably a permission problem I thought and changed the command into the following one knowing that RC is allowed to write there:
$rcmail_config['markasjunk2_spam_cmd'] = 'echo "Test" > /usr/share/roundcube/logs/debug.txt';...et voila! debug.txt is there.
Next step I did
chown wwwrun:www the .spamassassin dir for my test account and gave 777 rights to it to assure it's writeable for apache.
But still he doesn't write debug.txt
So, problem seems to be that the .spamassassin dir isn't writeable for apache. Do you have any idea what I have to change?
What confuses me is that he can write in the logs dir but not in .spamassassin even with the same owner/group and 777 rights.
//Edit:
Just tried to add wwwrun to the group "popuser" which has access rights to the .spamassassin dir. That doesn't help neither
Any idea somebody? I think this is a basic Linux problem now. Unfortunalety I don't have that much Linux knowledge...
//Edit 2:
I added following line in /etc/sudeors with visudo:
#wwwrun ALL=NOPASSWD: /usr/bin/sa-learn
#wwwrun ALL=(root) NOPASSWD: /usr/bin/sa-learn
wwwrun ALL=(ALL) NOPASSWD: /usr/bin/sa-learn
I also tried the outcommented ones as I'm not sure about the right syntax.
It all doesn't work.
/var/qmail/mailnames/mydomain/user/.spamassassin looks like this:
drwxr-xr-x 2 popuser popuser 4096 18. Dez 23:10 .spamassassin/
the files within:
drwxr-xr-x 2 popuser popuser 4096 18. Dez 23:10 ./
drwx------ 5 popuser popuser 4096 18. Dez 12:43 ../
-rw------- 1 popuser popuser 12288 18. Dez 12:37 auto-whitelist
-rw------- 1 popuser popuser 12288 18. Dez 22:21 bayes_seen
-rw------- 1 popuser popuser 12288 18. Dez 22:21 bayes_toks
-rw------- 1 popuser popuser 44 18. Dez 22:11 user_prefs
groups wwwrun:
wwwrun : www popuser psaserv
What could still be the problem??