# spamassassin issue since upgrade

## snIP3r

hi all!

since latest update of spamassassin to spamassassin-3.4.1-r13 i have an issue with my user prefs. they worked without problems till update. no config files are changed. and now i get a message like this with every mail beeing scanned:

```

Aug 22 07:05:02 area52 spamd[10456]: spamd: connection from localhost [::1]:49184 to port 783, fd 5

Aug 22 07:05:02 area52 spamd[10456]: spamd: creating default_prefs: /home/sniper/.spamassassin/user_prefs

Aug 22 07:05:02 area52 spamd[10456]: config: cannot create user preferences file /home/sniper/.spamassassin/user_prefs: No such file or directory

Aug 22 07:05:02 area52 spamd[10456]: spamd: failed to create readable default_prefs: /home/sniper/.spamassassin/user_prefs

 spamd: processing message <46Yi28f_RAS6jz32kPiOIg@domain.net> for sniper:112

```

so i deleted the .spamassassin directory in my home directory but this has no effect  :Sad: 

con someone perhaps help me with this issue?

thx in advance

snIP3r

----------

## NTU

Try this:

```
mkdir -p /home/sniper/.spamassassin && touch /home/sniper/.spamassassin/user_prefs
```

----------

## figueroa

I had been running spamassassin ~x86 like forever, but the recent upgrade from spamassassin-3.4.1-r12 to spamassassin-3.4.1-r13 caused BAYES to stop working.  I removed the ~x86 setting in /etc/portage/package.keywords and after the downgrade to spamassassin-3.4.1-r8 BAYES works fine again.

That never happened before.

spamassassin-3.4.1-r13 is no longer available, replaced by version r16 (which also won't use BAYES), and version r8 is stable for x86.

----------

## Philippe23

Submitted a bug: https://bugs.gentoo.org/635790

----------

## Philippe23

If you're having this problem with -r16, can you try changing /etc/init.d/spamd to remove the --username and --groupname args from command_args:

```
command_args="--username=spamd

              --groupname=spamd

              --pidfile=${pidfile}

              ${SPAMD_OPTS}"

```

to 

```
command_args="--pidfile=${pidfile}

              ${SPAMD_OPTS}"

```

and let me know if that fixes the problem for you?

----------

## Philippe23

 *figueroa wrote:*   

> (which also won't use BAYES)

 

The bayes flag was removed because you couldn't really not have bayes support.  See https://bugs.gentoo.org/617950#c3 for details.

----------

## figueroa

 *Quote:*   

> If you're having this problem with -r16, can you try changing /etc/init.d/spamd to remove the --username and --groupname args from command_args:

 

I am using -r16 since yesterday and it won't use BAYES. I did as requested and will advise after some mail arrives.

 *Quote:*   

> The bayes flag was removed because you couldn't really not have bayes support.

 

"bayes flag" is not relevant my finding that -r16 won't use BAYES. The last versions I used that would use BAYES were -r8 and -r12.

----------

## figueroa

YES, by removing the --username and --groupname arguments from /etc/init.d/spamd BAYES is again working.

What are the implications of this situation?

ADDED: Thank you!

----------

## Philippe23

Pre-r16 didn't have the args, so it just puts you where you were.

There's an argument to be made that having spamd run as the spamd user would allow you to reduce access of the process, but you'd have to fixup the permissions of your $HOME/.spamassassin/ folders so the spamd user would be able to read/write to the folder for all your users (as well as modifying /etc/skel so it would have the permissions right for future users).

If you've got spamassassin setup to store user_prefs & bayes in a DB instead of the file-system, there's you're better off running as the spamd user.  But if you're in this post, you probably aren't setup with a DB backend.    :Wink: 

----------

## Philippe23

Update.  3.4.1-r19 fixes the above by adding a SPAMD_RUN_AS_ROOT flag to /etc/conf.d/spamd that you can enable if you need to continue running spamd as root so it can setuid to access the files in user's home folders.

As mentioned above, if your user config & bayes are in a database, you don't need to set the flag and should leave the default which will run the spamd process as a spamd user who has minimal permissions.

----------

