pyzor problem whith a spamd running in a "no valid shell" user account.

43 vues
Accéder directement au premier message non lu

Renaud

non lue,
9 sept. 2008, 18:19:1309/09/2008
à spamassassin
Hi all,

I've a problem on a Debian serve,r running postfix + spamassassin.
I follow this config:
http://www.debianadmin.com/how-to-filter-spam-with-spamassassin-and-postfix-in-debian.html

So i created a specific user/group to run spamd as.. a(any commlent
welcome).

Anyway now i can't succeed to test the pyzor function and i think i
found why it's not working. I ha ve created the user spamd as
explained but this user hasn't a valid shell. If using a valid shell
the user is able to use pyzor, if not, the user seems not to be able
to...

So my question is, how can i run spamd as a specific user (spamd) and
beaing able to use pyzor ?

cf tests:

1\ while user has a valid shell:
# grep spamd /etc/passwd
spamd:x:5001:5001::/var/lib/spamassassin:/bin/sh
#
i can use pyzor, cf:
# su spamd -c 'pyzor ping'
82.94.255.100:24441 (200, 'OK')
==> OK

if i let the user with a shell like that test isn't working.
# grep spamd /etc/passwd.bak
spamd:x:5001:5001::/var/lib/spamassassin:/sbin/nologin
#
same test NOK !!

2\ Configuration used:

cat /etc/spamassassin/local.cf
(...)
required_score 5.0
use_bayes 1
bayes_auto_learn 1
skip_rbl_checks 0
use_razor2 1
use_dcc 1
use_pyzor 1
pyzor_options --homedir /etc/mail/spamassassin



In
# cat /etc/spamassassin/v310.pre
(....)
loadplugin Mail::SpamAssassin::Plugin::DCC
loadplugin Mail::SpamAssassin::Plugin::Pyzor
loadplugin Mail::SpamAssassin::Plugin::Razor2
loadplugin Mail::SpamAssassin::Plugin::SpamCop
loadplugin Mail::SpamAssassin::Plugin::AWL
loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold
loadplugin Mail::SpamAssassin::Plugin::TextCat
loadplugin Mail::SpamAssassin::Plugin::WhiteListSubject
loadplugin Mail::SpamAssassin::Plugin::MIMEHeader
loadplugin Mail::SpamAssassin::Plugin::ReplaceTags



Thanks in advance for any clue or help !

Regards.

Renaud

non lue,
9 sept. 2008, 18:28:0609/09/2008
à spamassassin
Some more configu i use:

# cat /etc/default/spamassassin
(...)
ENABLED=1
SAHOME="/var/lib/spamassassin/"
OPTIONS="--create-prefs --max-children 5 --username spamd --helper-
home-dir ${SAHOME} -s ${SAHOME}spamd.log"
PIDFILE="${SAHOME}spamd.pid"



One more note is that i created the directory /var/lib/spamassassin/
and it seems that the user has right to go in it and create file
(especially
referecne to the Debian doc (/usr/share/doc/spamassassin/
README.spamd.gz):
----------------------------------------------------------------------------------------------------
If you plan to use Razor or Pyzor, please note that they both rely on
their external configuration files in ~/.razor and ~/.pyzor being
readable, and Razor will try to write to a log file in
~/.razor/razor-agent.log that must be writable (Razor will complain
about
'unblessed references' in this case). You may find the -H switch to
spamd
to be useful; it allows you to set a 'helper home directory' that will
be
used as $HOME when external helpers like Razor, Pyzor and DCC are run.
----------------------------------------------------------------------------------------------------

# ls -lth /var/lib/ | grep spam
drwxr-xr-x 3 spamd spamd 4.0K 2008-09-10 00:16 spamassassin

# ls -lath /var/lib/spamassassin/
total 32K
drwxr-xr-x 3 spamd spamd 4.0K 2008-09-10 00:16 .
-rw-r--r-- 1 spamd spamd 12K 2008-09-10 00:16 spamd.log
-rw-r--r-- 1 root root 5 2008-09-10 00:16 spamd.pid
-rw------- 1 spamd spamd 15 2008-09-09 21:35 .bash_history
drwx------ 2 spamd spamd 4.0K 2008-09-09 21:34 .pyzor
drwxr-xr-x 24 root root 4.0K 2008-09-07 16:18 ..





Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message