[Dovecot] Empty Mails from MAILER-DAEMON with Dovecot-Antispam and DSPAM
Hallo,
I've installed the dovecot-Antispam extension to my dovecot IMAP installation in conjunction with DSPAM.
But when moving Mails from e.g. INBOX to Spam or vice versa, empty mails from MAILER-DAEMON appear after the original mail has been moved. This happens using Thunderbird 17esr, K-9 Mail on Android and Apple Mail (Mountain Lion). (Perhaps also when using a Webmail IMAP client)
The source from one of these empty mails looks like this:
----snip---- Return-Path: <MAILER-DAEMON> X-Original-To: acn Delivered-To: acn@mydomain.name Received: from localhost (localhost.localdomain [127.0.0.1]) by <my host name> (Postfix) with SMTP id CB81B140011 for <acn>; Thu, 24 Oct 2013 09:23:33 +0200 (CEST) X-DSPAM-Reclassified: Spam Message-Id: <20131024072333.CB81B140011@<my host name>> Date: Thu, 24 Oct 2013 09:23:33 +0200 (CEST) From: MAILER-DAEMON ----/snip----
Do you have any idea why these mails appear and how I can prevent it?
I'm using these Debian packages:
ii dovecot-antispam 2.0+20120225-3 ii dovecot-core 1:2.1.7-7 ii dovecot-imapd 1:2.1.7-7 ii dovecot-ldap 1:2.1.7-7 ii dovecot-lmtpd 1:2.1.7-7 ii dovecot-managesieved 1:2.1.7-7 ii dovecot-sieve 1:2.1.7-7 ii dspam 3.10.1+dfsg-11 ii postfix 2.9.6-2 ii postfix-ldap 2.9.6-2
DSPAM is integrated in Postfix via master.cf:
----snip---- smtp inet n - - - - smtpd -o content_filter=dspam dspam unix - n n - - pipe flags=u user=vmail:vmail argv=/usr/bin/dspamc --deliver=innocent,spam --user $user
Mails go to dovecot via this 'virtual'-transport:
dovecot unix - n n - - pipe flags=ODRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -e -f ${sender} -d ${user} ----/snip----
The rest of my configuration follows:
dovecot -n:
----snip---- # 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-686-pae i686 Debian 7.2 ext4 auth_cache_size = 1 M auth_mechanisms = plain login auth_worker_max_count = 5 listen = *, [::] log_timestamp = "%Y-%m-%d %H:%M:%S " mail_location = maildir:/var/vmail/%u/Maildir mail_privileged_group = mail mailbox_idle_check_interval = 15 secs managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags notify passdb { args = /etc/dovecot/ldap-passdb.conf.ext driver = ldap } plugin { antispam_allow_append_to_spam = no antispam_backend = dspam antispam_dspam_args = --user;%Lu;--deliver=spam,innocent;--source=error antispam_dspam_binary = /usr/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam = Spam;Junk antispam_trash = Trash;Deleted Items;Deleted Messages sieve = ~/.dovecot.sieve sieve_before = /etc/dovecot/sieve-before.d sieve_extensions = +notify +imapflags sieve_storage = ~/sieve } protocols = imap sieve service auth { unix_listener /var/spool/postfix/private/auth { group = postfix mode = 0666 user = postfix } unix_listener auth-master { group = vmail mode = 0600 user = vmail } user = $default_internal_user } service imap-login { process_min_avail = 2 service_count = 0 vsz_limit = 32 M } service lmtp { inet_listener lmtp { address = 127.0.0.1 port = 24 } user = vmail } ssl_cert =
My dspam.conf looks like:
----snip---- Home /var/spool/dspam StorageDriver /usr/lib/i386-linux-gnu/dspam/libmysql_drv.so DeliveryHost 127.0.0.1 DeliveryPort 10026 DeliveryIdent localhost DeliveryProto SMTP OnFail error Trust vmail Trust root Trust dspam TrainingMode teft TestConditionalTraining on Feature noise Feature whitelist Algorithm graham burton Tokenizer osb PValue bcr WebStats off Preference "trainingMode=TEFT" # { TOE | TUM | TEFT | NOTRAIN } -> default:teft Preference "spamAction=deliver" # { quarantine | tag | deliver } -> default:quarantine Preference "spamSubject=[SPAM]" # { string } -> default:[SPAM] Preference "statisticalSedation=5" # { 0 - 10 } -> default:0 Preference "enableBNR=on" # { on | off } -> default:off Preference "enableWhitelist=on" # { on | off } -> default:on Preference "signatureLocation=headers" # { message | headers } -> default:message Preference "tagSpam=off" # { on | off } Preference "tagNonspam=off" # { on | off } Preference "showFactors=off" # { on | off } -> default:off Preference "optIn=off" # { on | off } Preference "optOut=off" # { on | off } Preference "whitelistThreshold=10" # { Integer } -> default:10 Preference "makeCorpus=off" # { on | off } -> default:off Preference "storeFragments=off" # { on | off } -> default:off Preference "localStore=" # { on | off } -> default:username Preference "processorBias=on" # { on | off } -> default:on Preference "fallbackDomain=off" # { on | off } -> default:off Preference "trainPristine=off" # { on | off } -> default:off Preference "optOutClamAV=off" # { on | off } -> default:off Preference "ignoreRBLLookups=off" # { on | off } -> default:off Preference "RBLInoculate=off" # { on | off } -> default:off Preference "notifications=off" # { on | off } -> default:off AllowOverride enableBNR AllowOverride enableWhitelist AllowOverride fallbackDomain AllowOverride ignoreGroups AllowOverride ignoreRBLLookups AllowOverride localStore AllowOverride makeCorpus AllowOverride optIn AllowOverride optOut AllowOverride optOutClamAV AllowOverride processorBias AllowOverride RBLInoculate AllowOverride showFactors AllowOverride signatureLocation AllowOverride spamAction AllowOverride spamSubject AllowOverride statisticalSedation AllowOverride storeFragments AllowOverride tagNonspam AllowOverride tagSpam AllowOverride trainPristine AllowOverride trainingMode AllowOverride whitelistThreshold AllowOverride dailyQuarantineSummary AllowOverride notifications IgnoreHeader DKIM-Signature IgnoreHeader X-Spam-Status IgnoreHeader X-Spam-Scanned IgnoreHeader X-Virus-Scanner-Result Notifications off PurgeSignatures 14 # Stale signatures PurgeNeutral 90 # Tokens with neutralish probabilities PurgeUnused 90 # Unused tokens PurgeHapaxes 30 # Tokens with less than 5 hits (hapaxes) PurgeHits1S 15 # Tokens with only 1 spam hit PurgeHits1I 15 # Tokens with only 1 innocent hit LocalMX 127.0.0.1 SystemLog on UserLog on Opt out ClamAVPort 3310 ClamAVHost 127.0.0.1 ClamAVResponse spam ServerMode auto ServerPass.Relay1 "<pwd>" ServerParameters "--deliver=innocent,spam --user %u" ServerIdent "localhost.localdomain" ServerDomainSocketPath "/var/run/dspam/dspam.sock" ClientHost /var/run/dspam/dspam.sock ClientIdent "<pwd>@Relay1" ProcessorURLContext on ProcessorBias off StripRcptDomain off Include /etc/dspam/dspam.d/ ----/snip----
Thanks a lot!
Kind regards, Anna Christina Naß
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 24-10-13 09:59, Anna Christina Naß wrote:
Hallo,
I've installed the dovecot-Antispam extension to my dovecot IMAP installation in conjunction with DSPAM.
But when moving Mails from e.g. INBOX to Spam or vice versa, empty mails from MAILER-DAEMON appear after the original mail has been moved. This happens using Thunderbird 17esr, K-9 Mail on Android and Apple Mail (Mountain Lion). (Perhaps also when using a Webmail IMAP client)
The source from one of these empty mails looks like this:
----snip---- Return-Path: <MAILER-DAEMON> X-Original-To: acn Delivered-To: acn@mydomain.name Received: from localhost (localhost.localdomain [127.0.0.1]) by <my host name> (Postfix) with SMTP id CB81B140011 for <acn>; Thu, 24 Oct 2013 09:23:33 +0200 (CEST) X-DSPAM-Reclassified: Spam Message-Id: <20131024072333.CB81B140011@<my host name>> Date: Thu, 24 Oct 2013 09:23:33 +0200 (CEST) From: MAILER-DAEMON ----/snip----
Do you have any idea why these mails appear and how I can prevent it?
<snip>
# 2.1.7: /etc/dovecot/dovecot.conf # OS: Linux 3.2.0-4-686-pae i686 Debian 7.2 ext4 auth_cache_size = 1 M auth_mechanisms = plain login auth_worker_max_count = 5 listen = *, [::] log_timestamp = "%Y-%m-%d %H:%M:%S " mail_location = maildir:/var/vmail/%u/Maildir mail_privileged_group = mail mailbox_idle_check_interval = 15 secs managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave imapflags notify passdb { args = /etc/dovecot/ldap-passdb.conf.ext driver = ldap } plugin { antispam_allow_append_to_spam = no antispam_backend = dspam antispam_dspam_args = --user;%Lu;--deliver=spam,innocent;--source=error
You're telling DSPAM to re-deliver e-mail after retraining. You don't want that, as you already received the e-mail. You only want DSPAM to re-learn the message, so try something like:
antispam_dspam_args = --user;%Lu;--deliver=;--source=error
antispam_dspam_binary = /usr/bin/dspamc antispam_dspam_notspam = --class=innocent antispam_dspam_spam = --class=spam antispam_signature = X-DSPAM-Signature antispam_signature_missing = move antispam_spam = Spam;Junk antispam_trash = Trash;Deleted Items;Deleted Messages
<snip>
Kind regards, Tom -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBCAAGBQJSa8b2AAoJEJPfMZ19VO/1J9EP/08yHDm8Okxe65TA83eQMHp4 SHj3EvJH115BtRjSEJMME3CQ7Vd5G3Ah1l3b6QMWhkEM2zRiFXD10WfrMplZvO/5 snS70CFHKataNyaTuBG7XxK5Gv56DmCIH2j1k/YjSXnUsl8G9Xpbh3lLoPZDALoC 9BThSrTCxMc2hN3W+VGBvhxh1Nk2t8hak56QvzSebKDkazLX7MHcexZWZuBqh+v5 saicGoSak3FSNhowTul0JI9EzFtU8VKlLOFOqy/31/4NynszJQs+aWrm1xkxkZV4 l+nLiRvQUC+TUO0AfvlUwxFCs8cT39IAhPU9lqWNoR8SAM31aqOJRBeO28HMx3Ur KOlefJnm77fQk6C+upqr0pKu+EgqvxQQBHjacZOKnzUptlwxzS2he38OswiWBk8b oSqPXpGvZ9jxxmfXQAg0M/a1ztIz6/8vAxNAZHKsuKciXFIn6iZyswn7A1fm2W06 KHHu4ocQ3mGmJ2n5AdnYQP+9axuPBRjCKL2gT2K5hP7uHuJr9vXOUaWpAfAmTPVa ATyXa6rnmtxOwKZt0azLFQhMzLu6kjEgTTcus3PLJFURECBoatrGMaWOCasLBu6w 4+g63ProScxZ1+P+MDUifxIBdiVD2M5qFc2zhnExt254hE/5YOYcgDq5f8x/XL6m gy34lWdAQtg8aKoCD07c =hw6D -----END PGP SIGNATURE-----
participants (2)
-
Anna Christina Naß
-
Tom Hendrikx