[qmailadmin] Fix to user edit problem with qmailadmin-1.0.7.01142003
I found the problem when trying to modify the user when the Quota is ON. File user.c Original Lines #ifdef MODIFY_QUOTA if (AdminType == DOMAIN_ADMIN) { send_template( "mod_user_new.html" ); } else { send_template( "mod_user.html" ); } #else send_template( "mod_user_noquota.html" ); #endif Fixed Lines #ifdef MODIFY_QUOTA if (AdminType == DOMAIN_ADMIN) { send_template( "mod_user_quota.html" ); } else { send_template( "mod_user_noquota.html" ); } #else send_template( "mod_user_noquota.html" ); #endif
RE: [qmailadmin] New 1.0.7 01/13/2003 version available
I just checked the code, in user.c and it looks like the quota patch allows for setting the quota to any value. Just added new code to #ifdef ENABLE_MODIFY_QUOTA in the add and modify user code to completely disable setting quota's if --enable-modify-quota=n Also just updated the add_user template to use add_user_quota.html and add_user_noquota.html depending on MODIFY_ENABLE_QUOTA Also, I think some ifdef's would need to be added to the add mailing list screen This screen is showing a QUOTA box even if you have configured qmailadmin with --enable-modify-quota=n And if I can make one other v1.0.7 suggestion I don't think those links to the user and admin guides should be included on the qmailadmin login page. The pages they link to are not very generic, they contain information specific to the ISP that authored the instructions. These pages are going to cause a lot of confusion amongst qmailadmin end-users. By including the links you are also making qmailadmin reliant on a 3rd-party's web server and document authoring skills... Not such a hot idea in my opinion. Although some of us know how to go and remove such HTML from show_login.html, I think many less technical users are not going to know how to do this, and then they will be stuck with these confusing links on their login pages... Michael.
RE: [qmailadmin] Qmailadmin-1.0.7.01142003 compile problem under Solaris.
what does your man scandir say? The way that call has been written in the 1.0.7 code seems to match exactly with the example I get when I run man scandir on my Redhat linux box. part of the output of man scandir : EXAMPLE /* print files in current directory in reverse order */ #include dirent.h main(){ struct dirent **namelist; int n; n = scandir(., namelist, 0, alphasort); if (n 0) perror(scandir); else { while(n--) { printf(%s\n, namelist[n]-d_name); free(namelist[n]); } free(namelist); } } Not sure what the fix is to make it compatible with solaris.. ps. v1.0.7 does compile ok for me under redhat Michael. -Original Message- From: Steve Fulton [mailto:[EMAIL PROTECTED]] Sent: Thursday, 16 January 2003 2:46 PM To: [EMAIL PROTECTED] Subject: [qmailadmin] Qmailadmin-1.0.7.01142003 compile problem under Solaris. Hi all, I'm having difficulty compile Qmailadmin-1.0.7.01142003 under Solaris. I get this error: bash-2.03# make gcc -I. -I/var/vpopmail/include -g -O2 -c qmailadmin.c gcc -I. -I/var/vpopmail/include -g -O2 -c alias.c alias.c:33:21: sys/dir.h: No such file or directory alias.c: In function `show_dotqmail_lines': alias.c:82: `alphasort' undeclared (first use in this function) alias.c:82: (Each undeclared identifier is reported only once alias.c:82: for each function it appears in.) make: *** [alias.o] Error 1 As you can see, it does not know the alphasort function. According to man alphasort, it is part of sys/types.h and sys/dir.h .. I added those in manually to alias.c, and still had the same error. Any thoughts? -- Steve
RE: [qmailadmin] Qmailadmin-1.0.7.01142003 compile problem under Solaris.
At 14:48 16/01/2003 +1100, you wrote: what does your man scandir say? The result is identical to man alphasort. FYI, here is the revelant code: #include sys/types.h #include sys/dir.h int scandir(dirname, namelist, select, dcomp); char *dirname; struct direct *(*namelist[]); int (*select(.),(*dcomp)(); int alphasort(d1, d2); struct direct **d1, **d2; The rest is a typical man explaination. I decided to stop wasting my time, and solve the damn problem. I was able to get it to compile, but adding these lines to alias.c: #include sys/types.h #include dirent.h int alphasort(d1, d2); struct direct **d1, **d2; HOWEVER, the compile promptly failed again: bash-2.03# make gcc -I. -I/var/vpopmail/include -g -O2 -c util.c util.c:27:17: fts.h: No such file or directory util.c: In function `get_du': util.c:292: `FTS' undeclared (first use in this function) util.c:292: (Each undeclared identifier is reported only once util.c:292: for each function it appears in.) util.c:292: `fileheir' undeclared (first use in this function) util.c:293: `FTSENT' undeclared (first use in this function) util.c:293: `fsentry' undeclared (first use in this function) util.c:301: `FTS_PHYSICAL' undeclared (first use in this function) make: *** [util.o] Error 1 This time out, util.c is looking for a fts.h header file. I cannot find that on this machine, nor 4 other Solaris machines (all version 8). A Google search found some results, and I located it on several Linux and BSD boxes I control. I copied that file over, and discovered another error looking for cdefs.h, so I copied that as well. The compile failed again with this error: bash-2.03# make gcc -I. -I/var/vpopmail/include -g -O2 -c util.c gcc -I. -I/var/vpopmail/include -g -O2 -c auth.c gcc -I. -I/var/vpopmail/include -g -O2 -c template.c gcc -I. -I/var/vpopmail/include -g -O2 -c command.c gcc -I. -I/var/vpopmail/include -g -O2 -c show.c gcc -I. -I/var/vpopmail/include -g -O2 -c cgi.c gcc -I. -I/var/vpopmail/include -g -O2 -c limits.c gcc -I. -I/var/vpopmail/include -g -O2 -c dotqmail.c gcc -g -O2 -o qmailadmin qmailadmin.o alias.o autorespond.o forward.o mailinglist.o user.o util.o auth.o template.o command.o show.o cgi.o limits.o dotqmail.o -L/var/vpopmail/lib -lvpopmail -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lz -lsocket -lnsl -lm -lcrypt Undefined first referenced symbol in file fts_openutil.o alphasort alias.o fts_close util.o scandir alias.o fts_readutil.o ld: fatal: Symbol referencing errors. No output written to qmailadmin collect2: ld returned 1 exit status make: *** [qmailadmin] Error 1 Joy. I'm pretty certain this has to do with a gcc compile switch (eg. -lsocket or -lmysqlclient) but I really don't have the time or energy to debug anymore. Which means I will try once more, and be a dedicated sys admin. Tried some educated guess, all failed. Any ideas? Anyone? Anyone? -- Steve PS- ps. v1.0.7 does compile ok for me under redhat Not a surprise :)