Make Spamassassin learn spam mails

Mark Sapiro mark at msapiro.net
Tue May 2 03:56:49 UTC 2017


On 05/01/2017 08:31 PM, Eoin Kim wrote:
> Mark wrote:
>> 
>> I also have an alias in my postfix that is effectively
>> 
>> Spam_Report: "|spamc -u postfix -L spam  || true"
>> 
>> I have found however that I needed to put this in a separate alias file with the corresponding .db (I use hashes) owned by postfix as the "-u postfix" doesn't seem to be effective for non privileged users.
> 
> Does this mean that I have to edit the main.cf file for postfix like below?
> 
> alias_maps = hash:/etc/aliases, hash:/etc/new_file


Yes.


> alias_database = hash:/etc/aliases, hash:/etc/new_file


No. It isn't necessary to have every alias_maps file in alias_database.
If hash:/etc/new_file is in alias_database, /etc/new_file.db will be
rebuilt either by 'newaliases' or by 'postalias /etc/new_file'. If it is
not in alias_database, /etc/new_file.db will be rebuilt only by
'postalias /etc/new_file'.

It is quite reasonable to just rebuild the .db with postalias whenever
the file changes.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the MailScanner mailing list