The amazing case of the missing .spamassassin directory

Mauricio Tavares raubvogel at
Wed Sep 9 16:33:22 IST 2009

Jules Field wrote:
> MailScanner will run as the "Run As User" and "Run As Group" you have 
> set in MailScanner.conf, which should be "postfix". So you need to 
> ensure that its home directory (/var/spool/postfix in your case) is 
> writeable by the postfix user, and you will need to do all the sa-learn 
> commands as the postfix user as well.
	I think you found the problem:

root:/etc/MailScanner# ls -ld /var/spool/postfix
drwxr-xr-x 19 root root 4096 2008-12-03 10:01 /var/spool/postfix

What would be the best way to address this issue? Make postfix:postfix
own the directory or have postfix be the group and then make it group

> On 09/09/2009 15:54, Mauricio Tavares wrote:
>>     I was running sa-learn after moving spam that was classified as 
>> ham to
>> the spam folders here in one of our mail servers (i.e. some
>> housecleaning). But, when I did so, I got a lot of messages like these:
>> Learned tokens from 0 message(s) (1 message(s) examined)
>> bayes: locker: safe_lock: cannot create tmp lockfile
>> /var/spool/postfix/.spamassassin/ for
>> /var/spool/postfix/.spamassassin/bayes.lock: No such file or directory
>> bayes: expire_old_tokens: locker: safe_lock: cannot create tmp lockfile
>> /var/spool/postfix/.spamassassin/ for
>> /var/spool/postfix/.spamassassin/bayes.lock: No such file or directory
>> I understand it can't find the said lock file because the directory
>> /var/spool/postfix/.spamassassin does not exist. But, who creates the
>> said directory? I looked at MailScanner.conf and
>> spam.assassin.prefs.conf. Right now I still do not know who is supposed
>> to create the said directory (which is probably the first step in
>> finding out why it is not being created, perhaps due to some permission
>> issue thingie).
> Jules

More information about the MailScanner mailing list