Hi All,
I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it!
I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user.
I believe I need to add to a passwd file, but I have added to that and nothing has changed.
# dovecot -n
# 1.2.15: /etc/dovecot/dovecot.conf # OS: Linux 2.6.32-5-686 i686 Debian 6.0.5 log_timestamp: %Y-%m-%d %H:%M:%S protocols: imap imaps pop3 pop3s ssl_cert_file: /etc/ssl/certs/postfix.pem ssl_key_file: /etc/ssl/private/postfix.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(pop3): /usr/lib/dovecot/pop3-login mail_privileged_group: mail mail_location: maildir:~/mail:LAYOUT=fs:INBOX=~/mail/ mbox_write_locks: fcntl dotlock mail_executable(default): /usr/lib/dovecot/imap mail_executable(imap): /usr/lib/dovecot/imap mail_executable(pop3): /usr/lib/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/lib/dovecot/modules/imap mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3 lda: mail_plugins: quota auth default: mechanisms: plain login passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix plugin: quota: maildir:user quota quota_rule: *:storage=200M quota_rule2: Trash:storage=10%% quota_rule2: SPAM:ignore quota_warning: storage=95%% /usr/local/bin/quota-warning.sh 95 quota_warning2: storage=80%% /usr/local/bin/quota-warning.sh 80 quota_exceeded_message: Quota exceeded, Please delete some emails
Any help gratefully received
Dave
This email has been scanned for malicious content.
On 10/16/2012 11:39 AM, David Travers wrote:
Hi All,
I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it!
I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user.
I believe I need to add to a passwd file, but I have added to that and nothing has changed.
user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M
Example given on http://wiki.dovecot.org/UserDatabase/ExtraFields
Note that the extra fields are prefixed with userdb_ when placed in a passwd file.
Also, watch your quota_rule numbering. You have 2 rules with the same number (quota_rule2 for Trash and SPAM). In the passwd file, you are replacing the rule specified by number (no number technically being the first).
Jack
Hi Jake,
Yep, similar to what I had been trying, but it doesn't seem to be working.
In my /etc/passwd file I had the line:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash
I have changed it to show:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash:userdb_quota_rule=*:storage=100M
Do I have to put the " userdb_mail=mbox:~/mail " in as well as that is specified already in Dovecot?
Is there anything I need to do once specifying this in the passwd file as the quota limit is not being shown as changed in Open Xchange
Also yes, I noticed the numbering and have corrected.
Thanks for your quick reply.
Dave
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Jack Bates Sent: 17 October 2012 04:02 To: dovecot@dovecot.org Subject: Re: [Dovecot] Per user quotas
On 10/16/2012 11:39 AM, David Travers wrote:
Hi All,
I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it!
I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user.
I believe I need to add to a passwd file, but I have added to that and nothing has changed.
user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M
Example given on http://wiki.dovecot.org/UserDatabase/ExtraFields
Note that the extra fields are prefixed with userdb_ when placed in a passwd file.
Also, watch your quota_rule numbering. You have 2 rules with the same number (quota_rule2 for Trash and SPAM). In the passwd file, you are replacing the rule specified by number (no number technically being the first).
Jack
This email has been scanned for malicious content.
My recommendation is that you use Passwd-file instead of Passwd and specify /etc/passwd. I mention this, as Passwd can use NSS and may not give you the results you want. Passwd-file will guarantee you use the /etc/passwd file. Also, I'm not as familiar with v1.x, but I know in v2.1.10, a userdb lookup doesn't use the userdb_ prefix. So you can try it with and without that prefix. userdb_ prefix on v2 is for cases where you do a prefetch on the passdb.
I hope this helps. I've been using Passwd-file only for proxy settings and ldap for my backends to handle quota.
Jack
On 10/17/2012 2:42 AM, David Travers wrote:
Hi Jake,
Yep, similar to what I had been trying, but it doesn't seem to be working.
In my /etc/passwd file I had the line:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash
I have changed it to show:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash:userdb_quota_rule=*:storage=100M
Do I have to put the " userdb_mail=mbox:~/mail " in as well as that is specified already in Dovecot?
Is there anything I need to do once specifying this in the passwd file as the quota limit is not being shown as changed in Open Xchange
Also yes, I noticed the numbering and have corrected.
Thanks for your quick reply.
Dave
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Jack Bates Sent: 17 October 2012 04:02 To: dovecot@dovecot.org Subject: Re: [Dovecot] Per user quotas
On 10/16/2012 11:39 AM, David Travers wrote:
Hi All,
I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it!
I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user.
I believe I need to add to a passwd file, but I have added to that and nothing has changed.
user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M
Example given on http://wiki.dovecot.org/UserDatabase/ExtraFields
Note that the extra fields are prefixed with userdb_ when placed in a passwd file.
Also, watch your quota_rule numbering. You have 2 rules with the same number (quota_rule2 for Trash and SPAM). In the passwd file, you are replacing the rule specified by number (no number technically being the first).
Jack
This email has been scanned for malicious content.
Correct, except I wouldn't go modifying /etc/passwd directly in any case. Other software besides Dovecot might not like it. Better to create a whole new /etc/dovecot/passwd or something.
On 17.10.2012, at 16.44, Jack Bates wrote:
My recommendation is that you use Passwd-file instead of Passwd and specify /etc/passwd. I mention this, as Passwd can use NSS and may not give you the results you want. Passwd-file will guarantee you use the /etc/passwd file. Also, I'm not as familiar with v1.x, but I know in v2.1.10, a userdb lookup doesn't use the userdb_ prefix. So you can try it with and without that prefix. userdb_ prefix on v2 is for cases where you do a prefetch on the passdb.
I hope this helps. I've been using Passwd-file only for proxy settings and ldap for my backends to handle quota.
Jack
On 10/17/2012 2:42 AM, David Travers wrote:
Hi Jake,
Yep, similar to what I had been trying, but it doesn't seem to be working.
In my /etc/passwd file I had the line:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash
I have changed it to show:- dave:x:1000:1000:David Travers,,,:/home/dave:/bin/bash:userdb_quota_rule=*:storage=100M
Do I have to put the " userdb_mail=mbox:~/mail " in as well as that is specified already in Dovecot?
Is there anything I need to do once specifying this in the passwd file as the quota limit is not being shown as changed in Open Xchange
Also yes, I noticed the numbering and have corrected.
Thanks for your quick reply.
Dave
-----Original Message----- From: dovecot-bounces@dovecot.org [mailto:dovecot-bounces@dovecot.org] On Behalf Of Jack Bates Sent: 17 October 2012 04:02 To: dovecot@dovecot.org Subject: Re: [Dovecot] Per user quotas
On 10/16/2012 11:39 AM, David Travers wrote:
Hi All,
I keep going round in circles with this. I have quotas up and running but would like to add a couple of per user exceptions but can't figure out how to do it!
I am using Open Xchange community edition on top of dovecot and tha tis showing the 200MB limit, if I change it in the dovecot.conf the change is reflected in open xchange, but can't figure out how to change for 1 user.
I believe I need to add to a passwd file, but I have added to that and nothing has changed.
user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M
Example given on http://wiki.dovecot.org/UserDatabase/ExtraFields
Note that the extra fields are prefixed with userdb_ when placed in a passwd file.
Also, watch your quota_rule numbering. You have 2 rules with the same number (quota_rule2 for Trash and SPAM). In the passwd file, you are replacing the rule specified by number (no number technically being the first).
Jack
This email has been scanned for malicious content.
participants (3)
-
David Travers
-
Jack Bates
-
Timo Sirainen