Hi Timo,
ok, in my dovecot setup, I have a setting to ignore messages in the Spam
folder (I will put my dovecot -n at the end of the message), and a
strange thing appears to be happening.
If I do a quota recalc on an account, It creates the maildirsize file
correctly, without the contents of the Spam folder calculated into the
total used.
But, it looks like when a new spam email is delivered, before the sieve
rules in the lda can move it into the spam folder, it is added to the
maildirsize file. Then, once it is moved into the Spam folder, if it is
directly expunged from the folder, it isn't subtracted from maildirsize
file.
I am using roundcube as a webmail solution, and it recognizes the Spam
folder and lets users directly empty the Spam folder instead of moving
it to the trash, and then removing it. If I do move the mail from the
Spam folder to the Trash folder, and then empty the trash, it then puts
the subtraction in the maildirsize folder.
So, either it shouldn't add it in the first place, or even though it is
deleted directly from the Spam folder, it should be subtracted from the
maildirsize folder, right?
Hmmm...maybe its the structure of the default sieve command that I have
that is making it want to add it?
here is the default sieve script that I use in the sieve_after field :
require "fileinto";
# rule:[Spam and Virus Tag]
if anyof (header :contains "Subject" "[VIRUS-TAG]",
header :contains "Subject" "[SPAM-TAG]")
{
fileinto "Spam";
stop;
}
Essentially, what is happening is that users are getting their quota
filled up for messages that were in their Spam folder...
Thanks,
Tim.
and here is my dovecot -n output :
# 2.0.7: /usr/local/etc/dovecot/dovecot.conf
# OS: FreeBSD 8.1-STABLE i386
auth_username_format = %Lu
auth_username_translation = %@
auth_verbose = yes
disable_plaintext_auth = no
dotlock_use_excl = yes
first_valid_uid = 100
listen = *
lock_method = dotlock
log_path = /local/logs/dovecot.errors
mail_fsync = always
mail_gid = 100
mail_location = maildir:%h/Maildir
mail_nfs_index = yes
mail_nfs_storage = yes
mail_plugins = " quota"
mail_uid = 100
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 imapflags notify
mmap_disable = yes
passdb {
args = /bin/checkpassword_dovecot_auth
driver = checkpassword
}
plugin {
quota = maildir:User quota
quota_rule = Trash:storage=+100M
quota_rule2 = Spam:ignore
sieve = ~/.dovecot.sieve
sieve_after = /home/mailboxes/sieve/to_spam_folder.sieve
sieve_dir = ~/Maildir/sieve
sieve_extensions = +notify +imapflags
}
protocols = imap pop3 sieve
service auth {
unix_listener auth-userdb {
group = sn
mode = 0600
user = sn
}
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
driver = prefetch
}
userdb {
args = /bin/checkpassword_dovecot_deliver
driver = checkpassword
}
verbose_proctitle = yes
verbose_ssl = yes
protocol pop3 {
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}
protocol lda {
info_log_path = /local/logs/dovecot-deliver.log
log_path = /local/logs/dovecot-deliver-errors.log
mail_plugins = " quota sieve"
}
protocol imap {
mail_plugins = " quota imap_quota"
}
protocol sieve {
managesieve_sieve_capability = comparator-i;ascii-numeric fileinto
reject vacation imap4flags notify include envelope body relational regex
subaddress copy
}