You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Mathieu R." <ma...@400iso.net> on 2012/11/22 20:24:44 UTC
Spamassin error related to bayes and writing files
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=<CA...@mail.gmail.com>
2012-11-22T19:16:18.307532+00:00 localhost postfix/qmgr[26408]:
083F72555A: from=<is...@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
<CA...@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=<CA...@mail.gmail.com>,autolearn=unavailable,shortcircuit=no
2012-11-22T19:16:18.877648+00:00 localhost postfix/pickup[28602]:
D60C725564: uid=5001 from=<is...@gmail.com>
2012-11-22T19:16:18.881047+00:00 localhost postfix/pipe[29233]:
083F72555A: to=<ma...@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=<CA...@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=<is...@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(mathieu@400iso.net): sieve:
msgid=<CA...@mail.gmail.com>:
stored mail into mailbox 'INBOX'
2012-11-22T19:16:19.008334+00:00 localhost postfix/pipe[29237]:
D60C725564: to=<ma...@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.
Re: Spamassin error related to bayes and writing files
Posted by "Mathieu R." <ma...@400iso.net>.
Le 22/11/2012 21:03, Matthias Leisi a écrit :
>
>
>> 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
>
> Does user spamd have the rights to write to
> /var/lib/spamassassin(/.spamassassin/user_prefs)?
>
> -- Matthias
--
Mathieu R.
Re: Spamassin error related to bayes and writing files
Posted by "Mathieu R." <ma...@400iso.net>.
Le 22/11/2012 21:03, Matthias Leisi a écrit :
>
>
>> 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
>
> Does user spamd have the rights to write to
> /var/lib/spamassassin(/.spamassassin/user_prefs)?
>
> -- Matthias
there is no .spammassassin directory. should i mkdir it ?
21:18 root@curzio /var/lib # ls -la spamassassin
total 20K
drwxr-x--- 5 spamd spamd 4.0K Nov 22 14:11 ./
drwxr-xr-x 19 root root 4.0K Nov 22 13:17 ../
drwxr-xr-x 2 spamd spamd 4.0K Nov 22 21:04 .razor/
drwxr-xr-x 3 root root 4.0K Nov 22 21:15 3.003002/
--
Mathieu R.
Re: Spamassin error related to bayes and writing files
Posted by Matthias Leisi <ma...@leisi.net>.
> 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
>
Does user spamd have the rights to write to
/var/lib/spamassassin(/.spamassassin/user_prefs)?
-- Matthias
Re: Spamassin error related to bayes and writing files
Posted by RW <rw...@googlemail.com>.
On Sat, 24 Nov 2012 17:01:52 +0100
Mathieu R. wrote:
> Le 24/11/2012 16:35, RW a écrit :
>
> >
> > It was mostly a rhetorical question. Anyone who sets-up a mail
> > server to
> > produce back-scatter is part of the problem, not part of the
> > solution.
> >
> > I think it's pretty irresponsible to give such a detailed how-to.
>
> Maybe i did'nt understand things correctly, but i i read correctly
> the how-to, backscatter is produced by bouncing spam. As i deliver
> all spam, in order to have them sieve filtered by dovecot-lda, i
> think i do not produce any bounce related to spam.
I think you're probably right. I was going on what it says at the top of
the page.
Re: Spamassin error related to bayes and writing files
Posted by Axb <ax...@gmail.com>.
On 11/24/2012 05:01 PM, Mathieu R. wrote:
> Le 24/11/2012 16:35, RW a écrit :
>
>>
>> It was mostly a rhetorical question. Anyone who sets-up a mail server to
>> produce back-scatter is part of the problem, not part of the solution.
>>
>> I think it's pretty irresponsible to give such a detailed how-to.
>
> Maybe i did'nt understand things correctly, but i i read correctly the
> how-to, backscatter is produced by bouncing spam. As i deliver all spam,
> in order to have them sieve filtered by dovecot-lda, i think i do not
> produce any bounce related to spam.
>
> i'll do further reading in order to use spamassassin in a better way
> latter, but amavis is a pain tu use out of the box on archlinux, so i
> used that method to have a quick and easy to set up antispam system.
Take a look at Fuglu
https://github.com/gryphius/fuglu
see http://gryphius.github.com/fuglu/ for more details.
It can't get much easier than this.
Re: Spamassin error related to bayes and writing files
Posted by "Mathieu R." <ma...@400iso.net>.
Le 24/11/2012 16:35, RW a écrit :
>
> It was mostly a rhetorical question. Anyone who sets-up a mail server
> to
> produce back-scatter is part of the problem, not part of the
> solution.
>
> I think it's pretty irresponsible to give such a detailed how-to.
Maybe i did'nt understand things correctly, but i i read correctly the
how-to, backscatter is produced by bouncing spam. As i deliver all spam,
in order to have them sieve filtered by dovecot-lda, i think i do not
produce any bounce related to spam.
i'll do further reading in order to use spamassassin in a better way
latter, but amavis is a pain tu use out of the box on archlinux, so i
used that method to have a quick and easy to set up antispam system.
Please, tell me if i'm totally wrong...
--
Mathieu Rousseau
http://400iso.net/
Re: Spamassin error related to bayes and writing files
Posted by RW <rw...@googlemail.com>.
On Sat, 24 Nov 2012 12:58:16 +0100
Mathieu R. wrote:
>
> RW <rw...@googlemail.com> a écrit :
>
> >On Thu, 22 Nov 2012 20:24:44 +0100
> >Mathieu R. wrote:
> >
> >> Hello,
> >>
> >> i'm trying to integrate spamassassin into postfix (the lazy way :
> >> https://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix )
> >
> >Why do we have Wiki page that describes a way of using SpamAssassin
> >that's prefaced with the words "This should never be used"?
>
> I'm interested to the answer, but it's probably not related to my
> question, cause i corrected my error with a few help, and mkdir.
It was mostly a rhetorical question. Anyone who sets-up a mail server to
produce back-scatter is part of the problem, not part of the solution.
I think it's pretty irresponsible to give such a detailed how-to.
Re: Spamassin error related to bayes and writing files
Posted by "Mathieu R." <ma...@400iso.net>.
RW <rw...@googlemail.com> a écrit :
>On Thu, 22 Nov 2012 20:24:44 +0100
>Mathieu R. wrote:
>
>> Hello,
>>
>> i'm trying to integrate spamassassin into postfix (the lazy way :
>> https://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix )
>
>Why do we have Wiki page that describes a way of using SpamAssassin
>that's prefaced with the words "This should never be used"?
I'm interested to the answer, but it's probably not related to my question, cause i corrected my error with a few help, and mkdir.
--
Mathieu R.
http://400iso.net/
Envoyé de mon téléphone. Excusez la brièveté.
Re: Spamassin error related to bayes and writing files
Posted by RW <rw...@googlemail.com>.
On Thu, 22 Nov 2012 20:24:44 +0100
Mathieu R. wrote:
> Hello,
>
> i'm trying to integrate spamassassin into postfix (the lazy way :
> https://wiki.apache.org/spamassassin/IntegratedSpamdInPostfix )
Why do we have Wiki page that describes a way of using SpamAssassin
that's prefaced with the words "This should never be used"?