Hello,

Being spammed since some weeks, I want to add spamassassin filtering on my webserver.
Spamassassin is correctly installed and detects correctly spams when performing : spamc < mailfile

I created the following /usr/lib/courier/etc/maildroprc :
if ( $SIZE < 204800 )
{
   exception {
       xfilter "/usr/local/spamassassin/bin/spamc"
   }
}
if (/^X-Spam-Flag: *YES/)
{
   exception {
       to "./Maildir/.Trash/"
   }
}

I modified DEFAULTDELIVERY to be :
   DEFAULTDELIVERY="| /usr/lib/courier/bin/maildrop"
I restarted Courier.

I was unable to activate mail filtering with only this.

All my accounts are virtual.
Here is an example of the contents of userdb :
jerome  home=/home/courier/hebergement-pro.org/jerome|mail=/home/courier/hebergement-pro.org/jerome|uid=1|gid=1|systempw=<... here is my password ...>

Running maildrop as Root, having replaced "to" lines with echo "spam / not spam", it provides me what I expect.
Running maildrop as daemon, it tells me Home directory is not owned by the good user.
My /etc/passwd contains : daemon:x:1:1:daemon:/usr/sbin:/bin/sh
drwxr-xr-x   2 root root   4096 Nov 13 17:16 sbin
If I chown/chgrp /usr/sbin, maildrop stop complaining and prints me what I expect (only message). I can not keep this setting.
After having replaced "echo" with "to" (as here), it created me a Maildir file in /usr/sbin... It used $HOME of daemon instead of my virtual user (/home/courier/..../jerome)

It's the first time I try to use maildrop. What did I forgot or misunderstood ?
Thank you for the time you took to read my long mail.

Just FYI, here are my configure lines :
COURIER-AUTHLIB : ./configure --prefix=/usr/lib/courier --without-authldap  --without-authpgsql --without-authvchkpw --without-authcram
COURIER 0.52.1 :
export COURIERAUTHCONFIG=/usr/lib/courier/bin/courierauthconfig
export CPPFLAGS=-I/usr/lib/courier/include
./configure --with-paranoid-smtpext --enable-unicode

Best regards.
Jerome Blion.

Reply via email to