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@mydomain.tld): Feb 06 00:59:47 Info: auth input: recipient@mydomain.tld deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: auth input: home=/home/vmail/mydomain.tld/recipient/ deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: auth input: uid=1004 deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: auth input: gid=1004 deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: maildir: data=/home/vmail/mydomain.tld/recipient/.maildir deliver(recipient@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@mydomain.tld): Feb 06 00:59:47 Warning: Growing pool 'Cache fields' with: 2048 deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: msgid=000d01c987ed$879c82f0$6400a8c0@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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 6 Feb 2009, Jehan Pagès wrote:
TrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u" UntrustedDeliveryAgent "/usr/libexec/dovecot/deliver -d %u" QuarantineAgent "/usr/libexec/dovecot/deliver -d %u -m Junk"
deliver(recipient@mydomain.tld): Feb 06 00:59:47 Info: msgid=000d01c987ed$879c82f0$6400a8c0@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?
As it looks like Dovecot deliver itself is working, I would check if DSPAM really works as expected by adding a wrapper script, e.g.:
=======START #!/bin/bash
( date id echo "$@" "$@" rc=$? echo rc=$rc exit $rc ) >/tmp/dspam-quar-wrap.$$.tmp 2>&1 ======END
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSYwfs3WSIuGy1ktrAQIGOAf6ApieX4wxlNCGTuEl0jA3/pZlngIFaMbB 9+0DZc/tQnQv/O/e43Hr44fWenzyAFDccnv/i9dO+22U25QijA6vHtptrlUk3DuD R7vVQVaEBbBh2z98MfK3Ql8GgS+lmEMZ9KyXVCO10eIR4/6RXpu/qMAOZdloG9kC r05wDfBrxj/E+SjZyy9sol8XcvM1WJFf1fYN4P95l9q1sgFd82vo2CFjaoJ2dEs2 6Kk0h7LLT3Pn/aVeruVW0cmOTGVwyEPt4llSftcTGN/PY1iCAIEZOwkIhibjssTq Ll3JuKRdI4JEW1ebFqRxpHkSPHwnmDMrOmr+FTttKhjURx5aNgvc8A== =FV0I -----END PGP SIGNATURE-----
participants (2)
-
Jehan Pagès
-
Steffen Kaiser