On 11/23/19 2:50 PM, Jerry Malcolm wrote:

Ok, I made the following changes and got it to finally work (on Linux 2):

1) I created a user named spamd

2) I added  -u spamd  to  SPAMDOPTIONS in /etc/sysconfig/spamassassin  --- after doing this, no change... log said SA was still looking in the random /tmp file for bayes_*.

3) I added bayes_path /home/spamd/bayes/bayes to /etc/mail/spamassassin/local.cf

4) I moved my bayes_toks, bayes_seen, bayes_journal to /home/spamd/bayes/ folder

5) After starting spamd service, maillog (finally) says it's finding the bayes_* files in the /home/spamd/... folder.

So this is the 'what', but definitely not the 'why'. Observations....

    -- After adding the bayes_path  to local.cf but BEFORE moving the bayes_* files into that folder, the log indeed showed that it was looking in that folder.  However not finding any files there, it then tried looking in the /tmp random folder. But after I moved the files into that folder and restarted, spamd was now happy with the specified folder and did NOT look in the /tmp random folder.  So it appears that the /tmp random folder is the last-ditch effort to find some files (not sure why it would expect anything there... but so be it).  However, the optional bayes_path parm is somehow not so optional in spamd, at least in my environment.  It is being set to the user home folder when running spamassassin from CLI.  But it is NOT being set to anything when running spamd.

The script: /usr/lib/systemd/system/spamassassin.service should have a "NAME" setting in the beginning. This is the run user.

    -- Second observation, I still am not sure what user spamd was running under by default when not specified.  So in order to guarantee that the folder I did pick for bayes_path was accessible for whatever user spamd was running under, I think it was necessary to add the 'spamd' user and force spamd to run as user 'spamd'.

The default installed user should be "spamd".

Are my assumptions reasonably close?  Is it possible that this process could be made a bit easier for 'stupid idiots' like me? :-)

What's the saying about assume ?   #;)
Linux easy ??  "Tosten en Strudel ? Ha Ha Ha Ha"

Thanks so much.  I could NOT have done without your help.

Jerry

On 11/23/2019 1:56 PM, Jerry Malcolm wrote:
All righty...

On 11/23/2019 1:37 PM, Bob D wrote:
Jerry,
Let's back up a bit.
Let us see your distro via the command      lsb_release -a
        bash: lsb_release: command not found  -- is that in a certain folder I need to cd to?
Also the version via   uname -r
        4.14.154-128.181.amzn2.x86_64
Additionally, how did you install spamassassin please ?
        sudo yum install spamassassin  (just responded 'y' when asked... nothing else)



Reply via email to