Hi all,
as I told earlier, I am installing an email server with
postfix/dovecot/dspam (for now that's all, though some programs may come
later). For now, what works good enough is that I receive mails and spams
are tagged. Dovecot version 1.1.7-r1 compiled from the gentoo depository
with debug.
The path of a mail is
1/ to be passed to dspam by postfix as a virtual transport with this in
master.cf:
dspam unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/dspam --client
--deliver=innocent,spam --user ${recipient}
and this in main.cf:
virtual_transport = dspam
2/ Then in dspam.conf, I have:
TrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u"
UntrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u"
QuarantineAgent "/usr/libexec/dovecot/deliver -d %u -m Junk"
Now dspam is tagging a lot of my spams, with [SPAM] on the subject and in
the header stuffs like this:
X-DSPAM-Result: Spam
X-DSPAM-Processed: Thu Feb 5 23:49:02 2009
X-DSPAM-Confidence: 0.5232
X-DSPAM-Probability: 0.9869
X-DSPAM-Signature: 498b6cde61901804284693
X-DSPAM-Factors: 27,
Subject*watch, 0.99000,
a+loved, 0.99000,
Subject*for+all, 0.99000,
...
...
But I wanted spam to go in my Junk folder (using maildir, this is the
directory .maildir/.Junk for my configuration. Hence the above
configuration of QuarantineAgent.
But it doesn't work as my emails are still deliverd to INBOX. How
could I check that dovecot deliver is taking into account the option
"-m Junk"?
Or maybe I don't use it well? (I tried also "-m .Junk" as it it
the
name of the directory but it is the same)
Note also that I use maildir format, so maybe this option works only
with mailbox?
The doc says: -m <mailbox>: Destination mailbox (default is INBOX).
In my dovecot.conf, I have:
protocol lda {
hostname = mydomain.tld
log_path = /home/vmail/dovecot-deliver.log
info_log_path = /home/vmail/dovecot-deliver.log
auth_socket_path = /var/run/dovecot/auth-master
}
And when a deliver occures, that's all I have in dovecot-deliver.log:
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: auth input:
recipient at mydomain.tld
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: auth input:
home=/home/vmail/mydomain.tld/recipient/
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: auth input: uid=1004
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: auth input: gid=1004
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: maildir:
data=/home/vmail/mydomain.tld/recipient/.maildir
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info: maildir++:
root=/home/vmail/mydomain.tld/recipient/.maildir, index=, control=,
inbox=/home/vmail/mydomain.tld/recipient/.maildir
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Warning: Growing pool
'Cache fields' with: 2048
deliver(recipient at mydomain.tld): Feb 06 00:59:47 Info:
msgid=<000d01c987ed$879c82f0$6400a8c0 at biancauj3>: saved mail to INBOX
Is there a way to check the options set on parameters in the logs, so
that I check that dspam runs indeed QuarantineAgent? Or would you have
other solution/hints?
Someone on the dspam ml told me that maildrop or sieve are more flexible.
So I explain here that my "reason" was simply that I thought it would
be better not to install another software/component to remain simple.
Moreover with the "-m" option, dovecot-deliver seemed to do just what
I needed (I don't need much more complicated). But maybe I am wrong or
it is really better not to
use dovecot-deliver. If so, just tell me.
Thanks.
Jehan