[Dovecot] quota ignore trash

Timo Sirainen tss at iki.fi
Sun Sep 23 20:18:21 EEST 2007


On 23.9.2007, at 20.09, JC wrote:

>   passdb:
>     driver: sql
>     args: /etc/dovecot/dovecot-sql.conf
>   userdb:
>     driver: sql
>     args: /etc/dovecot/dovecot-sql.conf
>   userdb:
>     driver: prefetch

Your prefetch userdb is after userdb sql, which means that it's never  
used.

> password_query = SELECT email AS user, password, '/home/vmail/%d/% 
> n' AS
> userdb_home, 'maildir:/home/vmail/%d/%n' AS userdb_mail, 5000 AS  
> userdb_uid,
> 5000 AS userdb_gid FROM users WHERE email = '%u'

So these userdb_* fields here are pointless. If you moved prefetch  
before sql, it would be used. But if you do that, you'll have to make  
password_query return also userdb_quota field.

> user_query = SELECT '/home/vmail/%d/%n' AS home, 'maildir:/home/ 
> vmail/%d/%n' AS
> mail, 5000 AS uid, 5000 AS gid, CONCAT('maildir:storage=', ROUND 
> (quota/1000) )
> AS quota FROM users WHERE email = '%u'

Since you're returning quota here, it overrides completely what you  
have in plugin {}. So make the quota field returned by this SQL  
lookup include the :ignore=Trash.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20070923/27cb0f11/attachment.bin 


More information about the dovecot mailing list