[Dovecot] dovecot-lda quota rule
I really like the feature where you can define quota rules with percents which trigger off of the default values[0] (so you can set the Trash to allow for 10% more of the user's quota for example).
What I would really love in dovecot would be for the ability to configure a quota rule for dovecot-lda. I would like to configure things so we don't bounce emails for users until they are well over quota, the IMAP quota plugin is a really great way to notify people that they are over quota because it fails to write to other folders.... that should be enough to get people's attention that they need to deal with things, but bouncing is harsh.
Is there a way to do this now that I haven't seen?
thanks! micah
On Thu, 2011-11-10 at 13:59 -0500, Micah Anderson wrote:
I really like the feature where you can define quota rules with percents which trigger off of the default values[0] (so you can set the Trash to allow for 10% more of the user's quota for example).
What I would really love in dovecot would be for the ability to configure a quota rule for dovecot-lda. I would like to configure things so we don't bounce emails for users until they are well over quota, the IMAP quota plugin is a really great way to notify people that they are over quota because it fails to write to other folders.... that should be enough to get people's attention that they need to deal with things, but bouncing is harsh.
You can give LDA-specific quota settings. Like maybe:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
or even not enforcing quota at all:
protocol lda { plugin { quota = maildir:User quota:noenforcing } }
On Tue, 15 Nov 2011 22:27:20 +0200, Timo Sirainen tss@iki.fi wrote:
On Thu, 2011-11-10 at 13:59 -0500, Micah Anderson wrote:
I really like the feature where you can define quota rules with percents which trigger off of the default values[0] (so you can set the Trash to allow for 10% more of the user's quota for example).
What I would really love in dovecot would be for the ability to configure a quota rule for dovecot-lda. I would like to configure things so we don't bounce emails for users until they are well over quota, the IMAP quota plugin is a really great way to notify people that they are over quota because it fails to write to other folders.... that should be enough to get people's attention that they need to deal with things, but bouncing is harsh.
You can give LDA-specific quota settings. Like maybe:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
Aha! Just what I was looking for. I presume the number following 'quota_rule' must be an unique number across all quota_rules in my config?
or even not enforcing quota at all:
protocol lda { plugin { quota = maildir:User quota:noenforcing } }
I was not aware of the noenforcing option, that answered another question I had not asked yet, so thanks for that! :)
micah
On Wed, 2011-11-16 at 11:09 -0500, micah anderson wrote:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
Aha! Just what I was looking for. I presume the number following 'quota_rule' must be an unique number across all quota_rules in my config?
No only unique, but all of the numbers must exist. For example quota_rule2 isn't used if quota_rule doesn't exist. Or quota_rule10 isn't used, unless quota_rule2..9 also exist.
On Wed, 16 Nov 2011 18:27:20 +0200, Timo Sirainen tss@iki.fi wrote:
On Wed, 2011-11-16 at 11:09 -0500, micah anderson wrote:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
Aha! Just what I was looking for. I presume the number following 'quota_rule' must be an unique number across all quota_rules in my config?
No only unique, but all of the numbers must exist. For example quota_rule2 isn't used if quota_rule doesn't exist. Or quota_rule10 isn't used, unless quota_rule2..9 also exist.
Ah, interesting, good to know. I presume that 'quota_rule' stands in for 'quota_rule1' and one does not need to specify a quota_rule1 if one has a 'quota_rule'.
micah
On Wed, 16 Nov 2011 11:09:12 -0500, micah anderson micah@riseup.net wrote:
On Tue, 15 Nov 2011 22:27:20 +0200, Timo Sirainen tss@iki.fi wrote:
On Thu, 2011-11-10 at 13:59 -0500, Micah Anderson wrote:
I really like the feature where you can define quota rules with percents which trigger off of the default values[0] (so you can set the Trash to allow for 10% more of the user's quota for example).
What I would really love in dovecot would be for the ability to configure a quota rule for dovecot-lda. I would like to configure things so we don't bounce emails for users until they are well over quota, the IMAP quota plugin is a really great way to notify people that they are over quota because it fails to write to other folders.... that should be enough to get people's attention that they need to deal with things, but bouncing is harsh.
You can give LDA-specific quota settings. Like maybe:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
I just tried doing this, and I started bouncing mail for everyone because they were over quota (even when they arent), so I am clearly missing something in how I have it configured. This is what I have:
namespace { separator = . prefix = inbox = yes }
namespace { separator = . prefix = INBOX. inbox = no hidden = yes list = no }
plugin { quota = dict:Your mail quota::proxy::quota }
dict { quota = mysql:/etc/dovecot/dovecot-dict-sql.conf }
plugin { quota_exceeded_message = You are over quota. To avoid losing mail, immediately empty your Trash and Sent folders and delete emails with large attachments. quota_rule = *:bytes=100663296 # in case someone doesn't have sql quota quota_rule2 = Trash:bytes=+20%% # let trash be larger by 20% quota_rule3 = Spam:bytes=+10%% # let spam be larger by 10% quota_rule4 = INBOX.Trash:bytes=+20%% # repeat the above for namespaces quota_rule5 = INBOX.Spam:bytes=+10%% # same quota_rule6 = INBOX.restored:bytes=+500%% # allow for temporary folder }
...
protocol lda { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins plugin { quota_rule7 = INBOX:bytes=+10%% } }
Maybe I should have that quota_rule7 be *:bytes=+10%% ?
thanks for any suggestions for what I am missing here! micah
micah anderson micah@riseup.net writes:
On Wed, 16 Nov 2011 11:09:12 -0500, micah anderson micah@riseup.net wrote:
On Tue, 15 Nov 2011 22:27:20 +0200, Timo Sirainen tss@iki.fi wrote:
On Thu, 2011-11-10 at 13:59 -0500, Micah Anderson wrote:
I really like the feature where you can define quota rules with percents which trigger off of the default values[0] (so you can set the Trash to allow for 10% more of the user's quota for example).
What I would really love in dovecot would be for the ability to configure a quota rule for dovecot-lda. I would like to configure things so we don't bounce emails for users until they are well over quota, the IMAP quota plugin is a really great way to notify people that they are over quota because it fails to write to other folders.... that should be enough to get people's attention that they need to deal with things, but bouncing is harsh.
You can give LDA-specific quota settings. Like maybe:
protocol lda { plugin { quota_rule2 = INBOX:storage=200% } }
I just tried doing this, and I started bouncing mail for everyone because they were over quota (even when they arent), so I am clearly missing something in how I have it configured. This is what I have:
Solved, thanks to tss on irc... My problem was the dovecot-lda invocation was not passing the -d parameter, so no userdb quota rules were being applied.
micah
participants (3)
-
micah anderson
-
Micah Anderson
-
Timo Sirainen