The amazing case of the missing .spamassassin directory

Glenn Steen glenn.steen at gmail.com
Wed Sep 9 16:24:05 IST 2009


2009/9/9 Jules Field <MailScanner at ecs.soton.ac.uk>:
> 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.
>
This is usually not the case.
The home directory is usually a non-writable (to the postfix user)
chroot-jail-type-o-thing. It shouldn't be touched, at least not that
way;-).
Instead you have two options:
a) create the needed directories (like .spamassassin, .razor, .pyzor
...) by hand (as root, likely) and chmod/chown them to the postfix
user (so that it can write to them, at least), or
b) play around with the SA configuration so that it will use some
other (writable) directory for these things. There are some useful
info on this in the wiki, IIRC.
Either way will get you there, pretty fast:-).

Cheers
-- 
-- Glenn

> 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/bayes.lock.mail.domain.com.908 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/bayes.lock.mail.domain.com.910 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
>
> --
> Julian Field MEng CITP CEng
> www.MailScanner.info
> Buy the MailScanner book at www.MailScanner.info/store
>
> Need help customising MailScanner?
> Contact me!
> Need help fixing or optimising your systems?
> Contact me!
> Need help getting you started solving new requirements from your boss?
> Contact me!
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
> Follow me at twitter.com/JulesFM and twitter.com/MailScanner
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>



-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list