Re: [vchkpw] disk quota per domain
Hi, I have installed qmail+qmailadmin+sqwebmail and assigned OS quota to a user test.Then, I have added a domain using option -u user (sets the uid/gid based on a user in /etc/passwd) #./vadddomain -u test xyz.com the command works well and the domain is added into the /home/test/domains directory. But when I login in to qmailadmin/sqwebmail it shows "Invalid Login". Whats wrong? Plz. help me... Manish Jain On Tue, 2003-01-28 at 15:22, Claudio Nieder wrote: > Hi, > > > Please give the workable answer... > > Use vaddoains -u option to assign to each domain a different user and > use your OS quota facility to assign each user the desired quota. > > claudio > -- > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 6743 > yahoo messenger: claudionieder aim: claudionieder icq:42315212 > mailto:[EMAIL PROTECTED]http://www.claudio.ch -- MANISH JAIN Centre for Development of Advanced Computing (Ministry of Communication & IT) "Anusandhan Bhawan" C-56/1, Sector - 62, Noida - 201307 (U.P.) Ph.: 0120-2402551 to 60 (Ext.-803/718) Mobile: 9811623002
Re: [vchkpw] disk quota per domain
Please change the qmailadmin ownership to root. Rgds, Yee --- Manish Jain <[EMAIL PROTECTED]> wrote: > Hi, > > I have done the same as u directed.I assigned OS > quota to a user test. > I have added a domain > > #./vadddomain -u test xyz.com > > the command works well. But when I login in to > qmailadmin using > postmaster account it shows "Invalid Login". > > Whats wrong now? > > Plz. help me... > > Manish Jain > > > On Tue, 2003-01-28 at 15:22, Claudio Nieder wrote: > > Hi, > > > > > Please give the workable answer... > > > > Use vaddoains -u option to assign to each domain a > different user and > > use your OS quota facility to assign each user the > desired quota. > > > > claudio > > -- > > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 > 79 357 6743 > > yahoo messenger: claudionieder aim: claudionieder > icq:42315212 > > mailto:[EMAIL PROTECTED] > http://www.claudio.ch > -- > MANISH JAIN > ER&DCI (Ministry of Comm & IT) > "Anusandhan Bhawan" > C-56/1, Sector - 62, > Noida - 201307 (U.P.) > Ph. - 0120-2402551 to 60 (Ext. - 803/718) > > > __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
Re: [vchkpw] disk quota per domain
Please change the ownership to root. Rgds, Yee --- Manish Jain <[EMAIL PROTECTED]> wrote: > Hi, > > I have done the same as u directed.I assigned OS > quota to a user test. > I have added a domain > > #./vadddomain -u test xyz.com > > the command works well. But when I login in to > qmailadmin using > postmaster account it shows "Invalid Login". > > Whats wrong now? > > Plz. help me... > > Manish Jain > > > On Tue, 2003-01-28 at 15:22, Claudio Nieder wrote: > > Hi, > > > > > Please give the workable answer... > > > > Use vaddoains -u option to assign to each domain a > different user and > > use your OS quota facility to assign each user the > desired quota. > > > > claudio > > -- > > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 > 79 357 6743 > > yahoo messenger: claudionieder aim: claudionieder > icq:42315212 > > mailto:[EMAIL PROTECTED] > http://www.claudio.ch > -- > MANISH JAIN > ER&DCI (Ministry of Comm & IT) > "Anusandhan Bhawan" > C-56/1, Sector - 62, > Noida - 201307 (U.P.) > Ph. - 0120-2402551 to 60 (Ext. - 803/718) > > > __ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com
Re: [vchkpw] disk quota per domain
Hi, I have done the same as u directed.I assigned OS quota to a user test. I have added a domain #./vadddomain -u test xyz.com the command works well. But when I login in to qmailadmin using postmaster account it shows "Invalid Login". Whats wrong now? Plz. help me... Manish Jain On Tue, 2003-01-28 at 15:22, Claudio Nieder wrote: > Hi, > > > Please give the workable answer... > > Use vaddoains -u option to assign to each domain a different user and > use your OS quota facility to assign each user the desired quota. > > claudio > -- > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 6743 > yahoo messenger: claudionieder aim: claudionieder icq:42315212 > mailto:[EMAIL PROTECTED]http://www.claudio.ch -- MANISH JAIN ER&DCI (Ministry of Comm & IT) "Anusandhan Bhawan" C-56/1, Sector - 62, Noida - 201307 (U.P.) Ph. - 0120-2402551 to 60 (Ext. - 803/718)
RE: [vchkpw] disk quota per domain
I read in the past of someone who made a coomon pool and give the code, but I can't find who made it. I remember he did this: the postmaster quota is the pool from which all users' quotas are added/subtracted. So, postmaster may modify single quotas, having the common pool limit in his postmaster's quota. This solution would permit to make very few modifications to qmailadmin, and give postmaster a reasonable way to handle quotas. There should be a line like "enablequotapool postmaster" in .qmailadminlimits che could enable this option, setting the user whose quota must be the domain pool to use in qmailadmin. Then, each single add/delete/modify user should check the pool quota and modify it. I'ld like to have both the possibility, "global quota" (all users have the same global quota) and "pooled quota" (all single quotas are derived from a master pool quota), on a domain base, and I think the base code of qmailadmin now may changed easily to support both these options. Tonino At 29/01/03 29/01/03 -0800, Lu wrote: That actually sounds like it may work. Another solution may be this: Since qmailadmin now allows postmaster to allocate quota per user, what if we introduce a limit that restricts how much quota the postmaster has to distribute. This would give us the flexibility to allocate quota per domain and the postmaster for that domain can re-allocate to the user. So we can still see how much each user is using whereas your solution will not. What do you say Ken/Bill ? Regards, Lu > -Original Message- > From: tonix (Antonio Nati) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 1:54 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [vchkpw] disk quota per domain > > > I'm thinking to a new solution, modifying qmailadmin as follows. > > A unique ".qmailmaildirsize" should be created in the domain, > and every > user should have his own "maildirsize" linked by an "ln -sf" to the > domain's ".qmailmaildirsize". > > \domain > \domain\.qmailmaildirsize > [global] > \domain\user1\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user2\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user3\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user4\Maildir\maildirsize > [alone] > \domain\user5\Maildir\maildirsize > [alone] > > Each user using the domain quota should have the same quota > (equal to the > domain quota itself). > > Users with own quota don't use this mechanism and have their private > "maildirsize". > > The only major add should be a routine to recheck the > "domain's global > usage" when domain's ".qmailmaildirsize" is created (or > recreated after > deletion), counting only users working with global "maildirsize". > > Main problem I see could be the lock on the global > ".maildirsize", domains > (with global quota) with thousands of very active users could > slow down on > receiving messages. > > All that should work with a very few modifications (none in vdeliver, > vpopmail, etc., only a few in qmailadmin). > > Tonino > > At 28/01/03 28/01/03 -0800, Lu wrote: > >Unfortunately adding a unique user per domain is not a > viable solution > >for a lot of people especially when there are thousands of domains. > > > >I have implemented domain quota by tweaking old vpopmail code before > >maildirquota was implemented. Basically disabling user quota and > >recalculate quota for the entire domain when new mail arrives. Then > >comparing this number to the value MaxQuota inside > .qmailadmin-limits > >to determine whether the entire domain is over quota or not. It is > >rather inefficient but it mostly works. > > > >Now I want to do the same with new vpopmail but I don't understand > >enough about the new way in which it calculates quota. > > > >If someone is more well verse and willing to do this, let me > know and I > >can help. Otherwise, I will still attempt it but it will > take a looong > >time to study the code. > > > >Thanks. > > > >Lu > > > > > > > -Original Message- > > > From: Claudio Nieder [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 28, 2003 1:53 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: [vchkpw] disk quota per domain > > > > > > > > > Hi, > > > > > > > Please give the workable answer... > >
RE: [vchkpw] disk quota per domain
There is already domain limits from the qmailadmin-limits file/table. I don't believe in the concept of sum(user limits) == domain limit Most users will need a small quota, however there are times when they'll need more just for a once in a blue time to get a large attachment through, but overall don't require a large quota. Making the postmaster rearrange quotas on a regular basis is not practical, especially when the quota extention is requested is typically too late. We already *have* a workable solution. Use system limits. For those that want domain limits compiled into vdelivermail, I already have it written in my 5.2 code. I just need to port it to the 5.3.16 code. The only change is to use the vget_limits() API. But due to performance, I believe 99% of the users should still use system quotas due to the heavy performance hit *on every message delivered*. I have over 700,000 messages delivered each day. I had to take out the extra hit on domain limits. System quotas work just fine, especially on systems with over a thousand domains. Brian > That actually sounds like it may work. > > Another solution may be this: > Since qmailadmin now allows postmaster to allocate quota per user, what > if we introduce a limit that restricts how much quota the postmaster has > to distribute. > > This would give us the flexibility to allocate quota per domain and the > postmaster for that domain can re-allocate to the user. > > So we can still see how much each user is using whereas your solution > will not. > > What do you say Ken/Bill ? > > Regards, > > Lu > > > -Original Message- > > From: tonix (Antonio Nati) [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, January 29, 2003 1:54 PM > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > > Subject: RE: [vchkpw] disk quota per domain > > > > > > I'm thinking to a new solution, modifying qmailadmin as follows. > > > > A unique ".qmailmaildirsize" should be created in the domain, > > and every > > user should have his own "maildirsize" linked by an "ln -sf" to the > > domain's ".qmailmaildirsize". > > > > \domain > > \domain\.qmailmaildirsize > > [global] > > \domain\user1\Maildir\maildirsize --> > > ..\..\.maildirsize[-> global] > > \domain\user2\Maildir\maildirsize --> > > ..\..\.maildirsize[-> global] > > \domain\user3\Maildir\maildirsize --> > > ..\..\.maildirsize[-> global] > > \domain\user4\Maildir\maildirsize > > [alone] > > \domain\user5\Maildir\maildirsize > > [alone] > > > > Each user using the domain quota should have the same quota > > (equal to the > > domain quota itself). > > > > Users with own quota don't use this mechanism and have their private > > "maildirsize". > > > > The only major add should be a routine to recheck the > > "domain's global > > usage" when domain's ".qmailmaildirsize" is created (or > > recreated after > > deletion), counting only users working with global "maildirsize". > > > > Main problem I see could be the lock on the global > > ".maildirsize", domains > > (with global quota) with thousands of very active users could > > slow down on > > receiving messages. > > > > All that should work with a very few modifications (none in vdeliver, > > vpopmail, etc., only a few in qmailadmin). > > > > Tonino > > > > At 28/01/03 28/01/03 -0800, Lu wrote: > > >Unfortunately adding a unique user per domain is not a > > viable solution > > >for a lot of people especially when there are thousands of domains. > > > > > >I have implemented domain quota by tweaking old vpopmail code before > > >maildirquota was implemented. Basically disabling user quota and > > >recalculate quota for the entire domain when new mail arrives. Then > > >comparing this number to the value MaxQuota inside > > .qmailadmin-limits > > >to determine whether the entire domain is over quota or not. It is > > >rather inefficient but it mostly works. > > > > > >Now I want to do the same with new vpopmail but I don't understand > > >enough about the new way in which it calculates quota. > > > > >
RE: [vchkpw] disk quota per domain
That actually sounds like it may work. Another solution may be this: Since qmailadmin now allows postmaster to allocate quota per user, what if we introduce a limit that restricts how much quota the postmaster has to distribute. This would give us the flexibility to allocate quota per domain and the postmaster for that domain can re-allocate to the user. So we can still see how much each user is using whereas your solution will not. What do you say Ken/Bill ? Regards, Lu > -Original Message- > From: tonix (Antonio Nati) [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 29, 2003 1:54 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [vchkpw] disk quota per domain > > > I'm thinking to a new solution, modifying qmailadmin as follows. > > A unique ".qmailmaildirsize" should be created in the domain, > and every > user should have his own "maildirsize" linked by an "ln -sf" to the > domain's ".qmailmaildirsize". > > \domain > \domain\.qmailmaildirsize > [global] > \domain\user1\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user2\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user3\Maildir\maildirsize --> > ..\..\.maildirsize[-> global] > \domain\user4\Maildir\maildirsize > [alone] > \domain\user5\Maildir\maildirsize > [alone] > > Each user using the domain quota should have the same quota > (equal to the > domain quota itself). > > Users with own quota don't use this mechanism and have their private > "maildirsize". > > The only major add should be a routine to recheck the > "domain's global > usage" when domain's ".qmailmaildirsize" is created (or > recreated after > deletion), counting only users working with global "maildirsize". > > Main problem I see could be the lock on the global > ".maildirsize", domains > (with global quota) with thousands of very active users could > slow down on > receiving messages. > > All that should work with a very few modifications (none in vdeliver, > vpopmail, etc., only a few in qmailadmin). > > Tonino > > At 28/01/03 28/01/03 -0800, Lu wrote: > >Unfortunately adding a unique user per domain is not a > viable solution > >for a lot of people especially when there are thousands of domains. > > > >I have implemented domain quota by tweaking old vpopmail code before > >maildirquota was implemented. Basically disabling user quota and > >recalculate quota for the entire domain when new mail arrives. Then > >comparing this number to the value MaxQuota inside > .qmailadmin-limits > >to determine whether the entire domain is over quota or not. It is > >rather inefficient but it mostly works. > > > >Now I want to do the same with new vpopmail but I don't understand > >enough about the new way in which it calculates quota. > > > >If someone is more well verse and willing to do this, let me > know and I > >can help. Otherwise, I will still attempt it but it will > take a looong > >time to study the code. > > > >Thanks. > > > >Lu > > > > > > > -Original Message- > > > From: Claudio Nieder [mailto:[EMAIL PROTECTED]] > > > Sent: Tuesday, January 28, 2003 1:53 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: [vchkpw] disk quota per domain > > > > > > > > > Hi, > > > > > > > Please give the workable answer... > > > > > > Use vaddoains -u option to assign to each domain a different user > > > and use your OS quota facility to assign each user the desired > > > quota. > > > > > > claudio > > > -- > > > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 > 6743 yahoo > > > messenger: claudionieder aim: claudionieder icq:42315212 > > > mailto:[EMAIL PROTECTED]http://www.claudio.ch > > > > > > > Inter@zioniInterazioni di Antonio Nati > http://www.interazioni.it [EMAIL PROTECTED] > >
RE: [vchkpw] disk quota per domain
I'm thinking to a new solution, modifying qmailadmin as follows. A unique ".qmailmaildirsize" should be created in the domain, and every user should have his own "maildirsize" linked by an "ln -sf" to the domain's ".qmailmaildirsize". \domain \domain\.qmailmaildirsize [global] \domain\user1\Maildir\maildirsize --> ..\..\.maildirsize[-> global] \domain\user2\Maildir\maildirsize --> ..\..\.maildirsize[-> global] \domain\user3\Maildir\maildirsize --> ..\..\.maildirsize[-> global] \domain\user4\Maildir\maildirsize [alone] \domain\user5\Maildir\maildirsize [alone] Each user using the domain quota should have the same quota (equal to the domain quota itself). Users with own quota don't use this mechanism and have their private "maildirsize". The only major add should be a routine to recheck the "domain's global usage" when domain's ".qmailmaildirsize" is created (or recreated after deletion), counting only users working with global "maildirsize". Main problem I see could be the lock on the global ".maildirsize", domains (with global quota) with thousands of very active users could slow down on receiving messages. All that should work with a very few modifications (none in vdeliver, vpopmail, etc., only a few in qmailadmin). Tonino At 28/01/03 28/01/03 -0800, Lu wrote: Unfortunately adding a unique user per domain is not a viable solution for a lot of people especially when there are thousands of domains. I have implemented domain quota by tweaking old vpopmail code before maildirquota was implemented. Basically disabling user quota and recalculate quota for the entire domain when new mail arrives. Then comparing this number to the value MaxQuota inside .qmailadmin-limits to determine whether the entire domain is over quota or not. It is rather inefficient but it mostly works. Now I want to do the same with new vpopmail but I don't understand enough about the new way in which it calculates quota. If someone is more well verse and willing to do this, let me know and I can help. Otherwise, I will still attempt it but it will take a looong time to study the code. Thanks. Lu > -Original Message----- > From: Claudio Nieder [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 28, 2003 1:53 AM > To: [EMAIL PROTECTED] > Subject: Re: [vchkpw] disk quota per domain > > > Hi, > > > Please give the workable answer... > > Use vaddoains -u option to assign to each domain a different > user and use your OS quota facility to assign each user the > desired quota. > > claudio > -- > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 > 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212 > mailto:[EMAIL PROTECTED]http://www.claudio.ch > Inter@zioniInterazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
Re: [vchkpw] disk quota per domain
On Wednesday, January 29, 2003, at 06:31 AM, Brian Kolaci wrote: I too had put in code to calculate real quota based on recursively doing stat's. This seems to chew up *alot* of resources. I have over a thousand domains and its hasn't been an issue to have a username per domain. In fact, it works well and better than when the quota code was in vdelivermail. I've since stopped adding my own patch. I'm seeing that the quota code in there now doesn't seem to return the correct information. For several users, vuserinfo seems to return 100% full all the time (when they used 1.25 Meg out of 100 Meg). I'd like to move the get_du() code from the qmailadmin code to the vpopmail library. Bill/Ken, is this OK? This is a platform independent routine that gets the disk usage for a directory tree. This can be called either on the user's directory or the domain's directory to get the corresponding values. We can then build a switch in vdelivermail to use this for the domain limits. I'm not sure how to get the maildir quotas working for per-domain, but in my case I'm seeing that they haven't been too reliable. I have customers complaining that sometimes mail is bouncing when they're only using 1Mb of space. The important thing is to adhere to this document: http://inter7.com/courierimap/README.maildirquota.html It is very specific about the procedure of measuring quota usage. When I implemented maildir++ in vdelivermail and qmail-pop3d/qmail-local, I just adapted Sam's code from maildrop. Regards, Bill
RE: [vchkpw] disk quota per domain
I too had put in code to calculate real quota based on recursively doing stat's. This seems to chew up *alot* of resources. I have over a thousand domains and its hasn't been an issue to have a username per domain. In fact, it works well and better than when the quota code was in vdelivermail. I've since stopped adding my own patch. I'm seeing that the quota code in there now doesn't seem to return the correct information. For several users, vuserinfo seems to return 100% full all the time (when they used 1.25 Meg out of 100 Meg). I'd like to move the get_du() code from the qmailadmin code to the vpopmail library. Bill/Ken, is this OK? This is a platform independent routine that gets the disk usage for a directory tree. This can be called either on the user's directory or the domain's directory to get the corresponding values. We can then build a switch in vdelivermail to use this for the domain limits. I'm not sure how to get the maildir quotas working for per-domain, but in my case I'm seeing that they haven't been too reliable. I have customers complaining that sometimes mail is bouncing when they're only using 1Mb of space. > Unfortunately adding a unique user per domain is not a viable solution > for a lot of people especially when there are thousands of domains. > > I have implemented domain quota by tweaking old vpopmail code before > maildirquota was implemented. Basically disabling user quota and > recalculate quota for the entire domain when new mail arrives. Then > comparing this number to the value MaxQuota inside .qmailadmin-limits to > determine whether the entire domain is over quota or not. It is rather > inefficient but it mostly works. > > Now I want to do the same with new vpopmail but I don't understand > enough about the new way in which it calculates quota. > > If someone is more well verse and willing to do this, let me know and I > can help. Otherwise, I will still attempt it but it will take a looong > time to study the code. > > Thanks. > > Lu > > > > -Original Message- > > From: Claudio Nieder [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, January 28, 2003 1:53 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [vchkpw] disk quota per domain > > > > > > Hi, > > > > > Please give the workable answer... > > > > Use vaddoains -u option to assign to each domain a different > > user and use your OS quota facility to assign each user the > > desired quota. > > > > claudio > > -- > > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 > > 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212 > > mailto:[EMAIL PROTECTED]http://www.claudio.ch > > > > Brian Galaxy Networks, Inc.
RE: [vchkpw] disk quota per domain
Unfortunately adding a unique user per domain is not a viable solution for a lot of people especially when there are thousands of domains. I have implemented domain quota by tweaking old vpopmail code before maildirquota was implemented. Basically disabling user quota and recalculate quota for the entire domain when new mail arrives. Then comparing this number to the value MaxQuota inside .qmailadmin-limits to determine whether the entire domain is over quota or not. It is rather inefficient but it mostly works. Now I want to do the same with new vpopmail but I don't understand enough about the new way in which it calculates quota. If someone is more well verse and willing to do this, let me know and I can help. Otherwise, I will still attempt it but it will take a looong time to study the code. Thanks. Lu > -Original Message- > From: Claudio Nieder [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 28, 2003 1:53 AM > To: [EMAIL PROTECTED] > Subject: Re: [vchkpw] disk quota per domain > > > Hi, > > > Please give the workable answer... > > Use vaddoains -u option to assign to each domain a different > user and use your OS quota facility to assign each user the > desired quota. > > claudio > -- > Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 > 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212 > mailto:[EMAIL PROTECTED]http://www.claudio.ch >
Re: [vchkpw] disk quota per domain
Hi, > Please give the workable answer... Use vaddoains -u option to assign to each domain a different user and use your OS quota facility to assign each user the desired quota. claudio -- Claudio Nieder, Kanalweg 1, CH-8610 Uster, Tel +41 79 357 6743 yahoo messenger: claudionieder aim: claudionieder icq:42315212 mailto:[EMAIL PROTECTED]http://www.claudio.ch
[vchkpw] disk quota per domain
Hi!!! I have installed Qmail+vpopmail+swwebmail on Redhat Linux 8.0 Now, I want to implement disk quota per virtualdomain. when I add a virtualdomain ./vadddomain manish.com -q 200 this option works as -q quota_in_bytes (sets the quota for postmaster account) Sets the quota for postmaster account. But as I have 25 virtualdomains, I want to allocate specified disk quota to each virtualdomain. And the postmaster of that virtualdomain can use that disk space as per his requirement with any number of users. I don't want to use sytem file quota. Please give the workable answer... Manish Jain System Admin ERDCI Noida -- MANISH JAIN Electronics Research & Development Center of India "Anusandhan Bhawan" C-56/1, Sector - 62, Noida - 201307 (U.P.) Ph. - 0120-2402551 to 60 (Ext. - 803/718)