Re: [vchkpw] domain quotas
At 03.15 29/10/2006, you wrote: On Oct 28, 2006, at 11:37 AM, Jeff Koch wrote: I remember reading on the list some time ago that domain quotas didn't work. Has this been fixed? If so, are there any doc's on how this works? Specifically when the domain quotas is reached who is notified? I don't think domain quotas worked in any 5.4.x release, and they still don't work. When (and if) they did work, they could put a heavy load on the server if it had lots of mailboxes with lots of emails. Besides heavy load, it was not compatible with other software using the same mailboxes. Tonino -- Tom Collins - [EMAIL PROTECTED] Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/ QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/
Re: Re: Re: [vchkpw] domain quotas
Hello I am on annual leave until November 5th 2006. If you have an urgent query please leave a voicemail on 07940574707 and I will get back to you as soon as possible. Regards Gerard Earley
Re: Re: [vchkpw] domain quotas
Hello I am on annual leave until November 5th 2006. If you have an urgent query please leave a voicemail on 07940574707 and I will get back to you as soon as possible. Regards Gerard Earley
Re: [vchkpw] domain quotas
On Oct 28, 2006, at 11:37 AM, Jeff Koch wrote: I remember reading on the list some time ago that domain quotas didn't work. Has this been fixed? If so, are there any doc's on how this works? Specifically when the domain quotas is reached who is notified? I don't think domain quotas worked in any 5.4.x release, and they still don't work. When (and if) they did work, they could put a heavy load on the server if it had lots of mailboxes with lots of emails. -- Tom Collins - [EMAIL PROTECTED] Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/ QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/
[vchkpw] domain quotas
I remember reading on the list some time ago that domain quotas didn't work. Has this been fixed? If so, are there any doc's on how this works? Specifically when the domain quotas is reached who is notified? Best Regards, Jeff Koch
Re: [vchkpw] domain quotas
Hi Tom: Soft quotas are OK - do they send out emails? If not, I guess we could write a script to check domain diskspace usuage. At 12:10 PM 4/12/2004, you wrote: On Apr 12, 2004, at 7:54 AM, Jeff Koch wrote: Are domain quotas working OK in the latest vpopmail release? To the best of my knowledge, domain quotas do not work. There was a time that they caused vdelivermail to crash, but now they just aren't enforced. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/ Best Regards, Jeff Koch, Intersessions
Re: [vchkpw] domain quotas
On Apr 12, 2004, at 7:54 AM, Jeff Koch wrote: Are domain quotas working OK in the latest vpopmail release? To the best of my knowledge, domain quotas do not work. There was a time that they caused vdelivermail to crash, but now they just aren't enforced. -- Tom Collins - [EMAIL PROTECTED] QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/
RE: [vchkpw] domain quotas
I too would like to know the same information along those lines. Are the quotas in qmail a way to control actual disk quotas on the file system, meaning I'd have to have quota support in my kernel before I use this feature, or is this just something ad-hoc that vpopmail has done at a "higher level" than the file system quotas? Thanks, Chris Miller Compuville www.compuville.net -Original Message- From: Jeff Koch [mailto:[EMAIL PROTECTED] Sent: Monday, April 12, 2004 10:55 AM To: [EMAIL PROTECTED] Subject: [vchkpw] domain quotas Hi All: I'm thinking about implementing domain quotas on a new mailserver with qmailadmin and courier IMAP. Are domain quotas working OK in the latest vpopmail release? What should we be aware of in implementing this feature> Any booby traps with clients and users? How does the notification process work? Are these hard quotas or soft quotas? Are they supported by qmailadmin and squirrelmail? Thanks in advance. Best Regards, Jeff Koch
[vchkpw] domain quotas
Hi All: I'm thinking about implementing domain quotas on a new mailserver with qmailadmin and courier IMAP. Are domain quotas working OK in the latest vpopmail release? What should we be aware of in implementing this feature> Any booby traps with clients and users? How does the notification process work? Are these hard quotas or soft quotas? Are they supported by qmailadmin and squirrelmail? Thanks in advance. Best Regards, Jeff Koch
Re: [vchkpw] domain quotas..
On Thursday 23 October 2003 20:48, B. Cook wrote: > Hello, > > I've been trying to figure out how to get domain quota's working. > I'm wondering if anyone else does them. > > Do I need to zero out the users quota in order for domain quota's to > work? no. vlimits support domain quotas. the setting is: first check if domain quotas have reached its limit, then check for user quotas. you will need to use the development version, as there is no vlimit support in the stable tree. this has been covered in the mailing list before, so i suggest next time you read the archives. -- Mit internetten Grüßen / Best Regards --- Justin Heesemannionium Technologies [EMAIL PROTECTED]www.ionium.org
[vchkpw] domain quotas..
Hello, I've been trying to figure out how to get domain quota's working. I'm wondering if anyone else does them. Do I need to zero out the users quota in order for domain quota's to work? If there are docs and I'm missing them somene please let me know. Thanks in advance. -- Brian Adriance Memorial Library
Re: [vchkpw] domain quotas query
On Saturday 19 July 2003 12:01, Paul Theodoropoulos wrote: > >i now want to convert to domain quotas, wherein i give the domain a 'bulk' > >quota, then the customer can allocate individual user quotas within that > >total. but i'm a little confused about a couple of things: > > I already sent some patches to qmailadmin making that. You assign a total quota to the postmaster, then, using qmailadmin, each user quota is subtracted/added from the postmaster quota. In this way you assign a domain total, and the administrator may assign user quotas within that limit. That is compliant with all (Maildir++, Courier, vpopmail, sqwebmail, etc..) and very safe. I'm using it from months, and I'ld like to see that code inside standard qmailadmin. Tonino [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] domain quotas query
- Original Message - From: "Jesse Guardiani" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 25, 2003 1:14 PM Subject: Re: [vchkpw] domain quotas query > On Saturday 19 July 2003 12:01, Paul Theodoropoulos wrote: > > so gee, did i really stump the stars on this one? nobody out there has > > converted to domain quotas? > > Very few, I'd bet. > > I took a look at the new domain soft quota code a few months ago (you > might remember the heated discussion I had with the author), and finally > came to the conclusion that this code is definately NOT ready for prime > time. > > It's a valiant attempt, but it is buggy and fatally flawed in that it won't play > nicely with maildir++ applications like sqwebmail, Courier-IMAP, or maildrop. > > Stick with hard filesystem domain quotas, install that qmailadmin patch > that was floating around last year (it gave qmailadmin domain admins > the ability to reconfigure user quotas under a set domain limit), or > forget it. > > That's MHO, and I'm sticking to it. > > I think that if we really want domain quotas (and I, for one, do!) then we > need to get together with Sam of Courier IMAP fame and create a new > maildir+++ specification that will accomodate domain quotas. That way > everyone can continue playing nice together. > > HTH. I too share some concerns about the inclusion of domain quotas in the current development vpopmail In hindsight I believe it would have been better to sign off on a stable vpopmail, and then the new domain quota stuff could have been added to the next development series. I wonder if it would be hard to remove or not...? Was the domain quota additions limited to just a few functions, or was it pretty much substantial changes to much of vpopmail code? Michael.
Re: [vchkpw] domain quotas query
On Saturday 19 July 2003 12:01, Paul Theodoropoulos wrote: > so gee, did i really stump the stars on this one? nobody out there has > converted to domain quotas? Very few, I'd bet. I took a look at the new domain soft quota code a few months ago (you might remember the heated discussion I had with the author), and finally came to the conclusion that this code is definately NOT ready for prime time. It's a valiant attempt, but it is buggy and fatally flawed in that it won't play nicely with maildir++ applications like sqwebmail, Courier-IMAP, or maildrop. Stick with hard filesystem domain quotas, install that qmailadmin patch that was floating around last year (it gave qmailadmin domain admins the ability to reconfigure user quotas under a set domain limit), or forget it. That's MHO, and I'm sticking to it. I think that if we really want domain quotas (and I, for one, do!) then we need to get together with Sam of Courier IMAP fame and create a new maildir+++ specification that will accomodate domain quotas. That way everyone can continue playing nice together. HTH. > > At 11:42 AM 7/18/2003, Paul Theodoropoulos wrote: > >i'm about to upgrade from vpopmail 5.3.18 to 5.3.20. i'm also going to > >upgrade qmailadmin to the latest dev version. > > > >i have until now been running with user quotas set via vqadmin, so for > >example in vqadmin for domain example.com, i would fill in the quota field > > with > > > >5000S,5000C > > > >and that would automatically set the quota that each user within that > >domain gets when the customer creates a new account. > > > >i now want to convert to domain quotas, wherein i give the domain a 'bulk' > >quota, then the customer can allocate individual user quotas within that > >total. but i'm a little confused about a couple of things: > > > >1. if i upgrade vpopmail with the --enable-domainquotas=y setting, will > >that then cause all already existing domains to 'break' - that is, will > >the existing per-user quota that's already in place suddenly become the > >domain quota, rendering the existing users quotas as consuming more than > >the global quota causing mail to bounce until i can update them by hand? > >(hope that makes sense) > > > >2. when setting the new domainquota, does it accept the quota value > >identically to the user quotas? the example in README.quotas simply says > >to add for example > > quota 50 > > > >to .qmailadmin-limits. if i have a domain with 20 users, 50meg quota per > >user, and 5000 message quota per user, would that mean i'd enter > > > > quota 10S,10C > > > >?? i presume that's not right (the math notwithstanding!) - i would > >presume that the domain quota is only for disk usage, not message counts. > > true? > > > >3. when implementing domain quotas - does it automatically change how the > >domain quota is interpreted in vqadmin? if i set the quota there, will > >that then become the domain quota, or is that field interpreted only as > >the user's default quota? > > > >4. the example shown from README.quota also differs from the format of an > >existing .qmailadmin-limits file on my system, e.g. > > > >cat .qmailadmin-limits > >maxpopaccounts: 51 > >maxaliases: 51 > >maxforwards: 51 > >maxautoresponders: 51 > >maxmailinglists: 51 > >default_quota: 1S,5000C > > > >is it true i'd add the domain quota as > > > > quota xxx > > > >rather than > > > > quota: xxx > > > >? > > > >lots of questions. sorry. hope i'm not retreading already answered stuff, > >but i'm a continuous subscriber for a long time, and i don't recall seeing > >these issues brought up. > > > >thanks. > > > > > > > >Paul Theodoropoulos > >http://www.anastrophe.com > > Paul Theodoropoulos > http://www.anastrophe.com -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net
Re: [vchkpw] domain quotas query
so gee, did i really stump the stars on this one? nobody out there has converted to domain quotas? At 11:42 AM 7/18/2003, Paul Theodoropoulos wrote: i'm about to upgrade from vpopmail 5.3.18 to 5.3.20. i'm also going to upgrade qmailadmin to the latest dev version. i have until now been running with user quotas set via vqadmin, so for example in vqadmin for domain example.com, i would fill in the quota field with 5000S,5000C and that would automatically set the quota that each user within that domain gets when the customer creates a new account. i now want to convert to domain quotas, wherein i give the domain a 'bulk' quota, then the customer can allocate individual user quotas within that total. but i'm a little confused about a couple of things: 1. if i upgrade vpopmail with the --enable-domainquotas=y setting, will that then cause all already existing domains to 'break' - that is, will the existing per-user quota that's already in place suddenly become the domain quota, rendering the existing users quotas as consuming more than the global quota causing mail to bounce until i can update them by hand? (hope that makes sense) 2. when setting the new domainquota, does it accept the quota value identically to the user quotas? the example in README.quotas simply says to add for example quota 50 to .qmailadmin-limits. if i have a domain with 20 users, 50meg quota per user, and 5000 message quota per user, would that mean i'd enter quota 10S,10C ?? i presume that's not right (the math notwithstanding!) - i would presume that the domain quota is only for disk usage, not message counts. true? 3. when implementing domain quotas - does it automatically change how the domain quota is interpreted in vqadmin? if i set the quota there, will that then become the domain quota, or is that field interpreted only as the user's default quota? 4. the example shown from README.quota also differs from the format of an existing .qmailadmin-limits file on my system, e.g. cat .qmailadmin-limits maxpopaccounts: 51 maxaliases: 51 maxforwards: 51 maxautoresponders: 51 maxmailinglists: 51 default_quota: 1S,5000C is it true i'd add the domain quota as quota xxx rather than quota: xxx ? lots of questions. sorry. hope i'm not retreading already answered stuff, but i'm a continuous subscriber for a long time, and i don't recall seeing these issues brought up. thanks. Paul Theodoropoulos http://www.anastrophe.com Paul Theodoropoulos http://www.anastrophe.com
[vchkpw] domain quotas query
i'm about to upgrade from vpopmail 5.3.18 to 5.3.20. i'm also going to upgrade qmailadmin to the latest dev version. i have until now been running with user quotas set via vqadmin, so for example in vqadmin for domain example.com, i would fill in the quota field with 5000S,5000C and that would automatically set the quota that each user within that domain gets when the customer creates a new account. i now want to convert to domain quotas, wherein i give the domain a 'bulk' quota, then the customer can allocate individual user quotas within that total. but i'm a little confused about a couple of things: 1. if i upgrade vpopmail with the --enable-domainquotas=y setting, will that then cause all already existing domains to 'break' - that is, will the existing per-user quota that's already in place suddenly become the domain quota, rendering the existing users quotas as consuming more than the global quota causing mail to bounce until i can update them by hand? (hope that makes sense) 2. when setting the new domainquota, does it accept the quota value identically to the user quotas? the example in README.quotas simply says to add for example quota 50 to .qmailadmin-limits. if i have a domain with 20 users, 50meg quota per user, and 5000 message quota per user, would that mean i'd enter quota 10S,10C ?? i presume that's not right (the math notwithstanding!) - i would presume that the domain quota is only for disk usage, not message counts. true? 3. when implementing domain quotas - does it automatically change how the domain quota is interpreted in vqadmin? if i set the quota there, will that then become the domain quota, or is that field interpreted only as the user's default quota? 4. the example shown from README.quota also differs from the format of an existing .qmailadmin-limits file on my system, e.g. cat .qmailadmin-limits maxpopaccounts: 51 maxaliases: 51 maxforwards: 51 maxautoresponders: 51 maxmailinglists: 51 default_quota: 1S,5000C is it true i'd add the domain quota as quota xxx rather than quota: xxx ? lots of questions. sorry. hope i'm not retreading already answered stuff, but i'm a continuous subscriber for a long time, and i don't recall seeing these issues brought up. thanks. Paul Theodoropoulos http://www.anastrophe.com
Re: [vchkpw] Domain quotas
At 26/03/03 26/03/03 -0500, you wrote: > >I don't believe the "Sent" folder keeps track of any size. > >I looked and don't see any "maildirsize" files in "Sent" folders. > >So it doesn't look like it counts against either user or domain > >quotas. You'll have to take a look at the spec to be sure. > >I don't believe the Trash folder keeps track of size either. > > It does, I'm sure. You may disable it (for example in sqwebmail and likely > courier), but if you're a provider you're going to control all the space > customers are wasting (specially if they are webmail users), including > "Sent", "Trash" and additional folders. Take a look. I have IMAP customers and the "Sent" folders are full. No maildirsize files in there. I think they should all use the main .maildirsize. With courier and sqwebmail all folders are included except "trash", unless you include it with "--with-trashquota" configure option. On my courier IMAP, when I see the total quota for a single user, it's included of all folders. About the rest, I agree totally with you. Ciao, Tonino
Re: [vchkpw] Domain quotas
Hi Ajaj, > But since all email files are "owned" by the vpopmail user that doesn't > give you much flexibility if you want to implement quotas on a > per-domain or per-user basis. That's why Brian suggested to create each domain under its own system user. It's easy, and it _works_. Personally, I'm really bored by that domain quota question because it just came up the 10,000th time on the list. System quotas work fine and are a much cleaner solution than the fifth Maildir extension that's not used by every single tool that uses vpopmail (vdelivermail, qmail-pop3d, Courier-IMAP, sqwebmail, blahblahblah...). If there are ways to circumvent domain quota settings, it's better to throw them away at all. It's good practice to set limits _outside_ the programs that should be limited. If you want to limit the memory of a process, you use "softlimit -m " around it instead of telling the process "I know, you can use as much memory as you need, but please, use only bytes". The same should apply to quota settings. However, that's my very personal opinion; feel free to discuss this issue until its bloody end ;-) Jonas
Re: [vchkpw] Domain quotas
> > Even the courier readme recommends using system quotas. > > But since all email files are "owned" by the vpopmail user that doesn't > give you much flexibility if you want to implement quotas on a > per-domain or per-user basis. When you create the account, use vadddomain -u username to specify the system username that you want the domain to be owned by. It will create a "domains" directory in the home directory of that user. You set the system quota for the username supplied. This would require one system account per domain. You could then impose domain quotas with system accounts and use the regular user quota for per user constraints. Brian
Re: [vchkpw] Domain quotas
Brian Kolaci wrote: Even the courier readme recommends using system quotas. But since all email files are "owned" by the vpopmail user that doesn't give you much flexibility if you want to implement quotas on a per-domain or per-user basis. -- Aj. Systems Administrator / Developer
Re: [vchkpw] Domain quotas
> >I don't believe the "Sent" folder keeps track of any size. > >I looked and don't see any "maildirsize" files in "Sent" folders. > >So it doesn't look like it counts against either user or domain > >quotas. You'll have to take a look at the spec to be sure. > >I don't believe the Trash folder keeps track of size either. > > It does, I'm sure. You may disable it (for example in sqwebmail and likely > courier), but if you're a provider you're going to control all the space > customers are wasting (specially if they are webmail users), including > "Sent", "Trash" and additional folders. Take a look. I have IMAP customers and the "Sent" folders are full. No maildirsize files in there. > >In any case, you can use system quotas if you want to bypass > >any/all of this to make sure everything is accounted for. > > These problems must be highlighted much more, because people may think this > "vpopmail domain quota" feature could solve all problems transparently, and > this is not true. > > I think this feature may be a first step, but must be followed by coherent > changes in other packages, before it may be used in an integrated environment. > > Ciao, > > Tonino > I agree. For one, it doesn't take into account the overhead with directories, control files, and lots more. None of the "overhead" space is accounted for. As stated in the courier distribution, only "soft" quotas are implemented, meaning that the overhead space is ignored. Read the README.maildirquotas in the courier distribution. Anything in the Trash folder, as well as any messages "Marked" for deletion but not yet deleted do not count in the quota. Things in a "shared" folder also don't count (but if courier had a concept of "domain" quotas, that could come into play). The readme file doesn't mention the "Sent" folder, however from examining the contents, it doesn't appear to keep track of the size of that folder, nor impose quota constraints on that. I only did the domain quotas due to popular demand. I did the best I could with the available documentation and coding conventions out there implementing the maildir++ quotas. I personally recommend using system quotas, but that appears to be very difficult for some users. I tested the user/domain quotas using maildir++ quotas and it works fine, however if you have system quotas as well, they will kick in before the domain maildir++ quotas since system quotas take into account the "overhead", Trash'd, and deleted but not expunged space. Even the courier readme recommends using system quotas. Brian
Re: [vchkpw] Domain quotas
At 26/03/03 26/03/03 -0500, Brian Kolaci wrote: > >When a message arrives and is delivered by vdelivermail, > >the quotas are enforced. It also updates the maildirsize > >file (and uses the maildir++ naming conventions) thereby > >updating the maildir++ quota usage that is shared amongst > >all maildir++ compatible software. > > > > From what I understand of maildir++, all the programs like > >the POP, IMAP, and any maildir++ compatable software should > >maintain the maildirsize file(s) for each folder, including > >INBOX, so the usage should remain the same when moving messages > >between folders. The usage should be restored when deleting > >a message. > > It's all right when you receive messages because all the check is done in > the receiving phase (vedelivermail). All right the same if you move > messages between folders (sizes don't change). > > But what happens when you create messages with sqwebmail or squirrelmail & > courier, or copy them to a remote IMAP server from your local folder? > > When you create a message or upload an attach, and keep them inside your > "Sent" folder, vdelivermail is not used, so single users may create and > store messages until their personal ".maildirsize" let them do it. So they > may overflow domain quota. > > Tonino > I don't believe the "Sent" folder keeps track of any size. I looked and don't see any "maildirsize" files in "Sent" folders. So it doesn't look like it counts against either user or domain quotas. You'll have to take a look at the spec to be sure. I don't believe the Trash folder keeps track of size either. It does, I'm sure. You may disable it (for example in sqwebmail and likely courier), but if you're a provider you're going to control all the space customers are wasting (specially if they are webmail users), including "Sent", "Trash" and additional folders. In any case, you can use system quotas if you want to bypass any/all of this to make sure everything is accounted for. These problems must be highlighted much more, because people may think this "vpopmail domain quota" feature could solve all problems transparently, and this is not true. I think this feature may be a first step, but must be followed by coherent changes in other packages, before it may be used in an integrated environment. Ciao, Tonino
Re: [vchkpw] Domain quotas
> >When a message arrives and is delivered by vdelivermail, > >the quotas are enforced. It also updates the maildirsize > >file (and uses the maildir++ naming conventions) thereby > >updating the maildir++ quota usage that is shared amongst > >all maildir++ compatible software. > > > > From what I understand of maildir++, all the programs like > >the POP, IMAP, and any maildir++ compatable software should > >maintain the maildirsize file(s) for each folder, including > >INBOX, so the usage should remain the same when moving messages > >between folders. The usage should be restored when deleting > >a message. > > It's all right when you receive messages because all the check is done in > the receiving phase (vedelivermail). All right the same if you move > messages between folders (sizes don't change). > > But what happens when you create messages with sqwebmail or squirrelmail & > courier, or copy them to a remote IMAP server from your local folder? > > When you create a message or upload an attach, and keep them inside your > "Sent" folder, vdelivermail is not used, so single users may create and > store messages until their personal ".maildirsize" let them do it. So they > may overflow domain quota. > > Tonino > I don't believe the "Sent" folder keeps track of any size. I looked and don't see any "maildirsize" files in "Sent" folders. So it doesn't look like it counts against either user or domain quotas. You'll have to take a look at the spec to be sure. I don't believe the Trash folder keeps track of size either. In any case, you can use system quotas if you want to bypass any/all of this to make sure everything is accounted for. Thanks, Brian
Re: [vchkpw] Domain quotas
At 26/03/03 26/03/03 -0500, Brian Kolaci wrote: When a message arrives and is delivered by vdelivermail, the quotas are enforced. It also updates the maildirsize file (and uses the maildir++ naming conventions) thereby updating the maildir++ quota usage that is shared amongst all maildir++ compatible software. From what I understand of maildir++, all the programs like the POP, IMAP, and any maildir++ compatable software should maintain the maildirsize file(s) for each folder, including INBOX, so the usage should remain the same when moving messages between folders. The usage should be restored when deleting a message. It's all right when you receive messages because all the check is done in the receiving phase (vedelivermail). All right the same if you move messages between folders (sizes don't change). But what happens when you create messages with sqwebmail or squirrelmail & courier, or copy them to a remote IMAP server from your local folder? When you create a message or upload an attach, and keep them inside your "Sent" folder, vdelivermail is not used, so single users may create and store messages until their personal ".maildirsize" let them do it. So they may overflow domain quota. Tonino
Re: [vchkpw] Domain quotas
When a message arrives and is delivered by vdelivermail, the quotas are enforced. It also updates the maildirsize file (and uses the maildir++ naming conventions) thereby updating the maildir++ quota usage that is shared amongst all maildir++ compatible software. >From what I understand of maildir++, all the programs like the POP, IMAP, and any maildir++ compatable software should maintain the maildirsize file(s) for each folder, including INBOX, so the usage should remain the same when moving messages between folders. The usage should be restored when deleting a message. So note that vpopmail uses maildir++ quota code (ported by Bill from courier's implementation). I just extended Bill's port to include domain support in addition to user support and made the code available in the libvpopmail.a library so it can be shared. The name clashes with courier were taken care of so you can still link with the courier code. So there shouldn't be any issues and should work well with other software. Thanks, Brian > Brian, > > when you store a message inside an imap server (like when using > squirrelmail & courier, and keeping your outgoing message in the "Sent" > folder), or when using sqwebmail just keep it in the "Sent" or upload an > attach, which quota computing is done: courier, sqwebmail or vpopmail? > > I think in such cases courier or sqwebmail quota code is used, not > vpopmail's quota code, so there could be strong computing differences. > > In such cases, users may overfill domain quota. > > Tonino > > At 26/03/03 26/03/03 -0500, Brian Kolaci wrote: > > >The domain quota code (as well as the user quota code) > >is enforced in the vdelivermail program. It should be > >compatible with courier-imap, but not maildrop. It also > >works within qmailadmin. I'm not familiar with sqwebmail > >internals. > > > >Brian > > > > > Please correct me if I'm wrong... > > > > > > As far as I understand, the domain quota code included in the last > > > development version of vpopmail is NOT 100% compatible with other > > programs > > > like sqwebmail, courier, ecc., so you may have some disalignments, > > > depending on the products you're using. > > > > > > Tonino > > > > > > At 26/03/03 26/03/03 +0100, Jonas Pasche wrote: > > > >Hi Rick, > > > > > > > > > Is it possible to set a quota for an entire domain using vpopmail? > > > > > > > >One of the top ten questions on the list. You didn't check the archives, > > > >didn't you? :) > > > > > > > >In short: > > > > > > > >For the stable version of vpopmail, there is no domain quota support, > > > >but you can create the domain under a dedicated system user and use > > > >system quotas for that user. > > > > > > > >In the latest development version of vpopmail, experimental domain quota > > > >support is included. > > > > > > > >Jonas > > > > > > > > > > > > [EMAIL PROTECTED]Interazioni di Antonio Nati > > > http://www.interazioni.it [EMAIL PROTECTED] > > > > > > > > > > > > [EMAIL PROTECTED]Interazioni di Antonio Nati > http://www.interazioni.it [EMAIL PROTECTED] > >
Re: [vchkpw] Domain quotas
Brian, when you store a message inside an imap server (like when using squirrelmail & courier, and keeping your outgoing message in the "Sent" folder), or when using sqwebmail just keep it in the "Sent" or upload an attach, which quota computing is done: courier, sqwebmail or vpopmail? I think in such cases courier or sqwebmail quota code is used, not vpopmail's quota code, so there could be strong computing differences. In such cases, users may overfill domain quota. Tonino At 26/03/03 26/03/03 -0500, Brian Kolaci wrote: The domain quota code (as well as the user quota code) is enforced in the vdelivermail program. It should be compatible with courier-imap, but not maildrop. It also works within qmailadmin. I'm not familiar with sqwebmail internals. Brian > Please correct me if I'm wrong... > > As far as I understand, the domain quota code included in the last > development version of vpopmail is NOT 100% compatible with other programs > like sqwebmail, courier, ecc., so you may have some disalignments, > depending on the products you're using. > > Tonino > > At 26/03/03 26/03/03 +0100, Jonas Pasche wrote: > >Hi Rick, > > > > > Is it possible to set a quota for an entire domain using vpopmail? > > > >One of the top ten questions on the list. You didn't check the archives, > >didn't you? :) > > > >In short: > > > >For the stable version of vpopmail, there is no domain quota support, > >but you can create the domain under a dedicated system user and use > >system quotas for that user. > > > >In the latest development version of vpopmail, experimental domain quota > >support is included. > > > >Jonas > > > > [EMAIL PROTECTED]Interazioni di Antonio Nati > http://www.interazioni.it [EMAIL PROTECTED] > > [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] Domain quotas
The domain quota code (as well as the user quota code) is enforced in the vdelivermail program. It should be compatible with courier-imap, but not maildrop. It also works within qmailadmin. I'm not familiar with sqwebmail internals. Brian > Please correct me if I'm wrong... > > As far as I understand, the domain quota code included in the last > development version of vpopmail is NOT 100% compatible with other programs > like sqwebmail, courier, ecc., so you may have some disalignments, > depending on the products you're using. > > Tonino > > At 26/03/03 26/03/03 +0100, Jonas Pasche wrote: > >Hi Rick, > > > > > Is it possible to set a quota for an entire domain using vpopmail? > > > >One of the top ten questions on the list. You didn't check the archives, > >didn't you? :) > > > >In short: > > > >For the stable version of vpopmail, there is no domain quota support, > >but you can create the domain under a dedicated system user and use > >system quotas for that user. > > > >In the latest development version of vpopmail, experimental domain quota > >support is included. > > > >Jonas > > > > [EMAIL PROTECTED]Interazioni di Antonio Nati > http://www.interazioni.it [EMAIL PROTECTED] > >
Re: [vchkpw] Domain quotas
Please correct me if I'm wrong... As far as I understand, the domain quota code included in the last development version of vpopmail is NOT 100% compatible with other programs like sqwebmail, courier, ecc., so you may have some disalignments, depending on the products you're using. Tonino At 26/03/03 26/03/03 +0100, Jonas Pasche wrote: Hi Rick, > Is it possible to set a quota for an entire domain using vpopmail? One of the top ten questions on the list. You didn't check the archives, didn't you? :) In short: For the stable version of vpopmail, there is no domain quota support, but you can create the domain under a dedicated system user and use system quotas for that user. In the latest development version of vpopmail, experimental domain quota support is included. Jonas [EMAIL PROTECTED]Interazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] Domain quotas
Hi Rick, > Is it possible to set a quota for an entire domain using vpopmail? One of the top ten questions on the list. You didn't check the archives, didn't you? :) In short: For the stable version of vpopmail, there is no domain quota support, but you can create the domain under a dedicated system user and use system quotas for that user. In the latest development version of vpopmail, experimental domain quota support is included. Jonas
Re: [vchkpw] Domain quotas
> Is it possible to set a quota for an entire domain using vpopmail? > > - Rick > > Yes. You will need vpopmail 5.3.19 or up. You need to populate the mysql "diskquota" or the .qmailadmin-limits file attribute "quota" to the size (in bytes). Brian
Re: [vchkpw] Domain quotas
On Wed, 26 Mar 2003 08:14:30 -0500 Rick Root <[EMAIL PROTECTED]> wrote: > Is it possible to set a quota for an entire domain using vpopmail? > > - Rick > > > nope, what i think of. but some person try to complete that using hard quota. -- thx onOs UPPTI - Universitas Brawijaya
[vchkpw] Domain quotas
Is it possible to set a quota for an entire domain using vpopmail? - Rick
[vchkpw] domain quotas (updated)
I've made one change to the patch below, which is the same one I posted yesterday. This patch makes public the following two functions in maildirquota.c: int readdomainquota(const char *dir, long *sizep, int *cntp); int readuserquota(const char* dir, long *sizep, int *cntp); These two functions read the current Maildir++ quota usage for a domain/user given the domain or user directory. It *adds* to the current values pointed to by sizep & cntp the size/msgcount used by the specified domain/user. They return 0 on success, -1 on failure. errno would be set to EAGAIN if the contents of the directory changed during the calculation. In short, the attached patch enforces the quota limits specified in the qmailadmin-limits file/table in the vdelivermail program. I figured it might be better to expose the above two functions as well, therefore the updated patch. Thanks, Brian - Begin Forwarded Message - Since there's been alot of hype about domain quotas, I've put my changes in the attached patch file. This will patch vpopmail-5.3.16 (maildirquota.c and vdelivermail.c). There's a new file vqmaillocal.c that apparently doesn't use Maildir++ quotas, so I didn't touch that. The CPU usage is negligible (I saw 0-20 ms). With this patch, another function is added to maildirquota.c called domain_over_maildirquota() that extracts the domain info from the given end-user Maildir and returns 1 if the domain is already at/over quota, or the new message would exceed the domains quota. Note that this patch *only* enforces Maildir++ quotas (both size and count), and not system quotas. The diskquota parameter of the vlimits structure is in MB (NOT BYTES), and the maxmsgcount parameter specifies the max messages for the whole domain. If either value is less than or equal to 0, it is treated as unlimited. Ken/Bill - I've been running this for about a month now with the published vlimits API and it seems to work well with little CPU overhead. All deliveries still seem to be under 1 second. I've stripped out the system quotas implementation and made it simply Maildir++ quota compliant. Thanks, Brian - End Forwarded Message - Common subdirectories: vpopmail-5.3.16/attic and vpopmail-5.3.16.new/attic Common subdirectories: vpopmail-5.3.16/cdb and vpopmail-5.3.16.new/cdb Common subdirectories: vpopmail-5.3.16/contrib and vpopmail-5.3.16.new/contrib Common subdirectories: vpopmail-5.3.16/convert and vpopmail-5.3.16.new/convert Common subdirectories: vpopmail-5.3.16/doc and vpopmail-5.3.16.new/doc Common subdirectories: vpopmail-5.3.16/ldap and vpopmail-5.3.16.new/ldap diff -c vpopmail-5.3.16/maildirquota.c vpopmail-5.3.16.new/maildirquota.c *** vpopmail-5.3.16/maildirquota.c Wed Oct 23 15:53:36 2002 --- vpopmail-5.3.16.new/maildirquota.c Wed Feb 19 17:55:36 2003 *** *** 29,34 --- 29,35 #include #include #include + #include "vlimits.h" #include "maildirquota.h" #include "config.h" *** *** 46,51 --- 47,54 long xtra_size, int xtra_cnt, int *percentage); static int docount(const char *, time_t *, off_t *, unsigned *); + int readdomainquota(const char *dir, long *sizep, int *cntp); + int readuserquota(const char* dir, long *sizep, int *cntp); int deliver_quota_warning(const char *dir); #define NUMBUFSIZE 60 *** *** 55,60 --- 58,253 #define MDQUOTA_COUNT 'C' /* Total number of messages in maildir */ + /* bk: add domain limits functionality */ + int domain_over_maildirquota(const char *userdir) + { + struct statstat_buf; + int ret_value = 0; + char *domdir=(char *)malloc(strlen(userdir)+1); + char *p; + char domain[256]; + unsigned long size = 0; + unsigned long maxsize = 0; + int cnt = 0; + int maxcnt = 0; + struct vlimits limits; + + if (fstat(0, &stat_buf) == 0 && S_ISREG(stat_buf.st_mode) && + stat_buf.st_size > 0) + { + + /* locate the domain directory */ + strcpy(domdir, userdir); + if ((p = strstr(domdir, "/Maildir/")) != NULL) + { + while (*(--p) != '/') + ; + *(p+1) = '\0'; + } + + /* locate the domainname */ + while (*(--p) != '/') + ; + strncpy(domain, ++p, sizeof(domain)); + if ((p = strchr(domain, '/')) != NULL) + *p = '\0'; + + /* get the domain quota */ + if (vget_limits(domain, &limits)) + { + free(domdir); + return 0; + } + + /* convert from MB to bytes */ + maxsize = limits.diskquota * 1024 * 1024; + maxcnt = limits.maxmsgcount; + + /* get the domain usage */ +
[vchkpw] domain quotas
Since there's been alot of hype about domain quotas, I've put my changes in the attached patch file. This will patch vpopmail-5.3.16 (maildirquota.c and vdelivermail.c). There's a new file vqmaillocal.c that apparently doesn't use Maildir++ quotas, so I didn't touch that. The CPU usage is negligible (I saw 0-20 ms). With this patch, another function is added to maildirquota.c called domain_over_maildirquota() that extracts the domain info from the given end-user Maildir and returns 1 if the domain is already at/over quota, or the new message would exceed the domains quota. Note that this patch *only* enforces Maildir++ quotas (both size and count), and not system quotas. The diskquota parameter of the vlimits structure is in MB (NOT BYTES), and the maxmsgcount parameter specifies the max messages for the whole domain. If either value is less than or equal to 0, it is treated as unlimited. Ken/Bill - I've been running this for about a month now with the published vlimits API and it seems to work well with little CPU overhead. All deliveries still seem to be under 1 second. I've stripped out the system quotas implementation and made it simply Maildir++ quota compliant. Thanks, Brian Common subdirectories: vpopmail-5.3.16/attic and vpopmail-5.3.16.new/attic Common subdirectories: vpopmail-5.3.16/cdb and vpopmail-5.3.16.new/cdb Common subdirectories: vpopmail-5.3.16/contrib and vpopmail-5.3.16.new/contrib Common subdirectories: vpopmail-5.3.16/convert and vpopmail-5.3.16.new/convert Common subdirectories: vpopmail-5.3.16/doc and vpopmail-5.3.16.new/doc Common subdirectories: vpopmail-5.3.16/ldap and vpopmail-5.3.16.new/ldap diff -c vpopmail-5.3.16/maildirquota.c vpopmail-5.3.16.new/maildirquota.c *** vpopmail-5.3.16/maildirquota.c Wed Oct 23 15:53:36 2002 --- vpopmail-5.3.16.new/maildirquota.c Wed Feb 19 17:55:36 2003 *** *** 29,34 --- 29,35 #include #include #include + #include "vlimits.h" #include "maildirquota.h" #include "config.h" *** *** 46,51 --- 47,54 long xtra_size, int xtra_cnt, int *percentage); static int docount(const char *, time_t *, off_t *, unsigned *); + static int domreadquota(const char *dir, long *sizep, int *cntp); + static int readuserquota(const char* dir, long *sizep, int *cntp); int deliver_quota_warning(const char *dir); #define NUMBUFSIZE 60 *** *** 55,60 --- 58,253 #define MDQUOTA_COUNT 'C' /* Total number of messages in maildir */ + /* bk: add domain limits functionality */ + int domain_over_maildirquota(const char *userdir) + { + struct statstat_buf; + int ret_value = 0; + char *domdir=(char *)malloc(strlen(userdir)+1); + char *p; + char domain[256]; + unsigned long size = 0; + unsigned long maxsize = 0; + int cnt = 0; + int maxcnt = 0; + struct vlimits limits; + + if (fstat(0, &stat_buf) == 0 && S_ISREG(stat_buf.st_mode) && + stat_buf.st_size > 0) + { + + /* locate the domain directory */ + strcpy(domdir, userdir); + if ((p = strstr(domdir, "/Maildir/")) != NULL) + { + while (*(--p) != '/') + ; + *(p+1) = '\0'; + } + + /* locate the domainname */ + while (*(--p) != '/') + ; + strncpy(domain, ++p, sizeof(domain)); + if ((p = strchr(domain, '/')) != NULL) + *p = '\0'; + + /* get the domain quota */ + if (vget_limits(domain, &limits)) + { + free(domdir); + return 0; + } + + /* convert from MB to bytes */ + maxsize = limits.diskquota * 1024 * 1024; + maxcnt = limits.maxmsgcount; + + /* get the domain usage */ + if (domreadquota(domdir, &size, &cnt)) + { + free(domdir); + return -1; + } + + /* check if either quota (size/count) would be exceeded */ + if (maxsize > 0 && (size + stat_buf.st_size) > maxsize) + { + ret_value = 1; + } + else if (maxcnt > 0 && cnt >= maxcnt) + { + ret_value = 1; + } + } + + free(domdir); + + return(ret_value); + } + + static int domreadquota(const char *dir, long *sizep, int *cntp) + { + int tries; + char checkdir[256]; + DIR *dirp; + struct dirent *de; + + + if (dir == NULL || sizep == NULL || cntp == NULL) + return -1; + + *sizep = 0; + *cntp = 0; + + dirp=opendir(dir); + while (dirp && (de=readdir(dirp)) != 0) + { + if (!strcmp(de->d_name
Re: [vchkpw] domain quotas
Currently I use a separate system user for each domain, and I bundle mail & web together with one quota. I have a patched vdelivermail that enforces both per-user and per-domain quotas, but not through maildir quotas. I just submitted the patch for the vlimits data structure and am currently updating the latest vdelivermail to use this API and enforce the quotas. The new data structure keeps track of the per-domain information. I'll put in support for maildir quotas, but I'm wondering if I should allow a switch or compile time option to enforce disk based quotas instead/as well. The only problem I forsee is what happens if files are written into the area by another program (i.e. qmail or procmail). What if they don't support the maildir quotas? Then we need the disk based quotas. Also, if there are .qmail files or other control/data files there, should they be included in the disk usage? Of course the maildir quotas don't include them, but the disk based does. Thanks, Brian > HI, > > I was just wondering if creating a separate system user for each domain is > still the only way of having a total quota for a domain rather than quotas > for each user? > > Is anyone working on adding support to vpopmail for domain based quotas under > the the vpopmail.vchkpw user? > > cheers, Iain. >
[vchkpw] domain quotas
HI, I was just wondering if creating a separate system user for each domain is still the only way of having a total quota for a domain rather than quotas for each user? Is anyone working on adding support to vpopmail for domain based quotas under the the vpopmail.vchkpw user? cheers, Iain.