User postfix refuses to run sa-learn

Gareth list-mailscanner at linguaphone.com
Sun Sep 16 19:26:48 IST 2007


Personally I configure bayes to store the tokens in a mysql database. Avoids
all the problems with permissions and makes it much easier to perform
backups aswell.

> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info]On Behalf Of Martin
> Wickman
> Sent: 16 September 2007 16:21
> To: mailscanner at lists.mailscanner.info
> Subject: User postfix refuses to run sa-learn
>
>
> Hi
>
> I'm running MailScanner with spamassassin and postfix. I have configured
> postfix to execute a script which runs sa-learn on all new mails that
> gets sent to the 'spam' user. The idea is to update the site-global
> /var/spool/MailScanner/spamassassin/bayes.* database automatically when
> my users forwards their spam.
>
> In postfix/master.cf I have this rule:
>
> spam unix -  n n -   -   pipe user=postfix:postfix
>     argv=/usr/local/bin/sa-learn-wrapper.pl spam ${sender}
>
> That says that postfix should run a command which updates the bayes
> database.
>
> BUT that fails horrible because postfix refuses to run commands as the
> postfix user...
>
> 'Run As User' is postfix and thus /var/spool/.../bayes* is also owned by
> postfix. Afaik I *need* to run sa-learn as postfix since the
> bayes-database and spamassassin is owned and ran by postfix. Its some
> kind of catch-22 here :(
>
> Apart from chmod 666 /var/spool/.../bayes* and using nobody:nobody, do
> you guys have any ideas how to fix this?
>
> /Thanks!
> --
> 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!
>
>
>



More information about the MailScanner mailing list