It's better with a subject :(

I want to use SA for a lot of users which don't have home directory. There mails are in /var/mail. The spammed mails are send to the recipient in his file /var/mail/user with the addition of SA.

The bayes and auto-whitelist database will be commun to anybody.

I use spamassassin  3.0.3 under freebsd 4.8

I use postfix and  SA through procmail.

postfix  main.cf:

        mailbox_command = /usr/local/bin/procmail -t

I 've got the config file for procmail in /usr/local/etc/procmailrc

        PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
        LOGFILE=/var/log/procmail.log

        :0fw: $LOGNAME.lock
        *  < 256000
        | /usr/local/bin/spamc

I launch spamd in this way:

        /usr/local/bin/spamd -d -m10

and when I send a mail  I 've got this log:

Apr 13 19:39:37 host spamd[48968]: spamd: setuid to root succeeded
Apr 13 19:39:37 host spamd[48968]: spamd: still running as root: user not specified with -u, not found, or set to root, falling back to nobody at /usr/local/bin/spamd line 1152, <GEN5> line 4. Apr 13 19:39:37 host spamd[48968]: spamd: processing message <[EMAIL PROTECTED]> for root:65534 Apr 13 19:39:37 host spamd[48968]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.example.com. 48968 for /root/.spamassassin/auto-whitelist.lock: Permission denied Apr 13 19:39:37 host spamd[48968]: auto-whitelist: open of auto- whitelist file failed: locker: safe_lock: cannot create tmp lockfile / root/.spamassassin/auto-whitelist.lock.example.com.48968 for / root/.spamassassin/auto-whitelist.lock: Permission denied Apr 13 19:39:37 host spamd[48968]: bayes: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/bayes.lock.example.com.48968 for /root/.spamassassin/bayes.lock: Permission denied Apr 13 19:39:37 host spamd[48968]: spamd: clean message (-1.4/5.0) for root:65534 in 0.3 seconds, 744 bytes. Apr 13 19:39:37 host spamd[48968]: spamd: result: . -1 - ALL_TRUSTED scantime=0.3,size=744,user=root,uid=65534,required_score=5.0,rhost=local host.example.com,raddr=127.0.0.1,rport=1645,mid=<3822750E-3444-4F34-938F [EMAIL PROTECTED]>,autolearn=failed


The mail was in the mailbox but the bayes was not used.

So I restart the spamd daemon whith this options

/usr/local/bin/spamd -d -m10 -u spamassassin ( spamassassin in an user with its directory /home/spamassassin/.spamassassin )

He try to use the .spamassassin directory who belong to root (/ root/.spamssassin/ )

Apr 13 19:50:53 host spamd[49552]: spamd: connection from localhost.example.com [127.0.0.1] at port 1982 Apr 13 19:50:53 host spamd[49552]: spamd: processing message <[EMAIL PROTECTED]> for root:3005 Apr 13 19:50:53 host spamd[49552]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.example.com. 49552 for /root/.spamassassin/auto-whitelist.lock: Permission denied Apr 13 19:50:53 host spamd[49552]: auto-whitelist: open of auto- whitelist file failed: locker: safe_lock: cannot create tmp lockfile / root/.spamassassin/auto-whitelist.lock.example.com.49552 for / root/.spamassassin/auto-whitelist.lock: Permission denied Apr 13 19:50:53 host spamd[49552]: bayes: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/bayes.lock.example.com.49552 for /root/.spamassassin/bayes.lock: Permission denied Apr 13 19:50:53 host spamd[49552]: spamd: clean message (-1.4/5.0) for root:3005 in 0.1 seconds, 736 bytes. Apr 13 19:50:53 host spamd[49552]: spamd: result: . -1 - ALL_TRUSTED scantime=0.1,size=736,user=root,uid=3005,required_score=5.0,rhost=localh ost.example.com,raddr=127.0.0.1,rport=1982,mid=<C779CA6F-5CC6-4FD5-8547- [EMAIL PROTECTED]>,autolearn=failed

how can I configure spamd to use another directory for using bayes and auto-whitelist database ( in /home/spamassassin/.spamassassin ). It works if I change the permissions of /root/.spamassassin but it's not optimal.

Thanks for your help.

Reply via email to