[Dovecot] quota imap_quota
Nils Vogels
nivo+sender+9bb457 at is-root.com
Wed Aug 29 03:53:42 EEST 2007
Bazy wrote on 28-8-2007 23:05:
> plugin {
> # 10 MB + 1000 messages quota limit
> # quota = maildir:storage=10240:messages=1000
>
> driver = mysql
> connect = host=/var/lib/mysql/mysql.sock user=mail_admin
> password=XXXXXXXX dbname=mail
> user_query = SELECT CONCAT(('/home/vmail/'),
> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'),
> CONCAT('5000'), CONCAT('5000'), CONCAT('maildir:storage=', quota) FROM
> users AS quota WHERE email = '%u';
> }
>
> The querry output looks like this:
>
> +----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+
> | CONCAT(('/home/vmail/'),
> SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') |
> CONCAT('5000') | CONCAT('5000') | CONCAT('maildir:storage=', quota) |
> +----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+
> | /home/vmail/goofy.celuloza.ro/bazy/
> | 5000 | 5000 |
> maildir:storage=102400000 |
> +----------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------+
>
I'm not the expert on the matter, but I think your columns are named
wrong. Try changing the latter part of the user_query to
'CONCAT('maildir:storage=', quote) AS quota FROM users WHERE email = '%u';
As an example, I've posted my userdb query:
user_query = SELECT concat('/mail/', maildir) as home,
concat('maildir:/mail/', maildir) as mail, 108 AS uid, 116 AS gid,
concat('maildir:storage=', quota) AS quota FROM mailbox WHERE username =
'%u' AND active = '1'
Hope this helps!
Nils.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20070829/ec70c3d1/attachment.bin
More information about the dovecot
mailing list