[Dovecot] maildirsize not always present

Jean-Max Reymond jmreymond at free.fr
Wed Aug 17 00:48:15 EEST 2011

all seems OK for me and all the users have quota set.

$ cat /etc/dovecot/dovecot-sql.conf
password_query = SELECT username AS user,password FROM mailbox WHERE 
username = '%u' AND active='1'

# Query to retrieve user information.

user_query = SELECT concat('/home/mail/',maildir) as home, 8 AS uid, 8 
AS gid, concat('maildir:storage=', quota/1024) AS quota FROM mailbox 
WHERE username = '%u' AND active='1'

Whhen I request the database, quota is working for the first user and 
not for the second user but it is very similar

mysql> SELECT concat('/home/mail/',maildir) as home, 8 AS uid, 8 AS gid, 
concat('maildir:storage=', quota/1024) AS quota FROM mailbox WHERE 
username like  'francois.char%' OR username like 'cyril%';
| home                                          | uid | gid | quota 
| /home/mail/dracenie.com/cyril.lafont/Maildir/ |   8 |   8 | 
maildir:storage=10000000.0000 |
| /home/mail/dracenie.com/francois.charnier/    |   8 |   8 | 
maildir:storage=1464000.0000  |
2 rows in set (0.00 sec)

So, tomorrow, I will set auth_debug=yes to trace users activity

# dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
Warning: fd limit 1024 is lower than what Dovecot can use under full 
load (more than 2560). Either grow the limit or change 
login_max_processes_count and max_mail_processes settings
# OS: Linux 2.6.32-33-server x86_64 Ubuntu 10.04.3 LTS
log_path: /var/log/dovecot.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps managesieve
ssl_key_file: /etc/ssl/private/dovecot.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
login_max_processes_count: 1024
mail_max_userip_connections(default): 500
mail_max_userip_connections(imap): 500
mail_max_userip_connections(managesieve): 10
first_valid_uid: 8
mail_privileged_group: mail
mail_location: maildir:%h
mmap_disable: yes
mail_nfs_storage: yes
mail_nfs_index: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): quota imap_quota
mail_plugins(imap): quota imap_quota
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
   postmaster_address: postmaster at dracenie.com
   mail_plugins: sieve
   quota_full_tempfail: yes
   deliver_log_format: msgid=%m: %$
   rejection_reason: Your message to <%t> was automatically rejected:%n%r
auth default:
   mechanisms: plain login
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   quota: maildir

Le 16/08/2011 23:40, Timo Sirainen a écrit :
> I guess these users have unlimited quota? If not, show dovecot -n output and the dovecot-sql.conf file and what gets logged to these users with auth_debug=yes.
> On 16.8.2011, at 18.05, Jean-Max Reymond wrote:
>> thanks for your answer but my mta is postfix.
>> If I delete the maidirsize file, it is automatically created for my 75 users OK but for the 330 users, no way to create this file.
>> I am using a postfix database and I have checked the SQL request, the contents of the tables but nothing :-(
>> Le 16/08/2011 16:05, Juan Bernhard a écrit :
>>> Hi, are you using exim as mta? I been told in exim list that maildirsize
>>> might be removed under certain conditions
>>> (exim-*/src/transports/tf_maildir.c)
>>> El 16/08/2011 07:01 a.m., Jean-Max Reymond escribió:
>>>> Le 16/08/2011 11:29, Jean-Max Reymond a écrit :
>>>>> hi,
>>>>> I have a dovecot 1.2.9 and all is runnig fine except for quotas.
>>>>> Some accounts have a maildirsize file in the mail directory. If I delete
>>>>> the file, it is automatically rebuild: OK
>>>>> But other accounts does not have the maildirsize file even after access
>>>>> from dovecot server. All is OK for theses accounts except quota service.
>>>>> what's wrong ?
>>>> as complement, there is 75 users OK and 330 users KO
>>>> for these 330 users, thunderbird does not recognize mail quota. I have
>>>> created by a touch command a maildirsize file but it does not help
>> --
>> Jean-Max Reymond
>> Éruption de l'Etna: http://jmreymond.free.fr/Etna2002

Jean-Max Reymond
Éruption de l'Etna: http://jmreymond.free.fr/Etna2002

More information about the dovecot mailing list