I would like to confirm your suggestion regarding the cmd $ spamassassin -D --lint 2>&1 | grep local.cf It did work ( after I realized there was a space in the line) and presented an interesting set of lines that lead me to the site wide config file that was actually read.
I went to directory */var/lib/spamassassin/3.004000/updates_spamassassin_org* and edited file *"local.cf <http://local.cf>"* I placed the following rule: * "blacklist_from *@gmail.com <http://gmail.com>" * AND my test emails were marked USER_IN_BLACKLIST and placed in the junk box. - major cool. THEN I took the rule:*"blacklist_from *@gmail.com <http://gmail.com>"* out and placed in the rule: *"allow_user_rules 1"* THEN went to directory /home/client/.spamassassin where the user_prefs file is located. I placed in the rule: *"blacklist_from *@gmail.com <http://gmail.com>"* AND changed owner from root to debian-spamd -rw-r--r-- 1 debian-spamd debian-spamd 2190 Feb 16 13:47 user_prefs BUT the test email from my gmail account did not get Marked as SPAM Not sure where to look next. Am I missing a Rule? Is the ownership wrong? Amanda On Tue, Feb 16, 2016 at 12:34 PM, Bowie Bailey <bowie_bai...@buc.com> wrote: > On 2/16/2016 2:44 PM, Amanda Giarla wrote: > > First this is on a training server running Ubuntu 14, VestaCP, Exim4 etc. > > In doc > https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html > Under RULE DEFINITIONS AND PRIVILEGED SETTINGS > It it my understanding that to use the a user_prefs file I have to place > in some config file > > *allow_user_rules 1* > > first. > > And then write rules into the user_prefs file. > > WHAT I DID > > I have placed the allow_user_rules rule in > */usr/share/spamassassin/local.cf <http://local.cf/>* > AND > > */etc/mail/spamassassin/local.cf <http://local.cf/> * > > > That should work, although it is only needed in one of the two places. > You need to determine which file SA is reading. > > Take a look at the output of: > $ spamassassin -D --lint 2>&1 | grep local.cf > > > THEN placed in the user_prefs file the following rule > > *blacklist_from *@gmail.com <http://gmail.com/>* > and restarted spamassassin > > > That is fine, however I don't think you need the allow_user_rules option > for that. It is only needed for the options listed under the RULE > DEFINITIONS AND PRIVILEGED SETTINGS section of the man page. > > > Thinking this will mark mail from my gmail account as SPAM. > > When I look in the logs I do not see the test emails marked as spam > AND when I go into the webmail client the email was placed in the inbox > not in the junk box. > > I have tested with GTUBE spam and that does get marked and placed in the > junk box. > > Is the above the correct sequence? Am I missing a step? > > > My first guess would be that the user_prefs file is either in the wrong > place or has incorrect permissions. A close second would be that SA always > runs as the same user and you are not passing the -u option to spamc (along > with any necessary options for spamd depending on your setup). > > -- > Bowie >