Re: [Dovecot] Per user quotas
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-boun...@dovecot.org [mailto:dovecot-boun...@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. >> _ >> >
Re: [Dovecot] Per user quotas
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-boun...@dovecot.org [mailto:dovecot-boun...@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. _
Re: [Dovecot] Per user quotas
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-boun...@dovecot.org [mailto:dovecot-boun...@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. _
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
Re: [Dovecot] per-user quotas
Hello, Thanks for your replies so far. Still having issues with per-user quotas. To my Mysql virtual_users table I've added a column quota_kb and for a test user I've added in a value of 25 going for a 250 megabyte quota. I've tried various sql queries they're returning empty sets not pulling out the information needed. Thanks. Dave. On 10/12/12, Daniel Parthey wrote: > Hi Dave, > > David Mehler wrote: >> Thanks for your reply. I've written you directly as it is sounding >> like at least for now this isn't dovecot it's well a mysql issue with >> design. I don't have anything in my database setup with regards quota >> I've included it below. I've got one virtual mail user called vmail >> with UID/GID of 5000 who owns all the virtual mailboxes. If I'm >> understanding what I've read in the link, the dovecot wiki and your >> message since anything in a user section of Mysql will override the >> global configuration in 90-quota.conf, that being the case I should >> add an extra column to virtual users? Once that's done adjust the >> userdb query for dovecot to return quota information? > > Yes, the quota should be stored in an additional userdb column, > or you need at least an SQL statement which takes a username > and returns a quota rule. > > Quota of 0 is interpreted as "unlimited" by dovecot. > As already said, if the value in the quota column for the > user is 0, your SQL statement could also return a different > value (default quota) instead of 0 (using MySQL CASE/ELSE statement). > > Here is a short documentation on how it is done with Tine 2.0 Groupware: > http://www.tine20.org/wiki/index.php/Admins/Mailserver_integration > (it is a simple example which does not support a default quota fallback, > since Tine 2.0 writes the default quota as a value into the column > when the user is created) > > Regards > Daniel > -- > https://plus.google.com/103021802792276734820 >
Re: [Dovecot] per-user quotas
Hi Dave, David Mehler wrote: > I've got quotas set up on an all-user basis on my system, it's a > Postfix, Dovecot, Mysql virtual users setup. Currently I have each > user getting a 1GB quota with these settings in 90-quota.conf: > > plugin { > quota_rule = *:storage=1G > quota_rule2 = Trash:storage=+100M > } > plugin { > quota = maildir:User quota > } > > While this works it's not what I want for all users. Say I add a > virtual user called user1 to the mysql database but he's a test user > and I only want that user to have 25 megabytes of storage, reading the > wiki on quotas per-user items such as for example in a database > overrides the global items above, is this right? > > If so, I'm hoping I'm not going to have to redo my entire user > database, some users will have per-user quotas while I'll let others > have the global quota. You can just make your SQL query a bit more sophisticated in order to fit your needs. MySQL supports SQL CASE statement and default value with ELSE: http://dev.mysql.com/doc/refman/5.1/en/case.html This example sets quota to unlimited if mail comes in via port 20025, otherwise is uses the quota_bytes and quota_message columns: user_query = SELECT username AS user, \ home as home, \ uid as uid, \ gid as gid, \ CASE '%a' \ WHEN '20025' THEN '*:bytes=0:messages=0' \ ELSE \ CONCAT('*:bytes=', CAST(quota_bytes AS CHAR), ':messages=', CAST(quota_message AS CHAR)) \ END AS `quota_rule` \ FROM dovecot_users \ WHERE username='%u' Regards Daniel -- https://plus.google.com/103021802792276734820
Re: [Dovecot] per-user quotas
Hello, I'm running Dovecot 2.1.10. Thanks. Dave. On 10/11/12, Tibby wrote: > Hello! > > What's the version of your dovecot? 1.2.X ? or 2.0 ? > > Tibby > > On Oct 11, 2012, at 10:40 PM, David Mehler wrote: > >> Hello, >> >> I've got quotas set up on an all-user basis on my system, it's a >> Postfix, Dovecot, Mysql virtual users setup. Currently I have each >> user getting a 1GB quota with these settings in 90-quota.conf: >> >> plugin { >> quota_rule = *:storage=1G >> quota_rule2 = Trash:storage=+100M >> } >> plugin { >> quota = maildir:User quota >> } >> >> While this works it's not what I want for all users. Say I add a >> virtual user called user1 to the mysql database but he's a test user >> and I only want that user to have 25 megabytes of storage, reading the >> wiki on quotas per-user items such as for example in a database >> overrides the global items above, is this right? >> >> If so, I'm hoping I'm not going to have to redo my entire user >> database, some users will have per-user quotas while I'll let others >> have the global quota. >> >> Thanks. >> Dave. > >
Re: [Dovecot] per-user quotas
Hello! What's the version of your dovecot? 1.2.X ? or 2.0 ? Tibby On Oct 11, 2012, at 10:40 PM, David Mehler wrote: > Hello, > > I've got quotas set up on an all-user basis on my system, it's a > Postfix, Dovecot, Mysql virtual users setup. Currently I have each > user getting a 1GB quota with these settings in 90-quota.conf: > > plugin { > quota_rule = *:storage=1G > quota_rule2 = Trash:storage=+100M > } > plugin { > quota = maildir:User quota > } > > While this works it's not what I want for all users. Say I add a > virtual user called user1 to the mysql database but he's a test user > and I only want that user to have 25 megabytes of storage, reading the > wiki on quotas per-user items such as for example in a database > overrides the global items above, is this right? > > If so, I'm hoping I'm not going to have to redo my entire user > database, some users will have per-user quotas while I'll let others > have the global quota. > > Thanks. > Dave.
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/27 09:56, Jerry wrote: > On Wed, 27 Oct 2010 09:11:02 -1000 > Camron W. Fox articulated: > >> On 10/10/19 08:01, Timo Sirainen wrote: >>> No. The username is sent another way to deliver. Anyway, I think -d >>> $RECIPIENT is the right way. >>> >> Timo, >> >> I modified the mailbox command in /etc/postfix/main.cf: >> >> mailbox_command = /usr/libexec/dovecot/deliver -d ${recipient} >> >> This causes postfix to bounce the message with this error: >> >> Oct 27 09:06:57 rb8 postfix/local[1931]: A99494E0D25: >> to=, relay=local, delay=10, >> delays=0.08/0/0/10, dsn=5.3.0, status=bounced (command line usage >> error. Command output: Fatal: Missing -d argument ) > > See: http://www.postfix.com/postconf.5.html#mailbox_command > > If you still cannot get it to work, I would suggest asking on the > Postfix forum since it is issuing the error message. > Jerry, Perfect. I was looking for $USER, not $RECIPIENT. Thank you both for your help. Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On Wed, 27 Oct 2010 09:11:02 -1000 Camron W. Fox articulated: > On 10/10/19 08:01, Timo Sirainen wrote: > > No. The username is sent another way to deliver. Anyway, I think -d > > $RECIPIENT is the right way. > > > Timo, > > I modified the mailbox command in /etc/postfix/main.cf: > > mailbox_command = /usr/libexec/dovecot/deliver -d ${recipient} > > This causes postfix to bounce the message with this error: > > Oct 27 09:06:57 rb8 postfix/local[1931]: A99494E0D25: > to=, relay=local, delay=10, > delays=0.08/0/0/10, dsn=5.3.0, status=bounced (command line usage > error. Command output: Fatal: Missing -d argument ) See: http://www.postfix.com/postconf.5.html#mailbox_command If you still cannot get it to work, I would suggest asking on the Postfix forum since it is issuing the error message. -- Jerry ✌ dovecot.u...@seibercom.net Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the Reply-To header. __
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 27.10.2010, at 21.11, Camron W. Fox wrote: > mailbox_command = /usr/libexec/dovecot/deliver -d ${recipient} > > This causes postfix to bounce the message with this error: > > Oct 27 09:06:57 rb8 postfix/local[1931]: A99494E0D25: > to=, relay=local, delay=10, > delays=0.08/0/0/10, dsn=5.3.0, status=bounced (command line usage error. > Command output: Fatal: Missing -d argument ) -d has no argument, i.e. ${recipient} expands to empty. Maybe it's case sensitive? Try ${RECIPIENT} ? If not, find something else from Postfix docs..
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/19 08:01, Timo Sirainen wrote: > No. The username is sent another way to deliver. Anyway, I think -d > $RECIPIENT is the right way. > Timo, I modified the mailbox command in /etc/postfix/main.cf: mailbox_command = /usr/libexec/dovecot/deliver -d ${recipient} This causes postfix to bounce the message with this error: Oct 27 09:06:57 rb8 postfix/local[1931]: A99494E0D25: to=, relay=local, delay=10, delays=0.08/0/0/10, dsn=5.3.0, status=bounced (command line usage error. Command output: Fatal: Missing -d argument ) Any ideas? Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On Mon, 2010-10-18 at 13:09 -1000, Camron W. Fox wrote: > > Looking at the logs, it appears that it must already be using -d $user > because of the username shown in the deliver lines in dovecot.log, right? No. The username is sent another way to deliver. Anyway, I think -d $RECIPIENT is the right way.
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/18 11:28, Timo Sirainen wrote: > On 18.10.2010, at 20.42, Camron W. Fox wrote: > >>> You're not calling deliver with -d parameter? >> >> No. Did I miss that in the documentation? Where is that configured? >> This is what I have in postfix main.cf: >> >> mailbox_command = /usr/libexec/dovecot/deliver > > Often that's done with system users who have no extra stuff in userdb. I'm > not sure how to configure it right. Try something like: > > mailbox_command = /usr/libexec/dovecot/deliver -d $user > > If that doesn't work, look into Postfix docs to find out what $user should be > replaced with. > > > Timo, Looking at the logs, it appears that it must already be using -d $user because of the username shown in the deliver lines in dovecot.log, right? Oct 15 09:07:05 deliver(loadtest): Info: Loading modules from directory: /usr/lib64/dovecot/lda Oct 15 09:07:05 deliver(loadtest): Info: Module loaded: /usr/lib64/dovecot/lda/lib10_quota_plugin.so Oct 15 09:07:05 deliver(loadtest): Info: Module loaded: /usr/lib64/dovecot/lda/lib20_mail_log_plugin.so Oct 15 09:07:05 deliver(loadtest): Info: Quota root: name=User quota backend=maildir args= Oct 15 09:07:05 deliver(loadtest): Info: Quota rule: root=User quota mailbox=* bytes=10485760 messages=0 Oct 15 09:07:05 deliver(loadtest): Info: Quota rule: root=User quota mailbox=Trash ignored Oct 15 09:07:05 deliver(loadtest): Info: Quota warning: bytes=6291456 (60%) messages=0 command=/utils/bin/ quota-warning.sh 60 Oct 15 09:07:05 deliver(loadtest): Info: Quota warning: bytes=5767168 (55%) messages=0 command=/utils/bin/ quota-warning.sh 55 Oct 15 09:07:05 deliver(loadtest): Info: Quota warning: bytes=5242880 (50%) messages=0 command=/utils/bin/ quota-warning.sh 50 Oct 15 09:07:05 deliver(loadtest): Info: maildir: data=/var/spool/mail/loadtest Oct 15 09:07:05 deliver(loadtest): Info: maildir++: root=/var/spool/mail/loadtest, index=, control=, inbox =/var/spool/mail/loadtest Oct 15 09:07:05 deliver(loadtest): Info: Namespace : Using permissions from /var/spool/mail/loadtest: mode =0755 gid=-1 Oct 15 09:07:05 deliver(loadtest): Info: msgid=<20101015190702.0d4ac640...@loa.subaru.nao.ac.jp>: save fai led to INBOX: Quota exceeded (mailbox for user is full) Oct 15 09:07:05 deliver(loadtest): Info: msgid=<20101015190702.0d4ac640...@loa.subaru.nao.ac.jp>: rejected : Quota exceeded (mailbox for user is full) Oct 15 09:07:05 deliver(loadtest): Info: Sending a rejection to loadtest: Quota exceeded (mailbox for user is full) Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 18.10.2010, at 20.42, Camron W. Fox wrote: >> You're not calling deliver with -d parameter? > > No. Did I miss that in the documentation? Where is that configured? > This is what I have in postfix main.cf: > > mailbox_command = /usr/libexec/dovecot/deliver Often that's done with system users who have no extra stuff in userdb. I'm not sure how to configure it right. Try something like: mailbox_command = /usr/libexec/dovecot/deliver -d $user If that doesn't work, look into Postfix docs to find out what $user should be replaced with.
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/18 04:15, Timo Sirainen wrote: > On Fri, 2010-10-15 at 09:29 -1000, Camron W. Fox wrote: > >> 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. > > You're not calling deliver with -d parameter? > > > Timo, No. Did I miss that in the documentation? Where is that configured? This is what I have in postfix main.cf: mailbox_command = /usr/libexec/dovecot/deliver Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On Fri, 2010-10-15 at 09:29 -1000, Camron W. Fox wrote: > 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. You're not calling deliver with -d parameter?
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
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: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 7.10.2010, at 22.12, Camron W. Fox wrote: > Dovecot-imap appear to recognize the quota from ldap, as the > Thunderbird quota plugin reads the correct info from LDAP if the > mailQuotaSize entry exists, and the default storage=10240 from > doveconf.conf if there is no LDAP attr. ok, so > However, deliver bounces the mails with a quota exceeded message: you mean deliver doesn't read the quota from ldap and just uses the default? Are you calling it with -d parameter? Otherwise it doesn't do userdb lookup at all.
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
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... 2010/10/8 Camron W. Fox > On 10/10/08 08:59, Charles Marcus wrote: > > On 2010-10-08 2:10 PM, Camron W. Fox wrote: > >> I started poking @ 1.2 as you suggested, but I run into libcurl-devel > >> dependency issues. Does anyone know where to get a libcurl-devel RPM for > >> RHEL5? > > > > I'd think you could get everything you needed from the extra > > repositories (I think RHEL uses the CentOS repos)... > > > You would think so, but no. I checked all the CentOS additional > repositories on my mrepo server here with no luck. That's why I asked. I > really want to stay with package installations and away from source if I > can. > > Best Regards, > Camron > > -- > Camron W. Fox > Hilo Office > High Performance Computing Group > Fujitsu Management Services of America, Inc. > E-mail: cw...@us.fujitsu.com > >
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/08 08:59, Charles Marcus wrote: > On 2010-10-08 2:10 PM, Camron W. Fox wrote: >> I started poking @ 1.2 as you suggested, but I run into libcurl-devel >> dependency issues. Does anyone know where to get a libcurl-devel RPM for >> RHEL5? > > I'd think you could get everything you needed from the extra > repositories (I think RHEL uses the CentOS repos)... > You would think so, but no. I checked all the CentOS additional repositories on my mrepo server here with no luck. That's why I asked. I really want to stay with package installations and away from source if I can. Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 2010-10-08 2:10 PM, Camron W. Fox wrote: > I started poking @ 1.2 as you suggested, but I run into libcurl-devel > dependency issues. Does anyone know where to get a libcurl-devel RPM for > RHEL5? I'd think you could get everything you needed from the extra repositories (I think RHEL uses the CentOS repos)... -- Best regards, Charles
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/07 10:08, Charles Marcus wrote: > On 2010-10-07 3:38 PM, Camron W. Fox wrote: >> If we upgrade, then we lose RH support for any future dovecot issues >> (not that they're being particularly helpful with this issue). > > Personally I think you'd get much higher quality support for free right > here from the developer himself... > > But of course, when dealing with PHBs, logic and reality sometimes take > a back-seat to silliness - like being forced to stick with ancient > versions of software 'just because'. > Charles, I started poking @ 1.2 as you suggested, but I run into libcurl-devel dependency issues. Does anyone know where to get a libcurl-devel RPM for RHEL5? Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/07 10:08, Charles Marcus wrote: > On 2010-10-07 3:38 PM, Camron W. Fox wrote: >> If we upgrade, then we lose RH support for any future dovecot issues >> (not that they're being particularly helpful with this issue). > > Personally I think you'd get much higher quality support for free right > here from the developer himself... > > But of course, when dealing with PHBs, logic and reality sometimes take > a back-seat to silliness - like being forced to stick with ancient > versions of software 'just because'. > Wait, *you're* not my customer, are you? That certainly sounded like them... -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 2010-10-07 3:38 PM, Camron W. Fox wrote: > If we upgrade, then we lose RH support for any future dovecot issues > (not that they're being particularly helpful with this issue). Personally I think you'd get much higher quality support for free right here from the developer himself... But of course, when dealing with PHBs, logic and reality sometimes take a back-seat to silliness - like being forced to stick with ancient versions of software 'just because'. -- Best regards, Charles
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 07/10/2010 20:38, Camron W. Fox wrote: If we upgrade, then we lose RH support for any future dovecot issues And if you don't upgrade, you don't get any support from the guy who wrote Dovecot and therefore knows it inside-out :-) I tend to suggest the practice of: Keep your server "on distro" for the most part, but don't be shy of putting a carefully-chosen handful of packages "off distro" where you get a useful "win". (not that they're being particularly helpful with this issue). Keep on with that line of thinking :-) Bill
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 10/10/07 09:17, Charles Marcus wrote: > On 2010-10-07 3:12 PM, Camron W. Fox wrote: >> We're running Dovecot V1.0.7 on RHEL5.5, > > Very old, you will not get much support unless/until you upgrade... > 1.2.15 is recommended for most, although 2.0.5 is current stable... > > Lots of changes with respect to quotas (and everything else)... > Charles, If we upgrade, then we lose RH support for any future dovecot issues (not that they're being particularly helpful with this issue). Best Regards, Camron -- Camron W. Fox Hilo Office High Performance Computing Group Fujitsu Management Services of America, Inc. E-mail: cw...@us.fujitsu.com
Re: [Dovecot] Per User Quotas with LDAP on Dovecot 1.x
On 2010-10-07 3:12 PM, Camron W. Fox wrote: > We're running Dovecot V1.0.7 on RHEL5.5, Very old, you will not get much support unless/until you upgrade... 1.2.15 is recommended for most, although 2.0.5 is current stable... Lots of changes with respect to quotas (and everything else)... -- Best regards, Charles Marcus I.T. Director Media Brokers International, Inc. 678.514.6200 x224 | 678.514.6299 fax
Re: [Dovecot] Per-user quotas aren't working
On Fri, 2010-07-02 at 12:58 +, Guillaume CHARREYRON wrote: > Well, I just put it in Postfix, like it is said in Dovecot Wiki: > mailbox_command = /usr/libexec/dovecot/deliver > > because I do use system users for postfix too, I have no virtual users. > deliver -d in postfix is only for virtual users, which I can't use. > Is there another way? -d isn't only for virtual users. It's just not usually required for system users, because they don't usually need a userdb lookup. But you do need it. So add -d ${user} or something to mailbox_command. Also you need to make sure that it has enough permissions to access the auth-master socket (and if it doesn't exist yet, create it as described in http://wiki.dovecot.org/LDA).
Re: [Dovecot] Per-user quotas aren't working
Well, I just put it in Postfix, like it is said in Dovecot Wiki: mailbox_command = /usr/libexec/dovecot/deliver because I do use system users for postfix too, I have no virtual users. deliver -d in postfix is only for virtual users, which I can't use. Is there another way? --- En date de : Ven 2.7.10, Timo Sirainen a écrit : > De: Timo Sirainen > Objet: Re: [Dovecot] Per-user quotas aren't working > À: "Guillaume CHARREYRON" > Cc: dovecot@dovecot.org > Date: Vendredi 2 juillet 2010, 14h28 > On Fri, 2010-07-02 at 12:18 +, > Guillaume CHARREYRON wrote: > > dovecot: Jul 02 12:55:32 Info: auth(default): master > out: USER 1 > test-oper > uid=501 gid=501 home=/home/test-oper > quota_rule=*:bytes=20M > > Looks ok. The user should have 20 MB quota. > > > dovecot: Jul 02 12:55:32 Info: pop3-login: Login: > user=, method=PLAIN, rip=192.168.4.239, > lip=192.168.4.239, secured > > deliver(test-oper): Jul 02 12:55:47 Info: > > msgid=<11c5.0003.0...@test.mymail.srv>: > save failed to INBOX: Quota exceeded (mailbox for user is > full) > > Looks like you're not calling deliver with -d parameter? > Then it's not > doing userdb lookup. > > >
Re: [Dovecot] Per-user quotas aren't working
On Fri, 2010-07-02 at 12:18 +, Guillaume CHARREYRON wrote: > dovecot: Jul 02 12:55:32 Info: auth(default): master out: USER 1 > test-oper uid=501 gid=501 home=/home/test-operquota_rule=*:bytes=20M Looks ok. The user should have 20 MB quota. > dovecot: Jul 02 12:55:32 Info: pop3-login: Login: user=, > method=PLAIN, rip=192.168.4.239, lip=192.168.4.239, secured > deliver(test-oper): Jul 02 12:55:47 Info: > msgid=<11c5.0003.0...@test.mymail.srv>: save failed to INBOX: Quota exceeded > (mailbox for user is full) Looks like you're not calling deliver with -d parameter? Then it's not doing userdb lookup.
Re: [Dovecot] Per User Quotas
Do the "args" point to same file now in passdb ldap and userdb ldap? On Fri, 2009-10-16 at 15:17 -0500, Peter Fraser wrote: > Yes, the servers are up servicing clients and my production mail > server with dovecot even uses it to authenticate users for email. They > are all up and running. > > On Fri, Oct 16, 2009 at 3:02 PM, Timo Sirainen wrote: > > On Fri, 2009-10-16 at 14:55 -0500, Peter Fraser wrote: > > > >> dovecot: Oct 16 10:09:27 Error: auth(default): LDAP: Connection lost > >> to LDAP server, reconnecting > > .. > >> dovecot: Oct 16 10:51:30 Info: auth(default):p > >> ldap(peter.fraser,192.168.1.112): Aborting (timeout), we're not > >> connected to LDAP server > > > > That seems to be your problem. Is LDAP working at all? > > > > > signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
Yes, the servers are up servicing clients and my production mail server with dovecot even uses it to authenticate users for email. They are all up and running. On Fri, Oct 16, 2009 at 3:02 PM, Timo Sirainen wrote: > On Fri, 2009-10-16 at 14:55 -0500, Peter Fraser wrote: > >> dovecot: Oct 16 10:09:27 Error: auth(default): LDAP: Connection lost >> to LDAP server, reconnecting > .. >> dovecot: Oct 16 10:51:30 Info: auth(default):p >> ldap(peter.fraser,192.168.1.112): Aborting (timeout), we're not >> connected to LDAP server > > That seems to be your problem. Is LDAP working at all? > >
Re: [Dovecot] Per User Quotas
On Fri, 2009-10-16 at 14:55 -0500, Peter Fraser wrote: > dovecot: Oct 16 10:09:27 Error: auth(default): LDAP: Connection lost > to LDAP server, reconnecting .. > dovecot: Oct 16 10:51:30 Info: auth(default): > ldap(peter.fraser,192.168.1.112): Aborting (timeout), we're not > connected to LDAP server That seems to be your problem. Is LDAP working at all? signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
Well I did all that and when I look at the properties for the inbox in thunderbird under quotas, It still shows 512MB for that user. These are the logs below: dovecot: Oct 16 09:54:44 Info: dovecot v1.1.16 starting up dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32854 dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32855 dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32856 dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32857 dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32858 dovecot: Oct 16 09:54:46 Info: auth(default): new auth connection: pid=32859 dovecot: Oct 16 10:09:27 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:09:57 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:24:27 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:24:57 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:36:33 Info: auth(default): new auth connection: pid=32984 dovecot: Oct 16 10:36:35 Info: auth(default): client in: AUTH1 PLAIN service=imapsecured lip=192.168.1.80 rip=192.168.1.112 lport=993 rport=1857 dovecot: Oct 16 10:36:35 Info: auth(default): client out: CONT 1 dovecot: Oct 16 10:36:35 Info: auth(default): client in: CONT dovecot: Oct 16 10:36:35 Info: auth-worker(default): pam(peter.fraser,192.168.1.112): lookup service=dovecot dovecot: Oct 16 10:36:35 Info: auth-worker(default): pam(peter.fraser,192.168.1.112): #1/1 style=1 msg=Password: dovecot: Oct 16 10:36:35 Info: auth-worker(default): pam(peter.fraser,192.168.1.112): pam_authenticate() failed: authentication error (password mismatch?) dovecot: Oct 16 10:36:35 Info: auth(default): client out: OK1 user=peter.fraser dovecot: Oct 16 10:36:35 Info: auth(default): master in: REQUEST1 32859 1 dovecot: Oct 16 10:36:35 Info: auth(default): ldap(peter.fraser,192.168.1.112): user search: base=dc=atlas,dc=local scope=subtree filter=(&(objectClass=person)(userprincipalname=peter.fra...@atlas.local)) fields=description dovecot: Oct 16 10:39:35 Info: imap-login: Disconnected: Inactivity (auth failed, 1 attempts): user=, method=PLAIN, rip=192.168.1.112, lip=192.168.1.80, TLS dovecot: Oct 16 10:46:31 Info: auth(default): new auth connection: pid=33006 dovecot: Oct 16 10:49:30 Info: imap-login: Disconnected: Inactivity (no auth attempts): rip=192.168.1.112, lip=192.168.1.80, TLS handshaking dovecot: Oct 16 10:51:28 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:51:28 Error: auth(default): LDAP: Connection lost to LDAP server, reconnecting dovecot: Oct 16 10:51:30 Info: auth(default): ldap(peter.fraser,192.168.1.112): Aborting (timeout), we're not connected to LDAP server dovecot: Oct 16 10:51:30 Info: auth(default): master out: USER1 peter.fraseruid=1002gid=1002 home=/home/vmail/peter.fraser dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Loading modules from directory: /usr/local/lib/dovecot/imap dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Module loaded: /usr/local/lib/dovecot/imap/lib10_quota_plugin.so dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Module loaded: /usr/local/lib/dovecot/imap/lib11_imap_quota_plugin.so dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Effective uid=1002, gid=1002, home=/home/vmail/peter.fraser dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Quota root: name= backend=maildir args= dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Quota rule: root= mailbox=* bytes=536870912 messages=0 dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Quota rule: root= mailbox=Trash bytes=10485760 messages=0 dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Quota rule: root= mailbox=SPAM ignored dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Quota root: name=user quota backend=maildir args= dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): maildir: data=~/Maildir dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): maildir++: root=/home/vmail/peter.fraser/Maildir, index=, control=, inbox=/home/vmail/peter.fraser/Maildir dovecot: Oct 16 10:51:30 Info: IMAP(peter.fraser): Connection closed bytes=0/0 On Fri, Oct 16, 2009 at 1:31 AM, thedoghousemailcom wrote: > Hi Peter, > > please insert 1024M in the description field in active directory. > > Greetings > > >> And of course, I put in a users description field in Active Directory >> *:bytes=%1024 >> >> When I log in as that user, and check the quota, I'm still seeing 512 MB >> >> Very strange. >> >> > > >
Re: [Dovecot] Per User Quotas
Hi Peter, please insert 1024M in the description field in active directory. Greetings And of course, I put in a users description field in Active Directory *:bytes=%1024 When I log in as that user, and check the quota, I'm still seeing 512 MB Very strange.
Re: [Dovecot] Per User Quotas
On Thu, 2009-10-15 at 16:15 -0500, Peter Fraser wrote: > When I log in as that user, and check the quota, I'm still seeing 512 MB > > Very strange. auth_debug=yes, mail_debug=yes makes Dovecot log exactly what it's doing. No point in guessing what the problem is. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
Ok thanks I tried your config. Just edited to my my setup. This is what I now have dovecot.conf --- passdb ldap { args = /usr/local/etc/dovecot-ldap.conf } userdb ldap { args = /usr/local/etc/dovecot-ldap-userdb.conf } userdb static { args = uid=1002 gid=1002 home=/home/vmail/%u allow_all_users=yes } --- dovecot-ldap.conf --- hosts = 192.168.0.97 192.168.0.76 base = dc=atlas,dc=local auth_bind = yes auth_bind_userdn = atlas\%u #auth_bind_userdn = atlas\%u user_filter = (&(objectClass=person)(cn=%u)) user_attrs = homeDirectory=home=/home/vmail/%u,description=quota_rule=*:bytes=%$ -- dovecot-ldap-userdb.conf --- hosts = 192.168.0.97 192.168.0.76 base = dc=atlas,dc=local ldap_version = 3 auth_bind = no dn = atlas\user dnpass = password user_filter = (&(objectClass=person)(userprincipalname...@atlas.local)) user_attrs = description=quota_rule=*:bytes=%$ And of course, I put in a users description field in Active Directory *:bytes=%1024 When I log in as that user, and check the quota, I'm still seeing 512 MB Very strange.
Re: [Dovecot] Per User Quotas
Hi Peter, this is my working dovecot-configuration: Dovecot 1.2.4 dovecot.conf (extract) -- username_translation: @_._ passdb: driver: ldap args: /etc/dovecot-ldap.conf userdb: driver: ldap args: /etc/dovecot-ldap-userdb.conf userdb: driver: static args: uid=500 gid=500 home=/home/vmail/%Lu allow_all_users=yes dovecot-ldap.conf --- hosts = 1.2.3.4 1.2.3.5 base = DC=first,DC=bank,DC=com ldap_version = 3 auth_bind = yes auth_bind_userdn = %...@first.bank.com user_filter = (&(objectClass=person)(cn=%u)) user_attrs = homeDirectory=home=/home/vmail/%Lu,description=quota_rule=*:bytes=%$ dovecot-ldap-userdb.conf --- hosts = 1.2.3.4 1.2.3.5 base = DC=first,DC=bank,DC=com ldap_version = 3 auth_bind = no dn =first\domain-user dnpass = password user_filter = (&(objectClass=person)(userprincipalname...@first.bank.com)) user_attrs = description=quota_rule=*:bytes=%$ Peter Fraser schrieb: OK this is what I now have. In dovecot.conf I put: userdb ldap { args = /usr/local/etc/dovecot-ldap.conf } In dovecot-ldap.conf: hosts = 192.168.1.97 base = dc=atlas,dc=local auth_bind = yes scope = subtree auth_bind_userdn = atlas\%u user_filter = (&(objectClass=mailUser)(mail=%u)) default_pass_scheme = CRYPT pass_filter = (&(objectclass=person)(uid=%u)) pass_attrs = userPassword=password user_attrs = streetAddress=quota_rule=*:storage=%$M ,=uid=uid,=gid=gid,=home=/home/vmail/%u And the quota in street address of AD When I fire up thunderbird now, I see sending login information for a long time before it comes up and even when it does, I still see the general quota. On Thu, Oct 15, 2009 at 12:40 PM, Timo Sirainen wrote: On Thu, 2009-10-15 at 19:36 +0200, thedoghousemailcom wrote: Hi Peter + Timo, I think the solution is the right order in dovecot.conf: "userdb ldap" should stand in front of "userdb static". Well, if that's done then userdb static is used only when user isn't found from ldap. And I guess that should normally never happen..
Re: [Dovecot] Per User Quotas
Here they are mail# dovecot -n # 1.1.16: /usr/local/etc/dovecot.conf # OS: FreeBSD 7.2-RELEASE-p1 i386 protocols: imaps pop3s imap ssl_cert_file: /usr/local/etc/dovecot/ssl/certs/dovecot.pem ssl_key_file: /usr/local/etc/dovecot/ssl/private/dovecot.pem ssl_cipher_list: ALL:!ADH!LOW:!SSLv2:!EXP:+HIGH:+MEDIUM disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_greeting: POP3 Server ready. verbose_proctitle: yes first_valid_gid: 0 mail_access_groups: mail mail_location: maildir:~/Maildir mail_debug: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 imap_client_workarounds(default): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh auth default: username_format: %Lu debug: yes passdb: driver: pam passdb: driver: ldap args: /usr/local/etc/dovecot-ldap.conf userdb: driver: ldap args: /usr/local/etc/dovecot-ldap.conf userdb: driver: passwd plugin: quota: maildir quota2: maildir:user quota quota_rule: *:storage=512M quota_rule2: Trash:storage=10M quota_rule3: SPAM:ignore Maillog Below Oct 15 14:44:22 mail dovecot: dovecot v1.1.16 starting up Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27040 Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27038 Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27039 Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27041 Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27042 Oct 15 14:44:23 mail dovecot: auth(default): new auth connection: pid=27043 Oct 15 14:45:43 mail dovecot: auth(default): new auth connection: pid=27048 Oct 15 14:45:45 mail dovecot: auth(default): client in: AUTH1 PLAIN service=imapsecured lip=192.168.1.80 rip=192.168.1. Oct 15 14:45:45 mail dovecot: auth(default): client out: CONT 1 Oct 15 14:45:45 mail dovecot: auth(default): client in: CONT Oct 15 14:45:45 mail dovecot: auth-worker(default): pam(peter.fraser,192.168.1.112): lookup service=dovecot Oct 15 14:45:45 mail dovecot: auth-worker(default): pam(peter.fraser,192.168.1.112): #1/1 style=1 msg=Password: Oct 15 14:45:45 mail dovecot: auth-worker(default): pam(peter.fraser,192.168.1.112): pam_authenticate() failed: authentication error (password Oct 15 14:45:45 mail dovecot: auth(default): client out: OK 1 user=peter.fraser Oct 15 14:45:45 mail dovecot: auth(default): master in: REQUEST 1 27043 1 Oct 15 14:45:45 mail dovecot: auth(default): ldap(peter.fraser,192.168.1.112): user search: base=dc=atlas,dc=local scope=subtree filter=(&(obj Oct 15 14:47:28 mail postfix/scache[26993]: statistics: start interval Oct 15 14:44:08 On Thu, Oct 15, 2009 at 2:25 PM, Timo Sirainen wrote: > On Thu, 2009-10-15 at 14:11 -0500, Peter Fraser wrote: >> user_attrs = streetAddress=quota_rule=*:storage=%$M >> ,=uid=uid,=gid=gid,=home=/home/vmail/%u > > The =uid=uid part looks wrong. Should be more like =uid=1000, =gid=1000. > > Anyway.. Post again dovecot -n output and also logs with auth_debug=yes > and mail_debug=yes. > >
Re: [Dovecot] Per User Quotas
On Thu, 2009-10-15 at 14:11 -0500, Peter Fraser wrote: > user_attrs = streetAddress=quota_rule=*:storage=%$M > ,=uid=uid,=gid=gid,=home=/home/vmail/%u The =uid=uid part looks wrong. Should be more like =uid=1000, =gid=1000. Anyway.. Post again dovecot -n output and also logs with auth_debug=yes and mail_debug=yes. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
OK this is what I now have. In dovecot.conf I put: userdb ldap { args = /usr/local/etc/dovecot-ldap.conf } In dovecot-ldap.conf: hosts = 192.168.1.97 base = dc=atlas,dc=local auth_bind = yes scope = subtree auth_bind_userdn = atlas\%u user_filter = (&(objectClass=mailUser)(mail=%u)) default_pass_scheme = CRYPT pass_filter = (&(objectclass=person)(uid=%u)) pass_attrs = userPassword=password user_attrs = streetAddress=quota_rule=*:storage=%$M ,=uid=uid,=gid=gid,=home=/home/vmail/%u And the quota in street address of AD When I fire up thunderbird now, I see sending login information for a long time before it comes up and even when it does, I still see the general quota. On Thu, Oct 15, 2009 at 12:40 PM, Timo Sirainen wrote: > On Thu, 2009-10-15 at 19:36 +0200, thedoghousemailcom wrote: >> Hi Peter + Timo, >> >> I think the solution is the right order in dovecot.conf: >> >> "userdb ldap" should stand in front of "userdb static". > > Well, if that's done then userdb static is used only when user isn't > found from ldap. And I guess that should normally never happen.. >
Re: [Dovecot] Per User Quotas
On Thu, 2009-10-15 at 19:36 +0200, thedoghousemailcom wrote: > Hi Peter + Timo, > > I think the solution is the right order in dovecot.conf: > > "userdb ldap" should stand in front of "userdb static". Well, if that's done then userdb static is used only when user isn't found from ldap. And I guess that should normally never happen.. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
On Thu, 2009-10-15 at 12:31 -0500, Peter Fraser wrote: > Ok I see, so can I get per-user quotas going and still use userdb > static? No. That means all users have the same static configuration. > or do I have to change to userdb ldap? Yes. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
Hi Peter + Timo, I think the solution is the right order in dovecot.conf: "userdb ldap" should stand in front of "userdb static". Greetings Timo Sirainen schrieb: On Wed, 2009-10-14 at 21:18 -0500, Peter Fraser wrote: userdb: driver: static args: uid=1002 gid=1002 home=/home/vmail/%u allow_all_users=yes This catches all userdb lookups. userdb: driver: passwd args: blocking=yes This is never used. You probably want to comment it out. user_attrs = homeDirectory=/home/vmail/%u,uidNumber=1002,gidNumber=1002,streetAddress=quota_rule=*:storage=%$M These aren't used, because you're using userdb static instead of userdb ldap.
Re: [Dovecot] Per User Quotas
Ok I see, so can I get per-user quotas going and still use userdb static? or do I have to change to userdb ldap? On Thu, Oct 15, 2009 at 11:30 AM, Timo Sirainen wrote: > On Wed, 2009-10-14 at 21:18 -0500, Peter Fraser wrote: >> userdb: >> driver: static >> args: uid=1002 gid=1002 home=/home/vmail/%u allow_all_users=yes > > This catches all userdb lookups. > >> userdb: >> driver: passwd >> args: blocking=yes > > This is never used. You probably want to comment it out. > >> user_attrs = >> homeDirectory=/home/vmail/%u,uidNumber=1002,gidNumber=1002,streetAddress=quota_rule=*:storage=%$M > > These aren't used, because you're using userdb static instead of userdb > ldap. >
Re: [Dovecot] Per User Quotas
On Wed, 2009-10-14 at 21:18 -0500, Peter Fraser wrote: > userdb: > driver: static > args: uid=1002 gid=1002 home=/home/vmail/%u allow_all_users=yes This catches all userdb lookups. > userdb: > driver: passwd > args: blocking=yes This is never used. You probably want to comment it out. > user_attrs = > homeDirectory=/home/vmail/%u,uidNumber=1002,gidNumber=1002,streetAddress=quota_rule=*:storage=%$M These aren't used, because you're using userdb static instead of userdb ldap. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
On Thu, 2008-11-06 at 10:12 -0500, Peter Fraser wrote: > quota_rule: *:storage=512M > .. > quota_rule4: *:bytes=%$ These are conflicting rules. Specify only one of them (and the same in userdb). signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
OK thanks for replying, I am attaching both files with the information. On Thu, Nov 6, 2008 at 9:09 AM, Timo Sirainen <[EMAIL PROTECTED]> wrote: > On Thu, 2008-11-06 at 09:02 -0500, Peter Fraser wrote: > > HI All > > Asking for a little patience and a bit of help here. I'm using > > dovecot-1.1.3_1 with postfix and squirrelmail. I have implemented a > global > > quota successfully. That works fine. I want to now implement per user > > quotas. So far I have read the howto in the documentation and searched > > several threads but can't seem to get it working properly. My LDAP server > is > > Windows 2003 Active Directory. > > > > Is there any documentation specific to AD that I could look at or any > other > > doc that could help me? > > > > My last effort was to put this in dovecot-ldap.conf > > user_attrs = streetAddress=quota_rule4=*:storage=%$M > > ,=uid=1002,=gid=1002,=home=/home/vmail/%u > > You can also define the uid and gid with mail_uid and mail_gid settings > in dovecot.conf. > > > and this in dovecot.conf in addition to the other quota rules. > > quota_rule4 = *:bytes=%$ > > > > I then put the quota in the streetAddress area of AD. > > Sounds like it would work. Why doesn't it? Set auth_debug=yes and show > logs. Also show dovecot -n output. > > mail# dovecot -n # 1.1.3: /usr/local/etc/dovecot.conf protocols: imaps pop3s lda managesieve listen(default): * listen(imap): * listen(pop3): * listen(managesieve): *:2000 ssl_cert_file: /usr/local/etc/dovecot/ssl/certs/dovecot.pem ssl_key_file: /usr/local/etc/dovecot/ssl/private/dovecot.pem disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable(default): /usr/local/libexec/dovecot/imap-login login_executable(imap): /usr/local/libexec/dovecot/imap-login login_executable(pop3): /usr/local/libexec/dovecot/pop3-login login_executable(managesieve): /usr/local/libexec/dovecot/managesieve-login login_greeting: Mail Server ready. login_greeting_capability(default): yes login_greeting_capability(imap): yes login_greeting_capability(pop3): no login_greeting_capability(managesieve): no verbose_proctitle: yes first_valid_uid: 1000 first_valid_gid: 1000 mail_privileged_group: mail mail_location: maildir:~/Maildir mail_debug: yes maildir_copy_preserve_filename: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(pop3): imap_client_workarounds(managesieve): pop3_enable_last(default): no pop3_enable_last(imap): no pop3_enable_last(pop3): yes pop3_enable_last(managesieve): no pop3_client_workarounds(default): pop3_client_workarounds(imap): pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh pop3_client_workarounds(managesieve): managesieve_implementation_string(default): dovecot managesieve_implementation_string(imap): dovecot managesieve_implementation_string(pop3): dovecot managesieve_implementation_string(managesieve): Cyrus timsieved v2.2.13 sieve_storage(default): sieve_storage(imap): sieve_storage(pop3): sieve_storage(managesieve): ~/sieve sieve(default): sieve(imap): sieve(pop3): sieve(managesieve): ~/.dovecot.sieve auth default: mechanisms: plain login username_format: %Ln verbose: yes debug: yes maildir_copy_preserve_filename: yes mail_executable(default): /usr/local/libexec/dovecot/imap mail_executable(imap): /usr/local/libexec/dovecot/imap mail_executable(pop3): /usr/local/libexec/dovecot/pop3 mail_executable(managesieve): /usr/local/libexec/dovecot/managesieve mail_plugins(default): quota imap_quota mail_plugins(imap): quota imap_quota mail_plugins(pop3): quota mail_plugins(managesieve): mail_plugin_dir(default): /usr/local/lib/dovecot/imap mail_plugin_dir(imap): /usr/local/lib/dovecot/imap mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3 mail_plugin_dir(managesieve): /usr/local/lib/dovecot/managesieve imap_client_workarounds(default): delay-newmail netscape-eoh tb-extra-mailbox-sep imap_client_workarounds(imap): delay-newmail netscape-eoh tb-ex
Re: [Dovecot] Per User Quotas
On Thu, 2008-11-06 at 09:02 -0500, Peter Fraser wrote: > HI All > Asking for a little patience and a bit of help here. I'm using > dovecot-1.1.3_1 with postfix and squirrelmail. I have implemented a global > quota successfully. That works fine. I want to now implement per user > quotas. So far I have read the howto in the documentation and searched > several threads but can't seem to get it working properly. My LDAP server is > Windows 2003 Active Directory. > > Is there any documentation specific to AD that I could look at or any other > doc that could help me? > > My last effort was to put this in dovecot-ldap.conf > user_attrs = streetAddress=quota_rule4=*:storage=%$M > ,=uid=1002,=gid=1002,=home=/home/vmail/%u You can also define the uid and gid with mail_uid and mail_gid settings in dovecot.conf. > and this in dovecot.conf in addition to the other quota rules. > quota_rule4 = *:bytes=%$ > > I then put the quota in the streetAddress area of AD. Sounds like it would work. Why doesn't it? Set auth_debug=yes and show logs. Also show dovecot -n output. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Per User Quotas
On Thu, 2008-11-06 at 16:09 +0200, Timo Sirainen wrote: > > I then put the quota in the streetAddress area of AD. > > Sounds like it would work. Why doesn't it? Set auth_debug=yes and show > logs. Also show dovecot -n output. Oh, and mail_debug=yes as well so it shows what the quota really sees as its configuration. signature.asc Description: This is a digitally signed message part