Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
On Wednesday, October 23, 2002, at 12:55 AM, tonix (Antonio Nati) wrote: As usual, I don't see anything related to disablesmtp. Is this feature going to be merged in the main stream, or do I have to continue with my private copies? Yes, it will be merged. It's just been overlooked. I'll add it to 5.3.10. Anyway, two notes: 1) I feel that would be much better another layout, like: domain CHAR(64) PRIMARY KEY, option CHAR(64) PRIMARY KEY, value CHAR(64) NOT NULL that would permit to add other options more easily. Yes, but the downside is that the value field is way too big for items that just need to be 0 or 1. I don't know how much of an impact this will have, though. Brian: Any thoughts on this? Some of your code would have to be rewritten to do this. 2) I'ld like to have other options in qmailadmin-limits, that could permit to deny some functions to 'admin' users that are not 'postmaster': ex. deny_list_create deny_list_modify deny_list_users_modify deny_list_moderators_modify deny_account_create deny_alias_create Yes, this would be great. Do you have any code that implements this? Regards, Bill Shupp
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
At 23/10/02 23/10/02 -0700, Bill Shupp wrote: On Wednesday, October 23, 2002, at 12:55 AM, tonix (Antonio Nati) wrote: 2) I'ld like to have other options in qmailadmin-limits, that could permit to deny some functions to 'admin' users that are not 'postmaster': ex. deny_list_create deny_list_modify deny_list_users_modify deny_list_moderators_modify deny_account_create deny_alias_create Yes, this would be great. Do you have any code that implements this? No Bill, I'm just willing to do it. If it looks interesting, I'll raise its priority among my jobs. It could be interesting to know what to deny, in all's opinion. Tonino Regards, Bill Shupp
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
On Wednesday, October 23, 2002, at 01:17 PM, tonix (Antonio Nati) wrote: At 23/10/02 23/10/02 -0700, Bill Shupp wrote: On Wednesday, October 23, 2002, at 12:55 AM, tonix (Antonio Nati) wrote: 2) I'ld like to have other options in qmailadmin-limits, that could permit to deny some functions to 'admin' users that are not 'postmaster': ex. deny_list_create deny_list_modify deny_list_users_modify deny_list_moderators_modify deny_account_create deny_alias_create Yes, this would be great. Do you have any code that implements this? No Bill, I'm just willing to do it. If it looks interesting, I'll raise its priority among my jobs. It could be interesting to know what to deny, in all's opinion. Ideally, I want to have all the same functionality in qmailadmin that EZWEB has. Some thought needs to go into that, as well as the limits you are suggesting. I won't have time to work on that right now, as I'm still trying to integrate other things. Regards, Bill Shupp
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
At 23/10/02 23/10/02 -0700, Bill Shupp wrote: On Wednesday, October 23, 2002, at 12:55 AM, tonix (Antonio Nati) wrote: As usual, I don't see anything related to disablesmtp. Is this feature going to be merged in the main stream, or do I have to continue with my private copies? Yes, it will be merged. It's just been overlooked. I'll add it to 5.3.10. Bill, I was speaking mainly about qmailadmin. It's not included in the last version, not in the suggested MySQL notes below. That's the reason for which I was suggesting to change layout, in order to add new options without working too much on MySQL. Anyway, two notes: 1) I feel that would be much better another layout, like: domain CHAR(64) PRIMARY KEY, option CHAR(64) PRIMARY KEY, value CHAR(64) NOT NULL that would permit to add other options more easily. Yes, but the downside is that the value field is way too big for items that just need to be 0 or 1. I don't know how much of an impact this will have, though. Why not to use VARCHAR fields? Brian: Any thoughts on this? Some of your code would have to be rewritten to do this. 2) I'ld like to have other options in qmailadmin-limits, that could permit to deny some functions to 'admin' users that are not 'postmaster': ex. deny_list_create deny_list_modify deny_list_users_modify deny_list_moderators_modify deny_account_create deny_alias_create Yes, this would be great. Do you have any code that implements this? These options would be impossible to add with the 'fixed' MySQL layout, unless you create a huge record to manage them. Tonino
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
As usual, I don't see anything related to disablesmtp. Is this feature going to be merged in the main stream, or do I have to continue with my private copies? Anyway, two notes: 1) I feel that would be much better another layout, like: domain CHAR(64) PRIMARY KEY, option CHAR(64) PRIMARY KEY, value CHAR(64) NOT NULL that would permit to add other options more easily. 2) I'ld like to have other options in qmailadmin-limits, that could permit to deny some functions to 'admin' users that are not 'postmaster': ex. deny_list_create deny_list_modify deny_list_users_modify deny_list_moderators_modify deny_account_create deny_alias_create Any idea or suggestion? Tonino At 22/10/02 22/10/02 -0700, Bill Shupp wrote: On Tuesday, October 22, 2002, at 02:37 PM, Brian Kolaci wrote: The layout should have been in vmysql.h. I must have tested the wrong directory when I thought I tested 5.3.9. I see its missing. This should be appended to vmysql.h: #ifdef ENABLE_MYSQL_LIMITS #define LIMITS_TABLE_LAYOUT domain CHAR(64) PRIMARY KEY, \ maxpopaccounts INT(10) NOT NULL DEFAULT -1, \ maxaliases INT(10) NOT NULL DEFAULT -1, \ maxforwards INT(10) NOT NULL DEFAULT -1, \ maxautoresponders INT(10) NOT NULL DEFAULT -1, \ maxmailinglists INT(10) NOT NULL DEFAULT -1, \ diskquota INT(12) NOT NULL DEFAULT 0, \ defaultquotaINT(12) NOT NULL DEFAULT 0, \ disablepop TINYINT(1) NOT NULL DEFAULT 0, \ disableimap TINYINT(1) NOT NULL DEFAULT 0, \ disabledialup TINYINT(1) NOT NULL DEFAULT 0, \ disablepasswordchanging TINYINT(1) NOT NULL DEFAULT 0, \ disablewebmail TINYINT(1) NOT NULL DEFAULT 0, \ disablerelayTINYINT(1) NOT NULL DEFAULT 0 #endif There's also a potential problem reading the ascii file and interpreting the k or m symbols for quotas. Bill said he'd like it to use the format_maildirquota() function, however I've updated my copy to parse out the symbols and multiply by 1024 or 1024*1024, but I'm not sure if this is the vpopmail standard. Bill: Shall I put a patch for these two items ? I must have sent you the incorrect patch file (I had two, one with the vmysql.h changes and one without). Thanks, I've added the above definition to vmysql.h. format_maildirquota() also accounts for message counts, i.e. Maildir++ style quotas, which is why I want to use it rather than just converting the number. Can you supply me a patch of what you did, and I'll work from there? Regards, Bill Inter@zioniInterazioni di Antonio Nati http://www.interazioni.it [EMAIL PROTECTED]
RE: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
I can see the new 5.3.9 dev release has this functinality implemented. Only one problem, someone forgot to include the table layout. As I can see, then the patch isn't complete either. example. vmysql.h misses the LIMITS_TABLE_LAYOUT define and I think it goes for the rest of the sql files. Has anyone come around making a patch for this ? Or do I just wait for the next dev release ? Jakob Kruse -Original Message- From: Ken Jones [mailto:kbo;Inter7.com] Sent: 17. oktober 2002 20:36 To: Brian Kolaci Cc: [EMAIL PROTECTED] Subject: Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits Excellent! I've been wanting to add this functionality to vpopmail for a long time. Nice work, clean api. I'll try to get them added to the next devel release. Ken Jones On Thursday 17 October 2002 01:19 pm, Brian Kolaci wrote: Hi, I mentioned this awhile back, but didn't have the cycles to create a diff file. I finally had the time so here it is... I've been using this in version 5.2 and even back in 4.9.6. I've attached a diff file to add the functions int vget_limits( char *domain, struct vlimits *limits ) int vset_limits( char *domain, struct vlimits *limits ) int vdel_limits( char *domain ) to the vpopmail library. These maintain either the raw file .qmailadmin-limits or will maintain the limits in a MySQL database. The items supported are: struct vlimits { int maxpopaccounts; int maxaliases; int maxforwards; int maxautoresponders; int maxmailinglists; int diskquota; int defaultquota; short disablepop; short disableimap; short disabledialup; short disablepasswordchanging; short disablewebmail; short disablerelay; }; I haven't included the changes to qmailadmin that I use, nor the changes to vdelivermail (for domain quota). diskquota is the current quota for a domain. defaultquota is the default quota for new users of this domain. The other items I believe are self explanatory. The config is updated so you would call --enable-mysql-limits as an option to configure. Hopefully you'll find this useful. Thanks, Brian
RE: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
The layout should have been in vmysql.h. I must have tested the wrong directory when I thought I tested 5.3.9. I see its missing. This should be appended to vmysql.h: #ifdef ENABLE_MYSQL_LIMITS #define LIMITS_TABLE_LAYOUT domain CHAR(64) PRIMARY KEY, \ maxpopaccounts INT(10) NOT NULL DEFAULT -1, \ maxaliases INT(10) NOT NULL DEFAULT -1, \ maxforwards INT(10) NOT NULL DEFAULT -1, \ maxautoresponders INT(10) NOT NULL DEFAULT -1, \ maxmailinglists INT(10) NOT NULL DEFAULT -1, \ diskquota INT(12) NOT NULL DEFAULT 0, \ defaultquotaINT(12) NOT NULL DEFAULT 0, \ disablepop TINYINT(1) NOT NULL DEFAULT 0, \ disableimap TINYINT(1) NOT NULL DEFAULT 0, \ disabledialup TINYINT(1) NOT NULL DEFAULT 0, \ disablepasswordchanging TINYINT(1) NOT NULL DEFAULT 0, \ disablewebmail TINYINT(1) NOT NULL DEFAULT 0, \ disablerelayTINYINT(1) NOT NULL DEFAULT 0 #endif There's also a potential problem reading the ascii file and interpreting the k or m symbols for quotas. Bill said he'd like it to use the format_maildirquota() function, however I've updated my copy to parse out the symbols and multiply by 1024 or 1024*1024, but I'm not sure if this is the vpopmail standard. Bill: Shall I put a patch for these two items ? I must have sent you the incorrect patch file (I had two, one with the vmysql.h changes and one without). Thanks, Brian I can see the new 5.3.9 dev release has this functinality implemented. Only one problem, someone forgot to include the table layout. As I can see, then the patch isn't complete either. example. vmysql.h misses the LIMITS_TABLE_LAYOUT define and I think it goes for the rest of the sql files. Has anyone come around making a patch for this ? Or do I just wait for the next dev release ? Jakob Kruse -Original Message- From: Ken Jones [mailto:kbo;Inter7.com] Sent: 17. oktober 2002 20:36 To: Brian Kolaci Cc: [EMAIL PROTECTED] Subject: Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits Excellent! I've been wanting to add this functionality to vpopmail for a long time. Nice work, clean api. I'll try to get them added to the next devel release. Ken Jones On Thursday 17 October 2002 01:19 pm, Brian Kolaci wrote: Hi, I mentioned this awhile back, but didn't have the cycles to create a diff file. I finally had the time so here it is... I've been using this in version 5.2 and even back in 4.9.6. I've attached a diff file to add the functions int vget_limits( char *domain, struct vlimits *limits ) int vset_limits( char *domain, struct vlimits *limits ) int vdel_limits( char *domain ) to the vpopmail library. These maintain either the raw file .qmailadmin-limits or will maintain the limits in a MySQL database. The items supported are: struct vlimits { int maxpopaccounts; int maxaliases; int maxforwards; int maxautoresponders; int maxmailinglists; int diskquota; int defaultquota; short disablepop; short disableimap; short disabledialup; short disablepasswordchanging; short disablewebmail; short disablerelay; }; I haven't included the changes to qmailadmin that I use, nor the changes to vdelivermail (for domain quota). diskquota is the current quota for a domain. defaultquota is the default quota for new users of this domain. The other items I believe are self explanatory. The config is updated so you would call --enable-mysql-limits as an option to configure. Hopefully you'll find this useful. Thanks, Brian
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
Hi Brian Kolaci, you wrote. BK to the vpopmail library. These maintain either the BK raw file .qmailadmin-limits or will maintain the limits BK in a MySQL database. The items supported are: BK struct vlimits { BK int maxpopaccounts; BK int maxaliases; BK int maxforwards; BK int maxautoresponders; BK int maxmailinglists; BK int diskquota; BK int defaultquota; BK short disablepop; BK short disableimap; BK short disabledialup; BK short disablepasswordchanging; BK short disablewebmail; BK short disablerelay; BK }; Shouldn't the shorts rather be booleans? Or is there something inbetween disabled and enabled? Regards, Gabriel
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
I didn't know they added a boolean type to the C language. When they do, we can easily make the change. Brian Hi Brian Kolaci, you wrote. BK to the vpopmail library. These maintain either the BK raw file .qmailadmin-limits or will maintain the limits BK in a MySQL database. The items supported are: BK struct vlimits { BK int maxpopaccounts; BK int maxaliases; BK int maxforwards; BK int maxautoresponders; BK int maxmailinglists; BK int diskquota; BK int defaultquota; BK short disablepop; BK short disableimap; BK short disabledialup; BK short disablepasswordchanging; BK short disablewebmail; BK short disablerelay; BK }; Shouldn't the shorts rather be booleans? Or is there something inbetween disabled and enabled? Regards, Gabriel
Re: [vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
Excellent! I've been wanting to add this functionality to vpopmail for a long time. Nice work, clean api. I'll try to get them added to the next devel release. Ken Jones On Thursday 17 October 2002 01:19 pm, Brian Kolaci wrote: Hi, I mentioned this awhile back, but didn't have the cycles to create a diff file. I finally had the time so here it is... I've been using this in version 5.2 and even back in 4.9.6. I've attached a diff file to add the functions int vget_limits( char *domain, struct vlimits *limits ) int vset_limits( char *domain, struct vlimits *limits ) int vdel_limits( char *domain ) to the vpopmail library. These maintain either the raw file .qmailadmin-limits or will maintain the limits in a MySQL database. The items supported are: struct vlimits { int maxpopaccounts; int maxaliases; int maxforwards; int maxautoresponders; int maxmailinglists; int diskquota; int defaultquota; short disablepop; short disableimap; short disabledialup; short disablepasswordchanging; short disablewebmail; short disablerelay; }; I haven't included the changes to qmailadmin that I use, nor the changes to vdelivermail (for domain quota). diskquota is the current quota for a domain. defaultquota is the default quota for new users of this domain. The other items I believe are self explanatory. The config is updated so you would call --enable-mysql-limits as an option to configure. Hopefully you'll find this useful. Thanks, Brian
[vchkpw] patch for vpopmail 5.3.8 for .qmailadmin-limits
Hi, I mentioned this awhile back, but didn't have the cycles to create a diff file. I finally had the time so here it is... I've been using this in version 5.2 and even back in 4.9.6. I've attached a diff file to add the functions int vget_limits( char *domain, struct vlimits *limits ) int vset_limits( char *domain, struct vlimits *limits ) int vdel_limits( char *domain ) to the vpopmail library. These maintain either the raw file .qmailadmin-limits or will maintain the limits in a MySQL database. The items supported are: struct vlimits { int maxpopaccounts; int maxaliases; int maxforwards; int maxautoresponders; int maxmailinglists; int diskquota; int defaultquota; short disablepop; short disableimap; short disabledialup; short disablepasswordchanging; short disablewebmail; short disablerelay; }; I haven't included the changes to qmailadmin that I use, nor the changes to vdelivermail (for domain quota). diskquota is the current quota for a domain. defaultquota is the default quota for new users of this domain. The other items I believe are self explanatory. The config is updated so you would call --enable-mysql-limits as an option to configure. Hopefully you'll find this useful. Thanks, Brian diff -c vpopmail-5.3.8.orig/Makefile.am vpopmail-5.3.8/Makefile.am *** vpopmail-5.3.8.orig/Makefile.am Thu Jun 20 19:04:23 2002 --- vpopmail-5.3.8/Makefile.am Thu Oct 17 10:54:42 2002 *** *** 4,10 noinst_LIBRARIES=libvpopmail.a ! COMMONSOURCES=vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c CONFIG_CLEAN_FILES=vauth.c libvpopmail_a_SOURCES=$(COMMONSOURCES) --- 4,10 noinst_LIBRARIES=libvpopmail.a ! COMMONSOURCES=vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c vlimits.c CONFIG_CLEAN_FILES=vauth.c libvpopmail_a_SOURCES=$(COMMONSOURCES) *** *** 99,104 --- 99,105 cp config.h $(DESTDIR)@vpopmaildir@/include cp config.h $(DESTDIR)@vpopmaildir@/include/vpopmail_config.h cp vauth.h$(DESTDIR)@vpopmaildir@/include + cp vlimits.h $(DESTDIR)@vpopmaildir@/include cp doc/man_html/* $(DESTDIR)@vpopmaildir@/doc/man_html cp doc/doc_html/* $(DESTDIR)@vpopmaildir@/doc/doc_html diff -c vpopmail-5.3.8.orig/Makefile.in vpopmail-5.3.8/Makefile.in *** vpopmail-5.3.8.orig/Makefile.in Tue Jul 16 16:58:40 2002 --- vpopmail-5.3.8/Makefile.in Thu Oct 17 10:57:21 2002 *** *** 76,82 noinst_LIBRARIES = libvpopmail.a ! COMMONSOURCES = vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c CONFIG_CLEAN_FILES = vauth.c libvpopmail_a_SOURCES = $(COMMONSOURCES) --- 76,82 noinst_LIBRARIES = libvpopmail.a ! COMMONSOURCES = vpopmail.c md5.c bigdir.c vauth.c file_lock.c vpalias.c seek.c vlimits.c CONFIG_CLEAN_FILES = vauth.c libvpopmail_a_SOURCES = $(COMMONSOURCES) *** *** 162,168 LIBS = @LIBS@ libvpopmail_a_DEPENDENCIES = cdb/*.o libvpopmail_a_OBJECTS = vpopmail.o md5.o bigdir.o vauth.o file_lock.o \ ! vpalias.o seek.o AR = ar PROGRAMS = $(vpopmailbin_PROGRAMS) --- 162,168 LIBS = @LIBS@ libvpopmail_a_DEPENDENCIES = cdb/*.o libvpopmail_a_OBJECTS = vpopmail.o md5.o bigdir.o vauth.o file_lock.o \ ! vpalias.o seek.o vlimits.o AR = ar PROGRAMS = $(vpopmailbin_PROGRAMS) *** *** 693,698 --- 693,699 cp config.h $(DESTDIR)@vpopmaildir@/include cp config.h $(DESTDIR)@vpopmaildir@/include/vpopmail_config.h cp vauth.h$(DESTDIR)@vpopmaildir@/include + cp vlimits.h $(DESTDIR)@vpopmaildir@/include cp doc/man_html/* $(DESTDIR)@vpopmaildir@/doc/man_html cp doc/doc_html/* $(DESTDIR)@vpopmaildir@/doc/doc_html diff -c vpopmail-5.3.8.orig/acconfig.h vpopmail-5.3.8/acconfig.h *** vpopmail-5.3.8.orig/acconfig.h Thu Jun 20 23:12:35 2002 --- vpopmail-5.3.8/acconfig.h Thu Oct 17 10:47:57 2002 *** *** 38,43 --- 38,45 #undef ENABLE_MYSQL_LOGGING + #undef ENABLE_MYSQL_LIMITS + #undef CLEAR_PASS #undef VALIAS Common subdirectories: vpopmail-5.3.8.orig/attic and vpopmail-5.3.8/attic Common subdirectories: vpopmail-5.3.8.orig/cdb and vpopmail-5.3.8/cdb diff -c vpopmail-5.3.8.orig/configure vpopmail-5.3.8/configure *** vpopmail-5.3.8.orig/configure Tue Jul 16 16:58:40 2002 --- vpopmail-5.3.8/configureThu Oct 17 10:51:39 2002 *** *** 40,45 --- 40,47 ac_help=$ac_help --enable-mysql-logging=y|n Turn on (y) or off (n, default) logging detailed authentication attempts, only valid for mysql ac_help=$ac_help + --enable-mysql-limits=y|n Turn on (y) or off (n, default) mysql handling of +.qmailadmin-limits + ac_help=$ac_help