Hello,
i'm trying to integrate spamassassin into postfix (the lazy way :
https://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix )
it work quite well, but i got a few errors related to bayes and writing
files in spamassassin home dir.
If somebody can help me, here are some infos :
spamassassin version : 3.3.2-7, running on Archlinux, with postfix and
dovecot
some logs :
2012-11-22T19:16:11.416609+00:00 localhost postfix/postscreen[29219]:
CONNECT from [209.85.214.46]:41615 to [92.243.17.51]:25
2012-11-22T19:16:17.612744+00:00 localhost postfix/postscreen[29219]:
PASS OLD [209.85.214.46]:41615
2012-11-22T19:16:17.633176+00:00 localhost postfix/smtpd[29225]:
connect from mail-bk0-f46.google.com[209.85.214.46]
2012-11-22T19:16:18.033950+00:00 localhost postfix/smtpd[29225]:
083F72555A: client=mail-bk0-f46.google.com[209.85.214.46]
2012-11-22T19:16:18.280231+00:00 localhost postfix/cleanup[29232]:
083F72555A:
message-id=<caeuxyf8v5cy67fkobk_8+rn+grc0ag4gmib3ftat0psxwua...@mail.gmail.com>
2012-11-22T19:16:18.307532+00:00 localhost postfix/qmgr[26408]:
083F72555A: from=<isingasimples...@gmail.com>, size=1501, nrcpt=1 (queue
active)
2012-11-22T19:16:18.322390+00:00 localhost spamd[24393]: spamd:
connection from localhost [127.0.0.1] at port 47172
2012-11-22T19:16:18.323410+00:00 localhost spamd[24393]: spamd: setuid
to spamd succeeded
2012-11-22T19:16:18.323802+00:00 localhost spamd[24393]: spamd:
creating default_prefs: /var/lib/spamassassin/.spamassassin/user_prefs
2012-11-22T19:16:18.324189+00:00 localhost spamd[24393]: spamd: failed
to create readable default_prefs:
/var/lib/spamassassin/.spamassassin/user_prefs
2012-11-22T19:16:18.325973+00:00 localhost spamd[24393]: spamd:
processing message
<caeuxyf8v5cy67fkobk_8+rn+grc0ag4gmib3ftat0psxwua...@mail.gmail.com> for
spamd:5001
2012-11-22T19:16:18.842722+00:00 localhost spamd[24393]:
auto-whitelist: open of auto-whitelist file failed: locker: safe_lock:
cannot create lockfile
/var/lib/spamassassin/.spamassassin/auto-whitelist.mutex: Permission
denied
2012-11-22T19:16:18.845694+00:00 localhost spamd[24393]: plugin: eval
failed: bayes: (in learn) locker: safe_lock: cannot create lockfile
/var/lib/spamassassin/.spamassassin/bayes.mutex: Permission denied
2012-11-22T19:16:18.848369+00:00 localhost spamd[24393]: spamd: clean
message (-0.8/5.0) for spamd:5001 in 0.5 seconds, 1472 bytes.
2012-11-22T19:16:18.848876+00:00 localhost spamd[24393]: spamd: result:
. 0 -
DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW
scantime=0.5,size=1472,user=spamd,uid=5001,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=47172,mid=<caeuxyf8v5cy67fkobk_8+rn+grc0ag4gmib3ftat0psxwua...@mail.gmail.com>,autolearn=unavailable,shortcircuit=no
2012-11-22T19:16:18.877648+00:00 localhost postfix/pickup[28602]:
D60C725564: uid=5001 from=<isingasimples...@gmail.com>
2012-11-22T19:16:18.881047+00:00 localhost postfix/pipe[29233]:
083F72555A: to=<math...@400iso.net>, relay=spamassassin, delay=0.99,
delays=0.41/0.01/0/0.57, dsn=2.0.0, status=sent (delivered via
spamassassin service)
2012-11-22T19:16:18.881409+00:00 localhost postfix/qmgr[26408]:
083F72555A: removed
2012-11-22T19:16:18.881843+00:00 localhost postfix/cleanup[29232]:
D60C725564:
message-id=<caeuxyf8v5cy67fkobk_8+rn+grc0ag4gmib3ftat0psxwua...@mail.gmail.com>
2012-11-22T19:16:18.897514+00:00 localhost spamd[24392]: prefork: child
states: II
2012-11-22T19:16:18.906304+00:00 localhost postfix/qmgr[26408]:
D60C725564: from=<isingasimples...@gmail.com>, size=1908, nrcpt=1 (queue
active)
2012-11-22T19:16:18.952117+00:00 localhost dovecot: auth-worker(29241):
mysql(localhost): Connected to database postfix_db
2012-11-22T19:16:19.006933+00:00 localhost dovecot:
lda(math...@400iso.net): sieve:
msgid=<caeuxyf8v5cy67fkobk_8+rn+grc0ag4gmib3ftat0psxwua...@mail.gmail.com>:
stored mail into mailbox 'INBOX'
2012-11-22T19:16:19.008334+00:00 localhost postfix/pipe[29237]:
D60C725564: to=<math...@400iso.net>, relay=dovecot, delay=0.15,
delays=0.05/0.01/0/0.09, dsn=2.0.0, status=sent (delivered via dovecot
service)
2012-11-22T19:16:19.008694+00:00 localhost postfix/qmgr[26408]:
D60C725564: removed
2012-11-22T19:16:48.426932+00:00 localhost postfix/smtpd[29225]:
disconnect from mail-bk0-f46.google.com[209.85.214.46]
20:22 mathieu@curzio ~ % cat /etc/conf.d/spamd
#SPAMD_OPTS="-c"
SAHOME="/var/lib/spamassassin/"
SPAMD_OPTS="--create-prefs --max-children 5 --username spamd
--helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log --pidfile
/var/run/spamd.pid"
master.cf :
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
#
==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
==========================================================================
#smtp inet n - n - - smtpd
smtp inet n - n - 1 postscreen
smtpd pass - - n - - smtpd -o
content_filter=spamassassin
dnsblog unix - - n - 0 dnsblog
tlsproxy unix - - n - 0 tlsproxy
submission inet n - n - - smtpd
#smtp inet n - n - - smtpd -o
content_filter=spamassassin
# -o syslog_name=postfix/submission
-o smtpd_tls_security_level=encrypt
-o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - n - - smtpd
# -o syslog_name=postfix/smtps
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
retry unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop unix - n n - - pipe
# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension}
${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp unix - n n - - pipe
# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop
($recipient)
#
#bsmtp unix - n n - - pipe
# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
#
#scalemail-backend unix - n n - 2 pipe
# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
# ${nexthop} ${user} ${extension}
#
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
spamassassin unix - n n - - pipe
user=nobody argv=/usr/bin/vendor_perl/spamc -f -e /usr/sbin/sendmail -oi
-f ${sender} ${recipient}
#using LDA with dovecot
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} -d ${recipient}
--
Mathieu R.