I found that it runs as the destination user, not as root as I was thinking.
In this way, I can't use the --user parameter unless the user is in
the "Trusted" list in dspam.conf. But I can't put all users there.
Does anyone have an alternative for doing this?
I was trying to do something like:
chown dspam:dspam /usr/bin/dspam
chmod u+s /usr/bin/dspam
And using dspam --client in the procmailrc.
But it still doesnt worked. it should? Is there another alternantive so all
users can use the same traning data?
[]'s
.m
---------- Forwarded Message ----------
Subject: [dspam-users] qmail + procmail + dspam
Date: Wednesday 26 September 2007
From: Mauro Faccenda <[EMAIL PROTECTED]>
To: [email protected]
Hi all,
I'm trying to filter all the messagens incomming to my mail server as one user
(something like a shared database).
The setup that I've found that should work is changing the default (life with
qmail) /var/qmail/rc to:
qmail-start '|preline /usr/bin/procmail'
and in /etc/procmailrc i have:
---
MAILDIR=$HOME/Maildir/
DEFAULT=$HOME/Maildir/
LOGFILE=/var/log/procmail.log
VERBOSE=on
:0fw
| /usr/bin/dspamc --process --deliver=spam,innocent --stdout --user dspam
---
But my messages doesn't get filtered.
My procmail log says:
procmail:
Executing
"/usr/bin/dspamc,--process,--deliver=spam,innocent,--stdout,--user,dspam"
procmail: [31633] Wed Sep 26 11:19:45 2007
procmail: Program failure (1) of "/usr/bin/dspamc"
procmail: Rescue of unfiltered data succeeded
Making some further tests, I get that dspamc exits with error code 1. But I
couldn't find what it means.
And trying to execute it as a standalone (dspam without the --client
parameter) I get the the same error and the same exit code.
When I run it by hand with something like with the same user (root, that is in
the trusted list in dspam.conf):
# cat <message> | /usr/bin/dspamc \
--process --deliver=spam,innocent --stdout --user,dspam
It runs fine, and I get the filtered message in stdout.
I think is it. Can anyone help me with this?
Thanks in advance,
Mauro
-------------------------------------------------------