Wednesday, August 27, 2003

SpamAssassin - cannot write to User_prefs error

You may come across a lot of errors in /var/log/maillog to do with spamd not having enough rights to
the users "user_prefs" file:

"Aug 27 07:01:35 SERVERNAME spamd[8739]: Cannot write to /home/USERNAME/.spamassassin/user_prefs:"


There are 4 options to rectify this problem (which i found on a Debian mailling list)

* Remove -u nobody from spamd. The daemon will run as root. Children
will setuid() themselves to the appropriate userid when processing
mail.

* Make sure ~/.spamassassin is world-readable and has all the necessary
config files. If you are using bayes, you may need to make the
database files world-writable.

* Make ~/.spamassassin world-writable, and let spamd create whatever
files it needs.

* Create a special sa user and group, run spamd with "-u sa", set
~/.spamassassin's group ownership to sa, and add group read/write
access to it. Let spamd create whatever files it needs.