[Dovecot] Empty Mails from MAILER-DAEMON with Dovecot-Antispam and DSPAM
Anna Christina Naß
acn at annachristina.eu
Thu Oct 24 10:59:54 EEST 2013
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 at 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 = </etc/ssl/mycerts/my.imzadi.de.pem
ssl_cipher_list = HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3:!EXP:!aNULL:!ADH
ssl_key = </etc/ssl/mycerts/my.imzadi.de.key
userdb {
args = /etc/dovecot/ldap-userdb.conf.ext
default_fields = uid=vmail gid=vmail home=/var/vmail/%u
driver = ldap
}
protocol imap {
mail_max_userip_connections = 20
mail_plugins = antispam
}
protocol lda {
auth_socket_path = /var/run/dovecot/auth-master
mail_plugins = sieve
postmaster_address = postmaster at my.imzadi.de
}
----/snip----
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ß
More information about the dovecot
mailing list