[Dovecot] Per User Quotas with LDAP on Dovecot 1.x

Camron W. Fox cwfox at us.fujitsu.com
Fri Oct 15 22:29:02 EEST 2010


On 10/10/08 13:47, Aliet Santiesteban Sifontes wrote:
> Camron, if you look in the downloads link at dovecot site, you can can
> check:
> 
> http://wiki2.dovecot.org/PrebuiltBinaries#RPMs_of_newer_Dovecot_and_Sieve_packages
> 
> There you will find references to third party repositories wich build latest
> dovecot rpm versions for rhel5.5. If you will use atrpms follow the install
> instructions:
> 
> http://atrpms.net/documentation/install/
> 
> For dovecot 1.2
> http://packages.atrpms.net/dist/el5/dovecot-1.2.x/
> For dovecot 2.x
> http://packages.atrpms.net/dist/el5/dovecot/
> 
> Just import atrpms rpm key, configure the repo for rhel5 and use yum to
> install the desired packages...
> good luck...
> 
> 

Aliet,

	I took your advice and installed 1.2.14 from ATRPMS on a RHEL5.5 box,
but continue to have the same problem. I followed the procedures from
/usr/share/doc/dovecot-1.2.14/wiki/Quota.1.1.txt. Here are the pertinent
entries from dovecot.conf:

protocol imap {
  login_executable = /usr/libexec/dovecot/imap-login
  mail_executable = /usr/libexec/dovecot/imap
  mail_plugins = quota imap_quota mail_log
  mail_plugin_dir = /usr/lib64/dovecot/imap
  imap_client_workarounds = outlook-idle delay-newmail
}

auth default {
  mechanisms = plain
  passdb ldap {
    args = /etc/dovecot-ldap.conf
  }
  userdb ldap {
    args = /etc/dovecot-ldap.conf
  }
  user = nobody
  count = 1
  socket listen {
    master {
      path = /var/run/dovecot/auth-master
      mode = 0666
    }
    client {
      path = /var/run/dovecot/auth-client
      mode = 0660
    }
  }
}

plugin {
  quota = maildir:User quota
  quota_rule = *:storage=10M
  quota_rule2 = Trash:ignore
  quota_warning = storage=60%% /utils/bin/quota-warning.sh 60
  quota_warning2 = storage=55%% /utils/bin/quota-warning.sh 55
  quota_warning3 = storage=50%% /utils/bin/quota-warning.sh 50
}

	Here is the user_attr line from dovecot-ldap.conf:

user_attrs = uidNumber=uid,gidNumber=gid,mailQuotaSize=quota_rule=*:bytes=%$

	And the quota entry for the user:

dn: uid=$USER,ou=people,dc=example,dc=com
mailQuotaSize: 20971520

	Once again, dovecot-imap seems to read the info correctly, as the TBird
plugin reads 20MB as the user quota, but deliver begins to reject mail
at the 10MB default. Also, the quota warning messages are sent base on
the default, not the user override.

	Any help would be appreciated.

Best Regards,
Camron

-- 
Camron W. Fox
Hilo Office
High Performance Computing Group
Fujitsu Management Services of America, Inc.
E-mail:		cwfox at us.fujitsu.com



More information about the dovecot mailing list