[Dovecot] Quota exceeded messages
When I try to move messages between folders I get 'Quota exceeded' messages.
I installed dovecot without any major configuration and accounts are created with PostfixAdmin.
Is there some common setting that I must be missing?
Version in use is 1.0 rc26
- Frank
On 09/07/07, Frank Church <voipfc@googlemail.com> wrote:
When I try to move messages between folders I get 'Quota exceeded' messages.
I installed dovecot without any major configuration and accounts are created with PostfixAdmin.
Is there some common setting that I must be missing?
Version in use is 1.0 rc26
- Frank
These are the parts of my configuration I consider relevant
/etc/dovecot.conf
protocol imap { mail_plugins = quota imap_quota imap_client_workarounds = outlook-idle delay-newmail } protocol pop3 { mail_plugins = quota pop3_client_workarounds = outlook-no-nuls oe-ns-eoh } protocol lda { postmaster_address = postmaster@abc.meripol.net mail_plugins = quota log_path = /var/log/dovecot-deliver.log info_log_path = /var/log/dovecot-deliver.log }
plugin { quota = maildir:storage=10240:messages=1000 acl = vfile:/etc/dovecot/acls trash = /etc/dovecot/trash.conf }
Looking at the above settings I assume that 10240 Kb or 1000 messages constitute the message limit.
Is there an override on a per mailbox setting in the mailbox folder?
Do Postfix and PostfixAdmin also have their custom settings?
The problem doesn't appear to apply at the delivery stage, so it appears to be something respected by dovecot alone.
On Mon, 2007-07-09 at 17:36 +0100, Frank Church wrote:
quota = maildir:storage=10240:messages=1000 .. Looking at the above settings I assume that 10240 Kb or 1000 messages constitute the message limit.
Yes.
Is there an override on a per mailbox setting in the mailbox folder?
By "mailbox" do you mean users or folders? It's a per-user setting, and it's possible to override the global quota by having userdb return a quota field. See the SQL examples in http://wiki.dovecot.org/Quota
Do Postfix and PostfixAdmin also have their custom settings?
The problem doesn't appear to apply at the delivery stage, so it appears to be something respected by dovecot alone.
If you want to enforce quota, use Dovecot's deliver or some other MDA that supports Maildir++ quota. Postfix's internal MDA doesn't.
On 10/07/07, Timo Sirainen <tss@iki.fi> wrote:
On Mon, 2007-07-09 at 17:36 +0100, Frank Church wrote:
quota = maildir:storage=10240:messages=1000 .. Looking at the above settings I assume that 10240 Kb or 1000 messages constitute the message limit.
Yes.
Is there an override on a per mailbox setting in the mailbox folder?
By "mailbox" do you mean users or folders? It's a per-user setting, and it's possible to override the global quota by having userdb return a quota field. See the SQL examples in http://wiki.dovecot.org/Quota
Do Postfix and PostfixAdmin also have their custom settings?
The problem doesn't appear to apply at the delivery stage, so it appears to be something respected by dovecot alone.
If you want to enforce quota, use Dovecot's deliver or some other MDA that supports Maildir++ quota. Postfix's internal MDA doesn't.
I think I got to the bottom of the problem, which probably is the result of too much dependency on howtos and not enough RTFMing. I have an empty blog named 'howtos considered harmful' , and this will provide a good article.
It appears that I changed my dovecot/sql.conf from one with a separate user_query and password_query to one with just the password_query in conjunction with the prefetch scheme, which did not include the quota setting. I will add " concat('dirsize:storage=', quota) AS userdb_quota " to the password_query to see if it will fix the problem.
I also have to remember to add a userdb entry to dovecot.conf and user_query to dovecot/sql.conf just in case I opt to use dovecot's deliver later.
The wiki states that in this case the userdb entry must come after the prefetch entry in dovecot.conf. If this is the case I think the text indicating the 'after' must be emphasized in the wiki. It is one of the things that come back to bite you later.
Before
driver = mysql user_query = SELECT concat('/var/vmail/', maildir) as home, concat('maildir:/var/vmail/', maildir) as mail, 601 AS uid, 12 AS gid, concat('dirsize:storage=', quota) AS quota FROM mailbox WHERE username = '%u' AND active = '1'
password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as userdb_home, concat('maildir:/var/vmail/', maildir) as userdb_mail, 601 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
After
default_pass_scheme = MD5-CRYPT
driver = mysql
password_query = SELECT username as user, password, concat('/var/vmail/', maildir) as userdb_home, concat('maildir:/var/vmail/', maildir) as userdb_mail, 601 as userdb_uid, 12 as userdb_gid FROM mailbox WHERE username = '%u' AND active = '1'
On 10/07/07, Frank Church <voipfc@googlemail.com> wrote:
I think I got to the bottom of the problem, which probably is the result of too much dependency on howtos and not enough RTFMing. I have an empty blog named 'howtos considered harmful' , and this will provide a good article.
It appears that I changed my dovecot/sql.conf from one with a separate user_query and password_query to one with just the password_query in conjunction with the prefetch scheme, which did not include the quota setting. I will add " concat('dirsize:storage=', quota) AS userdb_quota " to the password_query to see if it will fix the problem.
Update:
After modifying the password_query to include concat('dirsize:storage=', quota) AS userdb_quota, moving mails between mailboxes works.
Another thing to note is that the quota snippet in the SQL requires a cast and should be concat('dirsize:storage=', cast(quota as char)) AS userdb_quota
Frank Church wrote:
Another thing to note is that the quota snippet in the SQL requires a cast and should be concat('dirsize:storage=', cast(quota as char)) AS userdb_quota
Well, that only depends on what's your database schema and the sql engine in use. As you're storing quota in a numeric field and your sql engine's 'concat' function only accepts character parameters, you need to cast it :)
Regards,
Angel Marin http://anmar.eu.org/
On Tue, 2007-07-10 at 12:14 +0100, Frank Church wrote:
Another thing to note is that the quota snippet in the SQL requires a cast and should be concat('dirsize:storage=', cast(quota as char)) AS userdb_quota
Are you sure you want to use dirsize and hot maildir quota? dirsize is horribly slow with maildir. Do you still see this kind of a dirsize example mentioned somewhere in the Wiki?
On 09/07/07, Frank Church <voipfc@googlemail.com> wrote:
When I try to move messages between folders I get 'Quota exceeded' messages.
I installed dovecot without any major configuration and accounts are created with PostfixAdmin.
Is there some common setting that I must be missing?
Version in use is 1.0 rc26
- Frank
On 09/07/07, Charles Marcus <CMarcus@media-brokers.com> wrote:
Frank Church, on 7/9/2007 11:41 AM, said the following:
When I try to move messages between folders I get 'Quota exceeded' messages.
I installed dovecot without any major configuration and accounts are created with PostfixAdmin.
Is there some common setting that I must be missing?
Version in use is 1.0 rc26
Please upgrade to 1.0.1 - there were lots of changes in the last couple of months leading up to the release, and many of those changes affected quota support.
Then, if you still have a problem, please report back, and include dovecot -n output and platform/auth details...
--
Best regards,
Charles
I have my dovecot -n output below.
In any case I want to know more about dovecot configuration, in case the problem is due to some misconfiguration. A release candidate would probably be past that stage.
Not to mention that I am afraid of damaging my current setup.
output from dovecot -n
# /usr/local/etc/dovecot.conf base_dir: /var/run/dovecot/ log_path: /var/log/dovecot/error_log info_log_path: /var/log/dovecot/general_log protocols: imap imaps pop3 pop3s disable_plaintext_auth: no login_dir: /var/run/dovecot//login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login first_valid_uid: 601 last_valid_uid: 601 mail_extra_groups: mail mail_location: maildir:/var/vmail/%d/%u maildir_copy_with_hardlinks: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): outlook-idle delay-newmail imap_client_workarounds(imap): outlook-idle delay-newmail imap_client_workarounds(pop3): outlook-idle pop3_uidl_format(default): pop3_uidl_format(imap): pop3_uidl_format(pop3): %08Xu%08Xx pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: user: nobody verbose: yes debug: yes debug_passwords: yes passdb: driver: sql args: /etc/dovecot/sql.conf userdb: driver: sql args: /etc/dovecot/sql.conf userdb: driver: prefetch socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: mail master: path: /usr/local/var/run/dovecot/auth-master mode: 432 user: vmail group: mail plugin: quota: maildir:storage=10240:messages=1000 acl: vfile:/etc/dovecot/acls trash: /etc/dovecot/trash.conf
[root@jkl rchurch]#
participants (3)
-
Angel Marin
-
Frank Church
-
Timo Sirainen