Re: [qmailadmin] qmailadmin quota patch
Whoops. Disregard that. Wrong address. On Wednesday 20 November 2002 16:38, Jesse Guardiani wrote: > Craig, > > I have acquired the source code from Jorge for the manager patch. > > Also, another programmer commented on some things about the implementation > of Jorge's patch that are worth noting: > > It doesn't apply a 'per-domain' quota, which is not good. If you give a > manager the ability to modify his domain's user quotas, he has no limits. > > This other programmer is also working on an implementation of the same > thing, but in a more logic implementation that includes per-domain quotas. > From what he said, it will be included in the next release. > > With this information in mind, I would recommend that we simply use the > base, UN-PATCHED, qmailadmin. This way customers can't modify quotas, but > WE still CAN through the vqadmin interface. > > Then we can upgrade to the improved version with the rest of the world at > release time. -- 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 We are actively looking for companies that do a lot of long distance faxing and want to cut their long distance bill by up to 50%. Contact [EMAIL PROTECTED] for more info.
[qmailadmin] qmailadmin-limits update
OK, I've finally found the time to work on the qmailadmin-limits API's for file and MySQL based storage. I've attached the patch for vpopmail 5.3.11, available at shupp.org. I've augmented the previous implementation to add the extra features requested and pretty much implemented what I stated in the email last month. All the feedback from the last post was positive, so I went straight from that email. The API routines are as follows: int vget_limits(char *domain, struct vlimits *limits); int vset_limits(char *domain, struct vlimits *limits); int vdel_limits(char *domain); The data structure to manipulate is: /* * permissions for non-postmaster admins */ #define VLIMIT_DISABLE_CREATE 0x01 #define VLIMIT_DISABLE_MODIFY 0x02 #define VLIMIT_DISABLE_DELETE 0x04 #define VLIMIT_DISABLE_ALL (VLIMIT_DISABLE_CREATE|VLIMIT_DISABLE_MODIFY|VLIMIT_DISABLE_DELETE) #define VLIMIT_DISABLE_BITS 3 struct vlimits { /* max service limits */ int maxpopaccounts; int maxaliases; int maxforwards; int maxautoresponders; int maxmailinglists; /* quota & message count limits */ int diskquota; int maxmsgcount; int defaultquota; int defaultmaxmsgcount; /* the following are 0 (false) or 1 (true) */ short disable_pop; short disable_imap; short disable_dialup; short disable_passwordchanging; short disable_webmail; short disable_relay; short disable_smtp; /* the following permissions are for non-postmaster admins */ short perm_account; short perm_alias; short perm_forward; short perm_autoresponder; short perm_maillist; short perm_maillist_users; short perm_maillist_moderators; short perm_quota; short perm_defaultquota; }; The permissions are a bit field with create, modify and delete permissions. This just provides the API routines. I personally have a modifed vdelivermail and qmailadmin that impose per user and per domain quotas that implement real disk based quotas, not maildir quotas, therefore I did not include them. The API's need to be incorporated into several programs. A new program is needed to manipulate the values in this table/file. Programs to be augmented are at least vqadmin, qmailadmin, vdelivermail as well as the vpopmail library routines themselves to use the API rather than hard coded values for quotas. The API has the disk quota and the max message count values split apart as two distinct values (for both the domain and the defaults for new users). The reason behind this is to quickly use the value as needed from the API. When a "new user" is added to the system, a maildir compliant quota will be constructed into a string containing both numbers. I felt it was easier to combine 2 numbers into a string rather than split a string into 2 integers, so why not have it done for you already. I'll be digging through the latest vdelivermail (my patched binary is a 5.2 version) to see how to integrate the new API into that next. I'll also take a look at qmailadmin right after that. It looks like qmailadmin is going to be the biggest to change. There will be work required to integrate the "disable..." flags into the various programs such as imap-mail, webmail, pop access, etc. Thanks, Brian Common subdirectories: vpopmail-5.3.11/attic and vpopmail-5.3.11.new/attic Common subdirectories: vpopmail-5.3.11/cdb and vpopmail-5.3.11.new/cdb Common subdirectories: vpopmail-5.3.11/contrib and vpopmail-5.3.11.new/contrib Common subdirectories: vpopmail-5.3.11/convert and vpopmail-5.3.11.new/convert Common subdirectories: vpopmail-5.3.11/doc and vpopmail-5.3.11.new/doc Common subdirectories: vpopmail-5.3.11/ldap and vpopmail-5.3.11.new/ldap Common subdirectories: vpopmail-5.3.11/oracle and vpopmail-5.3.11.new/oracle diff -rc vpopmail-5.3.11/vlimits.c vpopmail-5.3.11.new/vlimits.c *** vpopmail-5.3.11/vlimits.c Wed Oct 23 17:19:50 2002 --- vpopmail-5.3.11.new/vlimits.c Wed Nov 20 15:17:50 2002 *** *** 38,52 limits->maxforwards = -1; limits->maxautoresponders = -1; limits->maxmailinglists = -1; limits->diskquota = 0; ! limits->defaultquota = ""; ! limits->disablepop = 0; ! limits->disableimap = 0; ! limits->disabledialup = 0; ! limits->disablepasswordchanging = 0; ! limits->disablerelay = 0; ! limits->disablesmtp = 0; ! limits->disablewebmail = 0; /* get filename */ vget_assign(domain, dir, sizeof(dir), &uid, &gid); --- 38,66 limits->maxforwards = -1; limits->maxautoresponders = -1; limits->maxmailinglists = -1; + /* + already set to zero from memset() limits->diskquota = 0; ! limits->maxmsgcount = 0; ! limits->defaultquota = 0; ! limits->defaultmaxmsgcount = 0; ! limits->disable_p
[qmailadmin] qmailadmin quota patch
Craig, I have acquired the source code from Jorge for the manager patch. Also, another programmer commented on some things about the implementation of Jorge's patch that are worth noting: It doesn't apply a 'per-domain' quota, which is not good. If you give a manager the ability to modify his domain's user quotas, he has no limits. This other programmer is also working on an implementation of the same thing, but in a more logic implementation that includes per-domain quotas. From what he said, it will be included in the next release. With this information in mind, I would recommend that we simply use the base, UN-PATCHED, qmailadmin. This way customers can't modify quotas, but WE still CAN through the vqadmin interface. Then we can upgrade to the improved version with the rest of the world at release time. -- 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 We are actively looking for companies that do a lot of long distance faxing and want to cut their long distance bill by up to 50%. Contact [EMAIL PROTECTED] for more info.
Re: [qmailadmin] quota patch ( Jorge Valdes)
Brian, I agree with you 100% this is not the best way to go about it, but (and there always is) I needed a quick and dirty way to allow this funcionality for a system I have in production, and after looking at the code this was a simple (1/2 day coding/testing) solution to my problem. I would be glad to help with coding and/or ideas for this new API. I would like to know what *alot* of other information is :) Jorge Valdes. - Original Message - From: "Brian Kolaci" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 20, 2002 2:45 PM Subject: Re: [qmailadmin] quota patch ( Jorge Valdes) Hi, I suggest you wait just a bit. I *finally* started working on the .qmailadmin-limits API's that include *alot* of other information. I believe this patch does the incorrect behaviour. The permissions on managers should be configurable, not hard-coded yes or no (and I disagree with the approach taken in the patch) I'm also of the believe that there are two quotas, per user and per domain, which leads down the trail of allow them to set any quotas on a per-user basis as the end-user manager wants, and the per-domain quota should not be editable by anyone except the system administrator (not even the postmaster). I should have the patch ready for 5.3.11 shortly. Thanks, Brian > Howdy list, > > I JUST signed up. I had to! I saw in the archive for yesterday that Jorge > Valdes had created a "manager" patch for qmailadmin. > > Where can I find this patch? Has anyone besides Jorge successfully deployed > it? > > I've gotta have this thing! > > Thanks,
Re: [qmailadmin] quota patch ( Jorge Valdes)
Absolutely. I definately agree. However, I'm amazed and confused as to why this wasn't implemented a long time ago. I would think that this would be sought-after code by ISPs (and... really anyone with many domains). Then again, I don't suppose that many ISPs have the gumption to run this kind of software, eh? Man, it sure is purty, isn't it? I've never seen so many separate applications communicating in harmony before. The whole qmail/vpopmail/everything-else setup is very impressive. (I just installed and created ground-up documentation (for a SOURCE install, not a package install like the toaster pages. It came out to about 30 pages with full comments) for the first time this last week on FreeBSD) I suppose that the distributed nature of the install is also it's primary weekness though. If one application becomes un-supported and broken, the whole thing could die. Anyway, back to the subject at hand: I'll be running the advantages/disadvantages of both the Jorge patch and the unmodified version by my manager before we put this beastie in production. I'm still interested in acquiring this patch though. I want to review the code and see how it's implemented. How does one submit features for release in new versions around here? Thanks, On Wednesday 20 November 2002 15:45, Brian Kolaci wrote: > Hi, > > I suggest you wait just a bit. I *finally* started working > on the .qmailadmin-limits API's that include *alot* of > other information. I believe this patch does the incorrect > behaviour. The permissions on managers should be configurable, > not hard-coded yes or no (and I disagree with the approach > taken in the patch) I'm also of the believe that there are > two quotas, per user and per domain, which leads down the trail > of allow them to set any quotas on a per-user basis as the > end-user manager wants, and the per-domain quota should > not be editable by anyone except the system administrator (not > even the postmaster). > > I should have the patch ready for 5.3.11 shortly. > > Thanks, > > Brian > > > Howdy list, > > > > I JUST signed up. I had to! I saw in the archive for yesterday that > > Jorge Valdes had created a "manager" patch for qmailadmin. > > > > Where can I find this patch? Has anyone besides Jorge successfully > > deployed it? > > > > I've gotta have this thing! > > > > Thanks, -- 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 We are actively looking for companies that do a lot of long distance faxing and want to cut their long distance bill by up to 50%. Contact [EMAIL PROTECTED] for more info.
Re: [qmailadmin] quota patch ( Jorge Valdes)
Hi, I suggest you wait just a bit. I *finally* started working on the .qmailadmin-limits API's that include *alot* of other information. I believe this patch does the incorrect behaviour. The permissions on managers should be configurable, not hard-coded yes or no (and I disagree with the approach taken in the patch) I'm also of the believe that there are two quotas, per user and per domain, which leads down the trail of allow them to set any quotas on a per-user basis as the end-user manager wants, and the per-domain quota should not be editable by anyone except the system administrator (not even the postmaster). I should have the patch ready for 5.3.11 shortly. Thanks, Brian > Howdy list, > > I JUST signed up. I had to! I saw in the archive for yesterday that Jorge > Valdes had created a "manager" patch for qmailadmin. > > Where can I find this patch? Has anyone besides Jorge successfully deployed > it? > > I've gotta have this thing! > > Thanks,
[qmailadmin] quota patch ( Jorge Valdes)
Howdy list, I JUST signed up. I had to! I saw in the archive for yesterday that Jorge Valdes had created a "manager" patch for qmailadmin. Where can I find this patch? Has anyone besides Jorge successfully deployed it? I've gotta have this thing! Thanks, -- 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 We are actively looking for companies that do a lot of long distance faxing and want to cut their long distance bill by up to 50%. Contact [EMAIL PROTECTED] for more info.