You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(18) |
Oct
(28) |
Nov
(9) |
Dec
(31) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(16) |
Mar
|
Apr
(11) |
May
(2) |
Jun
(3) |
Jul
|
Aug
(6) |
Sep
(6) |
Oct
(8) |
Nov
(14) |
Dec
(20) |
2005 |
Jan
(11) |
Feb
(8) |
Mar
(7) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(7) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(11) |
Mar
|
Apr
(2) |
May
(7) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
(1) |
Dec
(4) |
2007 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(6) |
Dec
|
2008 |
Jan
(5) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Ken J. <kb...@us...> - 2004-04-01 23:25:47
|
Update of /cvsroot/qmailadmin/qmailadmin/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2996/lang Added Files: zh-cn Log Message: second try to add zh-cn file. --- NEW FILE: zh-cn --- (This appears to be a binary file; contents omitted.) |
From: Ken J. <kb...@us...> - 2004-04-01 23:17:39
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1483 Modified Files: ChangeLog Log Message: Add ch-zh language file from quake at huangdong.com. Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ChangeLog 1 Feb 2004 00:50:28 -0000 1.16 +++ ChangeLog 1 Apr 2004 23:05:32 -0000 1.17 @@ -1,6 +1,10 @@ Numbers in square brackets ([]) indicate tracker item on SourceForge with patch or information related to the entry. +1.3.0 - unreleased + Ken Jones + - new ch-zh language file contribution by quake at huangdong dot com + 1.2.1-pre1 - unreleased Tom Collins |
From: <tom...@us...> - 2004-02-23 18:25:59
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11186 Modified Files: Tag: stable-1_2 dotqmail.c Log Message: remove warnings about duplicate definitions (conflict between vpopmail config.h and qmailadmin config.h) Index: dotqmail.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/dotqmail.c,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -d -r1.2.2.1 -r1.2.2.2 --- dotqmail.c 2 Feb 2004 00:39:47 -0000 1.2.2.1 +++ dotqmail.c 23 Feb 2004 18:12:20 -0000 1.2.2.2 @@ -24,6 +24,11 @@ #include <sys/stat.h> #include <vpopmail.h> #include <vpopmail_config.h> +/* undef some macros that get redefined in config.h below */ +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include "config.h" #include "qmailadmin.h" #include "qmailadminx.h" |
From: <tom...@us...> - 2004-02-20 06:25:54
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv864 Modified Files: qmailadmin.c util.c Log Message: updated code for language strings Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- qmailadmin.c 7 Feb 2004 09:22:36 -0000 1.12 +++ qmailadmin.c 20 Feb 2004 06:15:00 -0000 1.13 @@ -109,9 +109,6 @@ char uBufK[MAX_BUFF]; char uBufL[MAX_BUFF]; -/* not in qmailadminx.h */ -FILE *lang_fs; - void del_id_files( char *); int create_session_file( char *ip_addr, char *domaindir); Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- util.c 7 Feb 2004 09:22:36 -0000 1.11 +++ util.c 20 Feb 2004 06:15:00 -0000 1.12 @@ -29,11 +29,14 @@ #include "qmailadmin.h" #include "qmailadminx.h" -extern FILE *lang_fs; -extern FILE *color_table; - #define SORT_TABLE_ENTRIES 100000 +#define DEFAULT_LANG "en" +#define MAX_LANG_ENTRY 4000 +#define MAX_LANG_FILESIZE 20000 +char *lang_entry[MAX_LANG_ENTRY]; +char *langpath = NULL; + /* pointer to array of pointers */ unsigned char **sort_list; @@ -402,21 +405,87 @@ } -int open_lang_file(char *lang) +/* initialize language table with NULL entries */ +void init_lang_table() { + int i; + + for (i = 0; i < MAX_LANG_ENTRY; i++) + lang_entry[i] = NULL; +} + +/* This function works by reading an entire "language" file into memory and + * parsing out the table entries. A table entries are comprised of a numeric + * index, followed by a space and then the text of the entry. For example: + * + * 123 Main Menu + * + * "123" is the index for the string "Main Menu" + * + * Previously, index had to be zero padded and three characters long, followed + * by a single space and then the text. Index no longer requires the zero padding + * and there can be any number of spaces and tabs between the index and its text. + * + * load_lang_table scans through the file, finding and decoding each line, + * saving a pointer to the text of the entry and converting the trailing newline + * to a NULL. To display an entry in the table, it's a simple matter of + * referencing lang_entry[index] which is a pointer to the NULL-terminated string. + */ +int load_lang_table(char *lang) +{ + /* load entries from translation "lang" into the lang_entry table */ char langfile[200]; - static char *langpath = NULL; - struct stat mystat; + char buf[512]; + char *lang_filedata; + int i; + char *p; + FILE *f; + + snprintf(langfile, sizeof(langfile), "%s/lang/%s", langpath, lang); + f = fopen (langfile, "r"); + if (f == NULL) return -1; + + lang_filedata = malloc(MAX_LANG_FILESIZE); + if (lang_filedata == NULL) return -2; + fread (lang_filedata, 1, MAX_LANG_FILESIZE, f); + fclose (f); + p = lang_filedata; + while (*p != '\0') { + /* skip leading zeros, otherwise atol does octal conversion */ + if (*p == '0') p++; /* skip over leading zero */ + if (*p == '0') p++; /* skip over second leading zero */ + + /* convert index value */ + i = (int) atol (p); + + /* find delimiter and advance pointer to text of entry */ + while (*p != ' ' && *p != '\t' && *p != '\0') p++; + while (*p == ' ' || *p == '\t') p++; + + if ((i > 0) && (i < MAX_LANG_ENTRY) && (lang_entry[i] == NULL)) + lang_entry[i] = p; + + /* find end of line and convert to NULL when found */ + while (*p != '\n' && *p != '\0') p++; + if (*p != '\0') *p++ = '\0'; /* convert to NULL and point to next entry */ + } + + /* Don't free lang_filedata! It's a static buffer with the language entries! */ + return 0; +} + +int open_lang_file(char *lang) +{ + char langfile[200]; + FILE *lang_fs; + /* do not read lang files with path control characters */ if ( strstr(lang,".")!=NULL || strstr(lang,"/")!=NULL ) return(-1); /* convert to lower case (using lowerit() from libvpopmail) */ lowerit(lang); - /* close previous language if still open */ - if (lang_fs != NULL) fclose (lang_fs); - if (langpath == NULL) { langpath = getenv(QMAILADMIN_TEMPLATEDIR); if (langpath == NULL ) langpath = HTMLLIBDIR; @@ -424,11 +493,10 @@ snprintf(langfile, sizeof(langfile), "%s/lang/%s", langpath, lang); - /* do not open symbolic links */ - if (lstat(langfile, &mystat)==-1 || S_ISLNK(mystat.st_mode)) return(-1); - + /* make sure language file exists and we can read it */ if ( (lang_fs=fopen(langfile, "r"))==NULL) return(-1); + fclose (lang_fs); return(0); } @@ -445,8 +513,6 @@ int lang_err; float maxq, thisq; - lang_fs = NULL; - /* Parse HTTP_ACCEPT_LANGUAGE to find highest preferred language * that we have a translation for. Example setting: * de-de, ja;q=0.25, en;q=0.50, de;q=0.75 @@ -455,9 +521,9 @@ * de (1.00), ja (0.25), en (0.50), and then de (0.75). */ - /* default to English at 0.00 preference */ + /* default to DEFAULT_LANG at 0.00 preference */ maxq = 0.0; - strcpy (Lang, "en"); + strcpy (Lang, DEFAULT_LANG); /* read in preferred languages */ langptr = getenv("HTTP_ACCEPT_LANGUAGE"); @@ -497,42 +563,27 @@ free(accept_lang); } + + /* now load the language file entries */ + init_lang_table(); + load_lang_table(Lang); + if (strcmp (Lang, DEFAULT_LANG) != 0) { + /* if any entries are missing, fill with DEFAULT_LANG equivalents */ + load_lang_table(DEFAULT_LANG); + } } -/* It's a good thing qmailadmin is a cgi script, because this - function leaks memory. That's OK though, Tom has plans - for rewriting the html_text stuff soon. */ char *get_html_text( int target ) { - static char *tmpbuf; - char *tmpstr; - char index[4]; - #ifdef DEBUG_GET_TEXT fprintf( stderr, "get_html_text target: %d\n", target); fflush( stderr ); #endif - sprintf( index, "%03d", target ); - - #ifdef DEBUG_GET_TEXT - fprintf( stderr, "Converted index: %s\n", index ); - fflush( stderr ); - #endif - - tmpbuf = malloc(400); - - if (lang_fs == NULL) return(""); - - rewind(lang_fs); - while(fgets(tmpbuf,400,lang_fs)!=NULL){ - tmpstr = strtok(tmpbuf, " "); - if (strcmp(tmpstr, index) == 0 ) { - tmpstr = strtok(NULL, "\n"); - return(tmpstr); - } - } - return(""); + if ((target >= 0) && (target < MAX_LANG_ENTRY) && (lang_entry[target] != NULL)) + return lang_entry[target]; + else + return ""; } /* bk - use maildir++ quotas now |
Update of /cvsroot/qmailadmin/qmailadmin/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3066/html Modified Files: Tag: stable-1_2 add_autorespond.html add_forward.html add_listdig.html add_listmod.html add_listuser.html add_mailinglist-idx.html add_mailinglist-no-idx.html add_user.html mod_autorespond.html mod_dotqmail.html mod_mailinglist-idx.html mod_user.html setremotecatchall.html show_login.html Log Message: Apply Oden's 'lazy snap to' patch for setting the focus on forms. Index: add_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_autorespond.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_autorespond.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_autorespond.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addautorespond.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_forward.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_forward.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_forward.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_forward.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addforward.alias.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_listdig.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listdig.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_listdig.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listdig.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addlistdignow.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_listmod.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listmod.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_listmod.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listmod.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addlistmodnow.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_listuser.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listuser.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_listuser.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listuser.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addlistusernow.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_mailinglist-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_mailinglist-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_mailinglist-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_mailinglist-idx.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addmailinglist.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_mailinglist-no-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_mailinglist-no-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_mailinglist-no-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_mailinglist-no-idx.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addmailinglist.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: add_user.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_user.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- add_user.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_user.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.logon.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: mod_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_autorespond.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- mod_autorespond.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_autorespond.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.modautorespond.owner.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: mod_dotqmail.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_dotqmail.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- mod_dotqmail.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_dotqmail.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.moddotqmail.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: mod_mailinglist-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_mailinglist-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- mod_mailinglist-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_mailinglist-idx.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,7 +1,17 @@ <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <META HTTP-EQUIV="Expires" CONTENT="Thu, 1 Jan 1970 00:00:00 GMT"> </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.modmailinglistnow.listowner.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: mod_user.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_user.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- mod_user.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_user.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,14 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.logon.gecos.focus(); +} +//--> +</script> <script type="text/javascript"> <!-- Index: setremotecatchall.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/setremotecatchall.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- setremotecatchall.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ setremotecatchall.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff"> + <body bgcolor="#ffffff" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.addforward.newu.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> Index: show_login.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_login.html,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- show_login.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ show_login.html 18 Feb 2004 18:44:39 -0000 1.1.1.1.2.1 @@ -1,5 +1,15 @@ </head> - <body bgcolor="#ffffff" vlink="#000000" link="#000000" alink="#000000"> + <body bgcolor="#ffffff" vlink="#000000" link="#000000" alink="#000000" onload="init();"> + +<script language="Javascript" type="text/javascript"> +<!-- +function init() +{ +document.logon.username.focus(); +} +//--> +</script> + <center> <h2>##S</h2> <table border="0" cellpadding="0" cellspacing="0"> |
From: <tom...@us...> - 2004-02-18 18:54:22
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3066 Modified Files: Tag: stable-1_2 ChangeLog Log Message: Apply Oden's 'lazy snap to' patch for setting the focus on forms. Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.4 retrieving revision 1.15.2.5 diff -u -d -r1.15.2.4 -r1.15.2.5 --- ChangeLog 18 Feb 2004 18:43:40 -0000 1.15.2.4 +++ ChangeLog 18 Feb 2004 18:44:38 -0000 1.15.2.5 @@ -3,6 +3,11 @@ 1.2.2 - unreleased + Oden Eriksson + - Added "lazy snap to" javascripts to have the cursor jump to the + most interesting input field. The idea was stolen from Mr. Sam's + sqwebmail package. [897088] + 1.2.1 - released 10-Feb-04 Tom Collins |
From: <tom...@us...> - 2004-02-18 18:53:31
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2813 Modified Files: Tag: stable-1_2 configure.in configure ChangeLog Log Message: start on v1.2.2 Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.15.2.2 retrieving revision 1.15.2.3 diff -u -d -r1.15.2.2 -r1.15.2.3 --- configure.in 10 Feb 2004 20:51:02 -0000 1.15.2.2 +++ configure.in 18 Feb 2004 18:43:35 -0000 1.15.2.3 @@ -6,7 +6,7 @@ AC_CANONICAL_HOST QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1" +QA_VERSION="1.2.2" AC_DEFINE_UNQUOTED(QA_PACKAGE,"$QA_PACKAGE","") AC_DEFINE_UNQUOTED(QA_VERSION,"$QA_VERSION","") Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.14.2.2 retrieving revision 1.14.2.3 diff -u -d -r1.14.2.2 -r1.14.2.3 --- configure 10 Feb 2004 20:51:02 -0000 1.14.2.2 +++ configure 18 Feb 2004 18:43:35 -0000 1.14.2.3 @@ -1658,7 +1658,7 @@ QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1" +QA_VERSION="1.2.2" cat >>confdefs.h <<_ACEOF Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.3 retrieving revision 1.15.2.4 diff -u -d -r1.15.2.3 -r1.15.2.4 --- ChangeLog 10 Feb 2004 20:50:33 -0000 1.15.2.3 +++ ChangeLog 18 Feb 2004 18:43:40 -0000 1.15.2.4 @@ -1,6 +1,8 @@ Numbers in square brackets ([]) indicate tracker item on SourceForge with patch or information related to the entry. +1.2.2 - unreleased + 1.2.1 - released 10-Feb-04 Tom Collins |
From: <tom...@us...> - 2004-02-10 20:54:37
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19186 Modified Files: Tag: stable-1_2 configure configure.in Log Message: set version to 1.2.1 instead of 1.2.1-pre1 Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -u -d -r1.14.2.1 -r1.14.2.2 --- configure 30 Jan 2004 14:57:32 -0000 1.14.2.1 +++ configure 10 Feb 2004 20:51:02 -0000 1.14.2.2 @@ -1658,7 +1658,7 @@ QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1-pre1" +QA_VERSION="1.2.1" cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -d -r1.15.2.1 -r1.15.2.2 --- configure.in 30 Jan 2004 14:57:32 -0000 1.15.2.1 +++ configure.in 10 Feb 2004 20:51:02 -0000 1.15.2.2 @@ -6,7 +6,7 @@ AC_CANONICAL_HOST QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1-pre1" +QA_VERSION="1.2.1" AC_DEFINE_UNQUOTED(QA_PACKAGE,"$QA_PACKAGE","") AC_DEFINE_UNQUOTED(QA_VERSION,"$QA_VERSION","") |
From: <tom...@us...> - 2004-02-10 20:54:07
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19048 Modified Files: Tag: stable-1_2 ChangeLog Log Message: add note regarding new valias support Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.2 retrieving revision 1.15.2.3 diff -u -d -r1.15.2.2 -r1.15.2.3 --- ChangeLog 2 Feb 2004 00:39:47 -0000 1.15.2.2 +++ ChangeLog 10 Feb 2004 20:50:33 -0000 1.15.2.3 @@ -1,13 +1,17 @@ Numbers in square brackets ([]) indicate tracker item on SourceForge with patch or information related to the entry. -1.2.1-pre1 - unreleased +1.2.1 - released 10-Feb-04 Tom Collins - Add note to INSTALL about requiring vpopmail 5.4.0 or later. - - Store aliases and autoresponders in valias table if vpopmail - was compiled with --enable-valias. Development of this feature - was sponsored by ACIS Pty Ltd <http://www.acis.com.au/>. + - Store aliases and autoresponders in valias table if vpopmail was + compiled with --enable-valias. Development of this feature was + sponsored by ACIS Pty Ltd <http://www.acis.com.au/>. [774819] + * If you are upgrading from a previous version of QmailAdmin and + used the --enable-valias option when building vpopmail, be sure + to download vpopmail 5.4.1 or later and use the dotqmail2valias + program to convert .qmail-alias files to valias table entries. 1.2.0 - released 28-Jan-04 |
From: <tom...@us...> - 2004-02-10 20:51:39
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18410 Modified Files: Tag: stable-1_2 INSTALL Log Message: add note regarding new valias support Index: INSTALL =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/INSTALL,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -d -r1.5.2.1 -r1.5.2.2 --- INSTALL 30 Jan 2004 14:57:32 -0000 1.5.2.1 +++ INSTALL 10 Feb 2004 20:48:02 -0000 1.5.2.2 @@ -7,6 +7,11 @@ statically links libvpopmail, so you need to recompile it whenever libvpopmail changes. +If you are upgrading to 1.2.1 or later from 1.2.0 or earlier, +and you have compiled vpopmail with the --enable-valias option, +be sure to run dotqmail2valias from vpopmail 5.4.1 to convert +old-style .qmail-alias files to valias table entries. + qmailadmin must be configured and installed as root. Why? vpopmail protects it's libraries from regular users. qmailadmin needs to access those libraries, hence it needs root. |
From: <tom...@us...> - 2004-02-10 20:47:54
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17483 Modified Files: Tag: stable-1_2 TODO BUGS Log Message: update TODO and BUGS now that valias support has been added. Index: TODO =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- TODO 10 Sep 2003 21:38:41 -0000 1.1.1.1 +++ TODO 10 Feb 2004 20:44:19 -0000 1.1.1.1.2.1 @@ -1,5 +1,3 @@ -* Convert Alias/Forward code to use valias functions - Heather L Sherman <he...@id...> 1) issues with mailing list management Index: BUGS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/BUGS,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.1 diff -u -d -r1.1.1.1 -r1.1.1.1.2.1 --- BUGS 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ BUGS 10 Feb 2004 20:44:19 -0000 1.1.1.1.2.1 @@ -1,2 +1,4 @@ -* Qmailadmin does yet not understand mysql valias data, only dot-qmail - aliases/forwards +* QmailAdmin rewrites a users .qmail file whenver changes are made on the + modify user screen. The code currently doesn't handle .qmail files that + were hand modified or generated elsewhere (e.g., TMDA). + |
From: <rw...@us...> - 2004-02-07 09:25:53
|
Update of /cvsroot/qmailadmin/qmailadmin/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12652/html Modified Files: header.html mod_autorespond.html Removed Files: mod_autorespond_line.html Log Message: Make get_html_text() take an int, changes and bugfix in autorespond.c, more in NEWS Index: header.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/header.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- header.html 1 Feb 2004 02:13:56 -0000 1.5 +++ header.html 7 Feb 2004 09:22:36 -0000 1.6 @@ -21,11 +21,19 @@ <BR><BR> -<A Href="http://qmailadmin.sf.net/">Home Page</a><BR> -</a><BR> +<A Href="/">Home</a><BR> <A Href="/cgi-bin/qmailadmin/?user=postmaster&dom=test.com">QmailAdmin</a><BR> -<BR><BR><BR><BR> -NOTE: change this in html/header.html +<A Href="/mailadmin/">Viewer</a><BR> +<A Href="/pmailadmin/?user=postmaster&dom=test.com">pMailAdmin</a><BR> + +<BR> + +<A Href="http://qmailadmin.sf.net/">SF QmailAdmin</a><BR> +<A Href="http://vpopmail.sf.net/">SF vpopmail</a><BR> + +<BR><BR> + +NOTE: You can change this menu in html/header.html </TD><TD width=5% bgcolor="#C0C000"> Index: mod_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_autorespond.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mod_autorespond.html 30 Jan 2004 03:27:01 -0000 1.2 +++ mod_autorespond.html 7 Feb 2004 09:22:36 -0000 1.3 @@ -50,7 +50,7 @@ <td colspan=2 align=center> <b>Message to send</b> <textarea cols=80 rows=40 name="message"> -##F +##uC </textarea> </td> </TR> --- mod_autorespond_line.html DELETED --- |
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12652 Modified Files: NEWS alias.c auth.c autorespond.c command.c forward.c mailinglist.c qmailadmin.c qmailadmin.h template.c user.c util.c Log Message: Make get_html_text() take an int, changes and bugfix in autorespond.c, more in NEWS Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- NEWS 1 Feb 2004 02:13:56 -0000 1.8 +++ NEWS 7 Feb 2004 09:22:36 -0000 1.9 @@ -5,6 +5,26 @@ I see no need to worry about that now as the rip and tear is not over, as you can see in TODO. +################################################################# + +040207 + +get_html_text now takes an int instead of a string. + + char *get_html_text( int target ) + +Merge display_robot_message() into modautorespond() so file +pointer MessageFile can now be function local. + +Remove obsolete ##F tag from template.c + +Remove obsolete mod_autorespond_line.html. + +Add some conditional (ifdef) debug trace lines that report to stderr. + + +################################################################# + The following information relates to a large block of changes that Rick Widmer added right before the final release of 1.2.0. I built up a large number of changes and will commit them in Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- alias.c 31 Jan 2004 11:08:00 -0000 1.8 +++ alias.c 7 Feb 2004 09:22:36 -0000 1.9 @@ -73,7 +73,7 @@ if ( (mydir = opendir(".")) == NULL ) { strcpy(uBufA, "4"); - sprintf(uBufB, "%s %d", get_html_text("143"), 1); + sprintf(uBufB, "%s %d", get_html_text(143), 1); send_template("show_error_line.html"); return(0); } @@ -102,7 +102,7 @@ if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { strcpy(uBufA, "4"); - sprintf(uBufB, "SDQL %s %s", get_html_text("144"), mydirent->d_name); + sprintf(uBufB, "SDQL %s %s", get_html_text(144), mydirent->d_name); send_template("show_error_line.html"); continue; } @@ -134,7 +134,7 @@ if (*Buffer2 == '#') { /* this is a blackhole account */ - sprintf (Buffer1, "%s", get_html_text("303")); + sprintf (Buffer1, "%s", get_html_text(303)); stop = 1; } while (!stop) { @@ -226,7 +226,7 @@ } if ( (fs=fopen(dot_file,"r"))==NULL) { - sprintf(StatusMessage,"SDQF %s %s<br>\n", get_html_text("144"), dot_file); + sprintf(StatusMessage,"SDQF %s %s<br>\n", get_html_text(144), dot_file); return(144); } @@ -317,17 +317,17 @@ if (strcmp(Action,"delentry")==0) { if (onevalidonly(ActionUser) ) { - sprintf(StatusMessage, "%s\n", get_html_text("149")); + sprintf(StatusMessage, "%s\n", get_html_text(149)); moddotqmail(); return(0); } if (dotqmail_del_line(ActionUser,LineData) ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 1); + sprintf(StatusMessage, "%s %d\n", get_html_text(150), 1); moddotqmail(); return(150); } - sprintf(StatusMessage, "%s\n", get_html_text("151") ); + sprintf(StatusMessage, "%s\n", get_html_text(151) ); moddotqmail(); return(151); @@ -336,12 +336,12 @@ moddotqmail(); return(0); } else { - sprintf(StatusMessage,"%s %s\n", get_html_text("152"), Newu); + sprintf(StatusMessage,"%s %s\n", get_html_text(152), Newu); moddotqmail(); return(0); } } else { - sprintf(StatusMessage, "%s\n", get_html_text("155")); + sprintf(StatusMessage, "%s\n", get_html_text(155)); return(0); } } @@ -349,7 +349,7 @@ int adddotqmail() { if ( MaxForwards != -1 && CurForwards >= MaxForwards ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("157"), MaxForwards); + sprintf(StatusMessage, "%s %d\n", get_html_text(157), MaxForwards); show_menu(); return(157); } @@ -364,12 +364,12 @@ if (AdminType!=DOMAIN_ADMIN && !(AdminType==USER_ADMIN && strcmp(ActionUser, Username)==0)) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxForwards != -1 && CurForwards >= MaxForwards ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("157"), MaxForwards); + sprintf(StatusMessage, "%s %d\n", get_html_text(157), MaxForwards); send_template( "add_forward.html" ); return(0); } @@ -381,7 +381,7 @@ return(0); } else { - sprintf(StatusMessage, "%s\n", get_html_text("152")); + sprintf(StatusMessage, "%s\n", get_html_text(152)); show_forwards(Username,Domain,Mytime,RealDir); } } @@ -396,24 +396,24 @@ /* jef...@ma... */ if (strlen(forwardname)<=0) { - sprintf(StatusMessage, "%s %s\n", get_html_text("163"), forwardname); + sprintf(StatusMessage, "%s %s\n", get_html_text(163), forwardname); return(-1); /* make sure forwardname is valid */ } else if (fixup_local_name(forwardname)) { - sprintf(StatusMessage, "%s %s\n", get_html_text("163"), forwardname); + sprintf(StatusMessage, "%s %s\n", get_html_text(163), forwardname); return(-1); /* check to see if we already have a user with this name (only for create) */ } else if (create != 0 && check_local_user(forwardname)) { - sprintf(StatusMessage, "%s %s\n", get_html_text("175"), forwardname); + sprintf(StatusMessage, "%s %s\n", get_html_text(175), forwardname); return(-1); } /* see if forwarding to a local user */ if (strstr(dest, "@") == NULL) { if (check_local_user(dest) == 0) { - sprintf(StatusMessage, "%s\n", get_html_text("161")); + sprintf(StatusMessage, "%s\n", get_html_text(161)); return(-1); } else { /* make it an email address */ @@ -423,13 +423,13 @@ /* check that it's a valid email address */ if (check_email_addr(dest)) { - sprintf(StatusMessage, "%s %s\n", get_html_text("162"), dest); + sprintf(StatusMessage, "%s %s\n", get_html_text(162), dest); return(-1); } sprintf(Buffer, "&%s\n", dest); if (dotqmail_add_line(forwardname, Buffer)) { - sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 2); + sprintf(StatusMessage, "%s %d\n", get_html_text(150), 2); return(-1); } @@ -440,7 +440,7 @@ { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } send_template( "del_forward_confirm.html" ); @@ -452,7 +452,7 @@ if (AdminType!=DOMAIN_ADMIN && !(AdminType==USER_ADMIN && !strcmp(ActionUser, Username))) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); show_menu(Username, Domain, Mytime); return(142); } @@ -460,16 +460,16 @@ /* check to see if we already have a user with this name */ if (fixup_local_name(ActionUser)) { - sprintf(StatusMessage,"%s %s\n", get_html_text("160"), Alias); + sprintf(StatusMessage,"%s %s\n", get_html_text(160), Alias); deldotqmail(); return(160); } if (!(dotqmail_delete_files(ActionUser))) { - sprintf(StatusMessage, "%s %s %s\n", get_html_text("167"), + sprintf(StatusMessage, "%s %s %s\n", get_html_text(167), Alias, ActionUser); } else { - sprintf(StatusMessage, "%s %s %s\n", get_html_text("168"), + sprintf(StatusMessage, "%s %s %s\n", get_html_text(168), Alias, ActionUser); } Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- auth.c 1 Feb 2004 00:50:28 -0000 1.7 +++ auth.c 7 Feb 2004 09:22:36 -0000 1.8 @@ -89,8 +89,8 @@ sprintf(Buffer, "%s/Maildir/%d.qw", domaindir, Mytime); fs = fopen(Buffer, "w"); if ( fs == NULL ) { - fprintf(actout,"MAIN %s %s\n", get_html_text("144"), Buffer); - fprintf(stderr,"MAIN %s %s\n", get_html_text("144"), Buffer); + fprintf(actout,"MAIN %s %s\n", get_html_text(144), Buffer); + fprintf(stderr,"MAIN %s %s\n", get_html_text(144), Buffer); return(1); } Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- autorespond.c 1 Feb 2004 00:50:28 -0000 1.8 +++ autorespond.c 7 Feb 2004 09:22:36 -0000 1.9 @@ -31,9 +31,6 @@ #include "qmailadmin.h" #include "qmailadminx.h" -static int FileReady=0; -static FILE *MessageFile=NULL; - show_autoresponders(user,dom,mytime,dir) char *user; char *dom; @@ -43,7 +40,7 @@ if ( MaxAutoResponders == 0 ) return(0); if(CurAutoResponders == 0) { - sprintf(StatusMessage,"%s", get_html_text("233")); + sprintf(StatusMessage,"%s", get_html_text(233)); show_menu(Username, Domain, Mytime); } else { send_template( "show_autorespond.html" ); @@ -60,7 +57,7 @@ int i,j; if ( (mydir = opendir(".")) == NULL ) { - fprintf(stderr, "%s\n", get_html_text("143")); + fprintf(stderr, "%s\n", get_html_text(143)); return 143; } @@ -71,7 +68,7 @@ if ( strncmp(".qmail-", mydirent->d_name, 7) == 0 ) { if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { strcpy(uBufA, "3"); - sprintf(uBufB, "SAL %s %s\n", get_html_text("144"), mydirent->d_name); + sprintf(uBufB, "SAL %s %s\n", get_html_text(144), mydirent->d_name); send_template("show_error_line.html"); continue; } @@ -103,12 +100,12 @@ { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxAutoResponders != -1 && CurAutoResponders >= MaxAutoResponders ) { - fprintf(actout, "%s %d\n", get_html_text("158"), MaxAutoResponders); + fprintf(actout, "%s %d\n", get_html_text(158), MaxAutoResponders); show_menu(); return(158); } @@ -126,49 +123,49 @@ char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxAutoResponders != -1 && CurAutoResponders >= MaxAutoResponders ) { - fprintf(actout, "%s %d\n", get_html_text("158"), MaxAutoResponders); + fprintf(actout, "%s %d\n", get_html_text(158), MaxAutoResponders); show_menu(); return(158); } if ( fixup_local_name(ActionUser) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("174"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(174), ActionUser); addautorespond(); return(174); } if ( check_local_user(ActionUser) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("175"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(175), ActionUser); addautorespond(); return(175); } if ( strlen(ActionUser) == 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("176")); + sprintf(StatusMessage, "%s\n", get_html_text(176)); addautorespond(); return(176); } if ( strlen(Newu)>0 && check_email_addr(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("177"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(177), Newu); addautorespond(); return(177); } if (strlen(Alias) <= 1) { - sprintf(StatusMessage, "%s %s\n", get_html_text("178"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(178), ActionUser); addautorespond(); return(178); } if (strlen(Message) <= 1) { - sprintf(StatusMessage, "%s %s\n", get_html_text("179"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(179), ActionUser); addautorespond(); return(179); } @@ -212,7 +209,7 @@ * Report success */ CurAutoResponders++; - sprintf(StatusMessage, "%s %s@%s\n", get_html_text("180"), + sprintf(StatusMessage, "%s %s@%s\n", get_html_text(180), ActionUser, Domain); show_autoresponders(Username,Domain); @@ -221,7 +218,7 @@ delautorespond() { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } send_template( "del_autorespond_confirm.html" ); @@ -235,13 +232,13 @@ char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]=='.') ActionUser[i] = ':'; sprintf(Buffer2, ".qmail-%s", ActionUser); - if ( unlink(Buffer2) != 0 ) ack( get_html_text("181"), 345); + if ( unlink(Buffer2) != 0 ) ack( get_html_text(181), 345); memset(Buffer2,0,sizeof(Buffer2)); for(i=0;ActionUser[i]!=0;++i) { @@ -256,7 +253,7 @@ for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]==':') ActionUser[i] = '.'; sprintf(Buffer1, "%s/%s", RealDir, Buffer2); vdelfiles(Buffer1); - sprintf(StatusMessage, "%s %s\n", get_html_text("182"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(182), ActionUser); CurAutoResponders--; if(CurAutoResponders == 0) { @@ -269,14 +266,14 @@ modautorespond() { char fqfn[MAX_BUFF]; - char Buffer[MAX_BUFF]; - char Subj[MAX_BUFF]; + char Buffer[MAX_BIG_BUFF]; + char Line[MAX_BUFF]; FILE *fs; int i,j; /* if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } */ @@ -317,7 +314,9 @@ } else { /* Full Address - take off newline */ i = strlen(Buffer); --i; Buffer[i] = 0; - strcpy(uBufA, Buffer); + for(i=1, j=0; Buffer[i] != 0; ++j,++i) { + uBufA[j] = Buffer[i]; + } } } @@ -332,33 +331,33 @@ sprintf(fqfn, "%s/message", Buffer); /* Open the message file */ - if ((MessageFile = fopen(fqfn, "r")) == NULL) { + if ((fs = fopen(fqfn, "r")) == NULL) { ack("123", 123); } /* Discard the From line */ - fgets(Buffer, sizeof(Buffer), MessageFile); + fgets(Buffer, sizeof(Buffer), fs); /* Read the Subject */ - fgets(uBufA, sizeof(uBufB), MessageFile); + fgets(uBufB, sizeof(uBufB), fs); /* Discard blank line */ - fgets(Buffer, sizeof(Buffer), MessageFile); - FileReady=1; - - send_template( "mod_autorespond.html" ); + fgets(Buffer, sizeof(Buffer), fs); - fclose( MessageFile ); -} + i=0; + while (fgets(Line, sizeof(Line), fs)) { + for(j=0; 0 != Line[j] && j<MAX_BUFF; i++,j++ ) { + Buffer[i]=Line[j]; + } + Buffer[i] = 0; + } + strcpy(uBufC, Buffer); -int display_robot_message() -{ - char Buffer[MAX_BUFF]; + send_template( "mod_autorespond.html" ); - while (fgets(Buffer, sizeof(Buffer), MessageFile)) { - fprintf(actout, "%s", Buffer); - } + // Close Message file + fclose( fs ); } @@ -372,30 +371,30 @@ char Buffer3[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( fixup_local_name(ActionUser) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("174"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(174), ActionUser); modautorespond(); return(174); } if ( strlen(Newu)>0 && check_email_addr(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("177"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(177), Newu); modautorespond(); return(177); } if (strlen(Alias) <= 1) { - sprintf(StatusMessage, "%s %s\n", get_html_text("177"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(177), ActionUser); modautorespond(); return(177); } if (strlen(Message) <= 1) { - sprintf(StatusMessage, get_html_text("BODY_EMPTY"), ActionUser); + sprintf(StatusMessage, get_html_text(1), ActionUser); modautorespond(); return(0); } @@ -442,6 +441,6 @@ /* * Report success */ - sprintf(StatusMessage, "%s %s@%s\n", get_html_text("183"),ActionUser,Domain); + sprintf(StatusMessage, "%s %s@%s\n", get_html_text(183),ActionUser,Domain); show_autoresponders(Username, Domain, Mytime); } Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- command.c 31 Jan 2004 11:08:00 -0000 1.6 +++ command.c 7 Feb 2004 09:22:36 -0000 1.7 @@ -252,10 +252,10 @@ int j; if ( (fs = fopen(".qmail-default", "w")) == NULL ) { - sprintf(StatusMessage,"%s", get_html_text("082")); + sprintf(StatusMessage,"%s", get_html_text(82)); } else { if ((pw = vauth_getpw( ActionUser, Domain )) == NULL) { - sprintf(StatusMessage,"%s %s@%s", get_html_text("223"), ActionUser, Domain); + sprintf(StatusMessage,"%s %s@%s", get_html_text(223), ActionUser, Domain); } else { fprintf(fs, "| %s/bin/vdelivermail '' %s\n", VPOPMAILDIR, pw->pw_dir); sprintf(CurCatchall, ActionUser); Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- forward.c 31 Jan 2004 11:08:00 -0000 1.6 +++ forward.c 7 Feb 2004 09:22:36 -0000 1.7 @@ -40,13 +40,13 @@ if (AdminType != DOMAIN_ADMIN) { fprintf( stderr, "Not an admin\n" ); - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if(CurForwards == 0) { fprintf( stderr, "show_forwards - aint none\n" ); - sprintf(StatusMessage,"%s", get_html_text("232")); + sprintf(StatusMessage,"%s", get_html_text(232)); show_menu(Username, Domain, Mytime); return(232); } else { Index: mailinglist.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/mailinglist.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- mailinglist.c 1 Feb 2004 02:13:56 -0000 1.9 +++ mailinglist.c 7 Feb 2004 09:22:36 -0000 1.10 @@ -49,13 +49,13 @@ fprintf(stderr, "show_mailing_lists was called\n"); if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } /* see if there's anything to display */ if ( CurMailingLists == 0 ) { - sprintf(StatusMessage,"%s", get_html_text("231")); + sprintf(StatusMessage,"%s", get_html_text(231)); show_menu(); return(231); } @@ -77,7 +77,7 @@ int i,j; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxMailingLists == 0 ) { @@ -86,7 +86,7 @@ if ( (mydir = opendir(".")) == NULL ) { fprintf(stderr,"QmailAdmin: %s %s", - get_html_text("143"), "domain directory"); + get_html_text(143), "domain directory"); return(143); } @@ -101,7 +101,7 @@ #else strcpy(uBufA, "5"); #endif - sprintf(uBufB, "SMLL %s %s\n", get_html_text("144"), mydirent->d_name); + sprintf(uBufB, "SMLL %s %s\n", get_html_text(144), mydirent->d_name); send_template("show_error_line.html"); continue; } @@ -177,7 +177,7 @@ char Buffer[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -186,7 +186,7 @@ } if ( (mydir = opendir(".")) == NULL ) { - fprintf(stderr,"%s %s\n", get_html_text("143"), "domain directory"); + fprintf(stderr,"%s %s\n", get_html_text(143), "domain directory"); return(143); } @@ -196,7 +196,7 @@ while( (mydirent=readdir(mydir)) != NULL ) { if ( strncmp(".qmail-", mydirent->d_name, 7) == 0 ) { if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { - fprintf(stderr,"SMLL3 %s %s\n", get_html_text("144"), mydirent->d_name); + fprintf(stderr,"SMLL3 %s %s\n", get_html_text(144), mydirent->d_name); continue; } fgets( Buffer, sizeof(Buffer), fs); @@ -235,12 +235,12 @@ { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxMailingLists != -1 && CurMailingLists >= MaxMailingLists ) { - fprintf(actout, "%s %d\n", get_html_text("184"), + fprintf(actout, "%s %d\n", get_html_text(184), MaxMailingLists); show_menu(); return(184); @@ -260,7 +260,7 @@ int delmailinglist(void) { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -276,12 +276,12 @@ char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( (mydir = opendir(".")) == NULL ) { - fprintf(actout,"%s %d<BR>\n", get_html_text("143"), 1); + fprintf(actout,"%s %d<BR>\n", get_html_text(143), 1); fprintf(actout,"</table>"); return 0; } @@ -299,13 +299,13 @@ /* delete the main .qmail-"list" file */ if ( strcmp(Buffer2, mydirent->d_name) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), Buffer2); + ack(get_html_text(185), Buffer2); } /* delete secondary .qmail-"list"-* files */ } else if ( strncmp(Buffer1, mydirent->d_name, strlen(Buffer1)) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), Buffer2); + ack(get_html_text(185), Buffer2); } } } @@ -317,7 +317,7 @@ CurMailingLists--; - sprintf(StatusMessage, "%s %s\n", get_html_text("186"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(186), ActionUser); if ( CurMailingLists == 0 ) { show_menu(); } else { @@ -391,12 +391,12 @@ char listopt[] = "A D hIj L N pQRST "; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( fixup_local_name(ActionUser) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("188"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(188), ActionUser); addmailinglist(); return(188); } @@ -567,14 +567,14 @@ int addmailinglistnow(void) { if ( MaxMailingLists != -1 && CurMailingLists >= MaxMailingLists ) { - fprintf(actout, "%s %d\n", get_html_text("184"), + fprintf(actout, "%s %d\n", get_html_text(184), MaxMailingLists); show_menu(); return(184); } if ( check_local_user(ActionUser) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("175"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text(175), ActionUser); addmailinglist(); return(175); } @@ -582,7 +582,7 @@ ezmlm_make(1); CurMailingLists++; - sprintf(StatusMessage, "%s %s@%s\n", get_html_text("187"), + sprintf(StatusMessage, "%s %s@%s\n", get_html_text(187), ActionUser, Domain); show_mailing_lists(Username, Domain, Mytime); } @@ -592,6 +592,9 @@ char Buffer1[MAX_BUFF]; char Buffer2[MAX_BUFF]; char Buffer3[MAX_BUFF]; + int buff1; + int buff2; + int buff3; /* mod = 0 for subscribers, 1 for moderators, 2 for digest users */ @@ -601,7 +604,7 @@ char *addr; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -638,25 +641,25 @@ /* Display subscriber/moderator/digest list, along with delete button */ if(mod == 1) { - strcpy(Buffer3, "228"); strcpy(Buffer1, "220"); - /* strcpy(Buffer2, "087"); */ + buff1 = 220; + buff3 = 228; } else if(mod == 2) { - strcpy(Buffer3, "244"); strcpy(Buffer1, "246"); - /* strcpy(Buffer2, "245"); */ + buff1 = 246; + buff3 = 244; } else { - strcpy(Buffer3, "230"); strcpy(Buffer1, "222"); - /* strcpy(Buffer2, "084"); */ + buff3 = 230; + buff1 = 222; } - strcpy(Buffer2, "072"); + buff2 = 072; fprintf(actout,"<TABLE border=0 width=\"100%%\">\n"); fprintf(actout," <TR>\n"); - fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(Buffer3), subuser_count); + fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(buff3), subuser_count); fprintf(actout," </TR>\n"); fprintf(actout," <TR align=center bgcolor=\"#cccccc\">\n"); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(buff2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(buff1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(buff2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(buff1)); fprintf(actout," </TR>\n"); if(mod == 1) { @@ -687,8 +690,8 @@ fprintf(actout,"</TABLE>"); fclose(fs); close(handles[0]); wait(&pid); - sprintf(StatusMessage, "%s\n", get_html_text("190")); - fprintf(actout, get_html_text("END_LIST_NAMES")); + sprintf(StatusMessage, "%s\n", get_html_text(190)); + fprintf(actout, get_html_text(1)); } } @@ -702,7 +705,7 @@ int show_list_group(char *template) { if (AdminType != DOMAIN_ADMIN) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -722,7 +725,7 @@ addlistgroup (char *template) { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -744,14 +747,14 @@ int pid; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } lowerit(ActionUser); if ( check_email_addr(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("148"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(148), Newu); if (mod == 1) { addlistmod(); } else if (mod == 2) { @@ -778,15 +781,15 @@ if(mod == 1 ) { sprintf(StatusMessage, "%s %s %s@%s\n", Newu, - get_html_text("194"), ActionUser, Domain); + get_html_text(194), ActionUser, Domain); send_template( "add_listmod.html" ); } else if(mod == 2) { sprintf(StatusMessage, "%s %s %s@%s\n", Newu, - get_html_text("240"), ActionUser, Domain); + get_html_text(240), ActionUser, Domain); send_template( "add_listdig.html" ); } else { sprintf(StatusMessage, "%s %s %s@%s\n", Newu, - get_html_text("193"), ActionUser, Domain); + get_html_text(193), ActionUser, Domain); send_template( "add_listuser.html" ); } return(999); @@ -801,7 +804,7 @@ dellistgroup(char *template) { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -821,7 +824,7 @@ char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -842,13 +845,13 @@ } else wait(&pid); if(mod == 1) { - sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text("197"), + sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text(197), ActionUser, Domain); } else if(mod == 2) { - sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text("242"), + sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text(242), ActionUser, Domain); } else { - sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text("203"), + sprintf(StatusMessage, "%s %s %s@%s\n", Newu, get_html_text(203), ActionUser, Domain); } show_mailing_lists(Username, Domain, Mytime); @@ -871,7 +874,7 @@ char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -927,7 +930,7 @@ { ezmlm_make(0); - sprintf(StatusMessage, "%s %s@%s\n", get_html_text("226"), + sprintf(StatusMessage, "%s %s@%s\n", get_html_text(226), ActionUser, Domain); show_mailing_lists(Username, Domain, Mytime); } @@ -1165,91 +1168,91 @@ strcpy (listname, dotqmail_name); str_replace (listname, ':', '.'); } else { - sprintf (listname, "<I>%s</I>", get_html_text("261")); + sprintf (listname, "<I>%s</I>", get_html_text(261)); } /* Posting Messages */ - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("262")); - build_option_str ("RADIO", "opt1", "MU", get_html_text("263")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(262)); + build_option_str ("RADIO", "opt1", "MU", get_html_text(263)); fprintf(actout, "<BR>\n"); - build_option_str ("RADIO", "opt1", "Mu", get_html_text("264")); + build_option_str ("RADIO", "opt1", "Mu", get_html_text(264)); fprintf(actout, "<BR>\n"); - build_option_str ("RADIO", "opt1", "mu", get_html_text("265")); + build_option_str ("RADIO", "opt1", "mu", get_html_text(265)); fprintf(actout, "<BR>\n"); - build_option_str ("RADIO", "opt1", "mUo", get_html_text("266")); + build_option_str ("RADIO", "opt1", "mUo", get_html_text(266)); fprintf(actout, "<BR>\n"); - build_option_str ("RADIO", "opt1", "mUO", get_html_text("267")); + build_option_str ("RADIO", "opt1", "mUO", get_html_text(267)); fprintf(actout, "</P>\n"); /* List Options */ - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("268")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(268)); /* this next option isn't necessary since we use the edit box to * set/delete the prefix - sprintf (Buffer4, get_html_text("269"), listname); + sprintf (Buffer4, get_html_text(269), listname); build_option_str ("CHECKBOX", "opt3", "f", Buffer4); fprintf(actout, "<BR>\n"); */ fprintf(actout, "<TABLE><TR><TD ROWSPAN=3 VALIGN=TOP>%s</TD>", - get_html_text("310")); + get_html_text(310)); fprintf(actout, "<TD><INPUT TYPE=RADIO NAME=\"replyto\" VALUE=\"%d\"%s>%s</TD></TR>\n", - REPLYTO_SENDER, (replyto == REPLYTO_SENDER) ? " CHECKED" : "", get_html_text("311")); + REPLYTO_SENDER, (replyto == REPLYTO_SENDER) ? " CHECKED" : "", get_html_text(311)); fprintf(actout, "<TR><TD><INPUT TYPE=RADIO NAME=\"replyto\" VALUE=\"%d\"%s>%s</TD></TR>\n", - REPLYTO_LIST, (replyto == REPLYTO_LIST) ? " CHECKED" : "", get_html_text("312")); + REPLYTO_LIST, (replyto == REPLYTO_LIST) ? " CHECKED" : "", get_html_text(312)); fprintf(actout, "<TR><TD><INPUT TYPE=RADIO NAME=\"replyto\" VALUE=\"%d\"%s>%s ", - REPLYTO_ADDRESS, (replyto == REPLYTO_ADDRESS) ? " CHECKED" : "", get_html_text("313")); + REPLYTO_ADDRESS, (replyto == REPLYTO_ADDRESS) ? " CHECKED" : "", get_html_text(313)); fprintf(actout, "<INPUT TYPE=TEXT NAME=\"replyaddr\" VALUE=\"%s\" SIZE=30></TD></TR>\n", replyto_addr); fprintf(actout, "</TABLE><BR>\n"); - build_option_str ("CHECKBOX", "opt4", "t", get_html_text("270")); + build_option_str ("CHECKBOX", "opt4", "t", get_html_text(270)); fprintf(actout, "<BR>\n"); - build_option_str ("CHECKBOX", "opt5", "d", get_html_text("271")); - sprintf (Buffer4, get_html_text("272"), listname); + build_option_str ("CHECKBOX", "opt5", "d", get_html_text(271)); + sprintf (Buffer4, get_html_text(272), listname); fprintf(actout, "<SMALL>(%s)</SMALL>", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (Buffer4, get_html_text("273"), listname); + sprintf (Buffer4, get_html_text(273), listname); build_option_str ("CHECKBOX", "opt6", "q", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (Buffer4, get_html_text("274"), listname, listname, listname); + sprintf (Buffer4, get_html_text(274), listname, listname, listname); fprintf(actout, " <SMALL>(%s)</SMALL></P>", Buffer4); /* Remote Administration */ - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("275")); - build_option_str ("CHECKBOX", "opt7", "r", get_html_text("276")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(275)); + build_option_str ("CHECKBOX", "opt7", "r", get_html_text(276)); fprintf(actout, "<BR>\n"); - build_option_str ("CHECKBOX", "opt8", "P", get_html_text("277")); - fprintf(actout, "<SMALL>(%s)</SMALL><BR>", get_html_text("278")); + build_option_str ("CHECKBOX", "opt8", "P", get_html_text(277)); + fprintf(actout, "<SMALL>(%s)</SMALL><BR>", get_html_text(278)); fprintf(actout, "<TABLE><TR><TD ROWSPAN=2 VALIGN=TOP>%s</TD>", - get_html_text("279")); + get_html_text(279)); fprintf(actout, "<TD>"); - build_option_str ("CHECKBOX", "opt9", "l", get_html_text("280")); + build_option_str ("CHECKBOX", "opt9", "l", get_html_text(280)); fprintf(actout, "</TD>\n</TR><TR>\n<TD>"); - build_option_str ("CHECKBOX", "opt10", "n", get_html_text("281")); - fprintf(actout, "<SMALL>(%s)</SMALL>.</TD>\n", get_html_text("282")); + build_option_str ("CHECKBOX", "opt10", "n", get_html_text(281)); + fprintf(actout, "<SMALL>(%s)</SMALL>.</TD>\n", get_html_text(282)); fprintf(actout, "</TR></TABLE>\n</P>\n"); - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("283")); - fprintf(actout, "%s<BR>\n ", get_html_text("284")); - build_option_str ("CHECKBOX", "opt11", "H", get_html_text("285")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(283)); + fprintf(actout, "%s<BR>\n ", get_html_text(284)); + build_option_str ("CHECKBOX", "opt11", "H", get_html_text(285)); fprintf(actout, "<BR>\n "); - build_option_str ("CHECKBOX", "opt12", "s", get_html_text("286")); - fprintf(actout, "<BR>\n%s<BR>\n ", get_html_text("287")); - build_option_str ("CHECKBOX", "opt13", "J", get_html_text("285")); + build_option_str ("CHECKBOX", "opt12", "s", get_html_text(286)); + fprintf(actout, "<BR>\n%s<BR>\n ", get_html_text(287)); + build_option_str ("CHECKBOX", "opt13", "J", get_html_text(285)); fprintf(actout, "<BR>\n"); - fprintf(actout, "<SMALL>%s</SMALL>\n</P>\n", get_html_text("288")); + fprintf(actout, "<SMALL>%s</SMALL>\n</P>\n", get_html_text(288)); - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("289")); - build_option_str ("CHECKBOX", "opt14", "a", get_html_text("290")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(289)); + build_option_str ("CHECKBOX", "opt14", "a", get_html_text(290)); fprintf(actout, "<BR>\n"); /* note that if user doesn't have ezmlm-cgi installed, it might be a good idea to default to having option i off. */ - build_option_str ("CHECKBOX", "opt15", "i", get_html_text("291")); - fprintf(actout, "<BR>\n%s\n<SELECT NAME=\"opt15\">", get_html_text("292")); + build_option_str ("CHECKBOX", "opt15", "i", get_html_text(291)); + fprintf(actout, "<BR>\n%s\n<SELECT NAME=\"opt15\">", get_html_text(292)); fprintf(actout, "<OPTION VALUE=\"BG\"%s>%s\n", - checkopt['B'] && checkopt['G'] ? " SELECTED" : "", get_html_text("293")); + checkopt['B'] && checkopt['G'] ? " SELECTED" : "", get_html_text(293)); fprintf(actout, "<OPTION VALUE=\"Bg\"%s>%s\n", - checkopt['B'] && checkopt['g'] ? " SELECTED" : "", get_html_text("294")); + checkopt['B'] && checkopt['g'] ? " SELECTED" : "", get_html_text(294)); fprintf(actout, "<OPTION VALUE=\"b\"%s>%s\n", - checkopt['b'] ? " SELECTED" : "", get_html_text("295")); + checkopt['b'] ? " SELECTED" : "", get_html_text(295)); fprintf(actout, "</SELECT>.</P>\n"); /***********************/ @@ -1272,9 +1275,9 @@ fclose(fs); } #ifdef ENABLE_MYSQL - fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("099")); + fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text(99)); fprintf(actout, "<input type=checkbox name=\"sqlsupport\" value=\"-6\"%s> %s", - checked ? " CHECKED" : "", get_html_text("053")); + checked ? " CHECKED" : "", get_html_text(53)); /* parse dir/sql file for SQL settings */ fprintf(actout, " <table cellpadding=0 cellspacing=2 border=0>\n"); @@ -1295,7 +1298,7 @@ #ifdef ENABLE_MYSQL fprintf(actout, " <tr>\n"); - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("054")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(54)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text name=sql1 value=\"%s\"></td>\n", checked1); #else @@ -1312,7 +1315,7 @@ } } #ifdef ENABLE_MYSQL - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("055")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(055)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text size=7 name=sql2 value=\"%s\"></td>\n", checked1); fprintf(actout, " </tr>\n"); @@ -1331,7 +1334,7 @@ } #ifdef ENABLE_MYSQL fprintf(actout, " <tr>\n"); - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("056")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(56)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text name=sql3 value=\"%s\"></td>\n", checked1); #else @@ -1348,7 +1351,7 @@ } } #ifdef ENABLE_MYSQL - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("057")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(57)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text name=sql4 value=\"%s\"></td>\n", checked1); fprintf(actout, " </tr>\n"); @@ -1367,7 +1370,7 @@ } #ifdef ENABLE_MYSQL fprintf(actout, " <tr>\n"); - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("058")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(58)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text name=sql5 value=\"%s\"></td>\n", checked1); #else @@ -1384,7 +1387,7 @@ } } #ifdef ENABLE_MYSQL - fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text("059")); + fprintf(actout, " <td ALIGN=RIGHT>%s:\n", get_html_text(59)); fprintf(actout, " </td><td>\n"); fprintf(actout, " <input type=text name=\"sql6\" value=\"%s\"></td>\n", checked1); fprintf(actout, " </tr>\n"); Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- qmailadmin.c 1 Feb 2004 02:13:56 -0000 1.11 +++ qmailadmin.c 7 Feb 2004 09:22:36 -0000 1.12 @@ -17,6 +17,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#define debug + +#define debug + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -164,7 +168,7 @@ } if ( chdir(RealDir) < 0 ) { - fprintf(stderr, "MAIN %s %s\n", get_html_text("171"), RealDir ); + fprintf(stderr, "MAIN %s %s\n", get_html_text(171), RealDir ); } } @@ -173,12 +177,16 @@ char *pi; int i,j; + #ifdef debug fprintf(stderr, "get_command_parms started\n" ); + #endif pi=getenv("PATH_INFO"); if ( pi ) pi = strdup(pi); + #ifdef debug fprintf(stderr, "get_command_parms pi: %s\n", pi ); + #endif memset(commandparms, 0, parmsize); fprintf(stderr, "sizeof commandparms: %d", parmsize); @@ -186,11 +194,15 @@ /* Cut off the first five characters... '/com/' */ if (pi && strncmp(pi, "/com/", 5) == 0) { for(j=0,i=5;pi[i]!=0&&j<99;++i,++j) commandparms[j] = pi[i]; + #ifdef debug fprintf(stderr, "get command parms - found it: %s\n", commandparms ); + #endif return( 0 ); } + #ifdef debug fprintf(stderr, "get command parms - nothing\n" ); + #endif return(1); } @@ -249,7 +261,9 @@ if (!get_command_parms(CommandParms, sizeof(CommandParms))) { /* Have command - prepare to execute it */ - fprintf( stderr, "\nMystery if case #1\n" ); + #ifdef debug + fprintf( stderr, "\nHave command\n" ); + #endif setuidgid( Domain ); set_admin_type(); count_stuff(); @@ -257,9 +271,8 @@ if( errors = get_session_data( Username, Domain, ip_addr )) { /* Error with session data - need to login */ - sprintf(err_code, "%3d\n", errors ); - fprintf( stderr, "Error code returned: %s", err_code); - sprintf(StatusMessage, "%s\n", get_html_text( err_code )); + fprintf( stderr, "Error code returned: %d", errors); + sprintf(StatusMessage, "%s\n", get_html_text( errors )); show_login(); } else { @@ -271,28 +284,41 @@ } else if ( strlen(Action) == 0) { + #ifdef debug + fprintf( stderr, "No button pressed - show login\n\n" ); + #endif /* No button pressed... Show login page */ show_login(); } else if (0 == strlen(Username) || 0==strlen(Password)) { + #ifdef debug + fprintf( stderr, "Missing required fields\n\n" ); + #endif /* If they left anything blank, don't bother to authenticate */ - sprintf(StatusMessage, "%s\n", get_html_text("316")); + sprintf(StatusMessage, "%s\n", get_html_text(316)); show_login(); } else if (NULL == (pw = vauth_user( Username, Domain, Password, "" ))) { + #ifdef debug + fprintf( stderr, "Invalid username/password\n\n" ); + #endif /* Invalid user/domain/password - show error message */ - sprintf(StatusMessage, "%s\n", get_html_text("198")); + sprintf(StatusMessage, "%s\n", get_html_text(198)); show_login(); } else { + #ifdef debug + fprintf( stderr, "Try to login\n\n" ); + #endif /* Just logged in */ setuidgid( Domain ); if( create_session_file( ip_addr, pw->pw_dir )) { + fprintf(stderr, "Unable to create session file" ); printf( "Unable to create session file" ); } else { Index: qmailadmin.h =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- qmailadmin.h 31 Jan 2004 11:08:00 -0000 1.3 +++ qmailadmin.h 7 Feb 2004 09:22:36 -0000 1.4 @@ -36,7 +36,7 @@ #define NUM_SQL_OPTIONS 6 -char *get_html_text( char *index ); +char *get_html_text( int target ); int open_lang(); int quota_to_bytes(char[], char*); //jhopper prototype Index: template.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/template.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- template.c 31 Jan 2004 11:08:00 -0000 1.10 +++ template.c 7 Feb 2004 09:22:36 -0000 1.11 @@ -16,6 +16,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ + +//#define debug + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -56,6 +59,7 @@ int j; int inchar; int testint; + int target; char *tmpstr; struct stat mystat; char qconvert[11]; @@ -70,6 +74,9 @@ return(-1); } + #ifdef debug + fprintf(stderr, "Send Template %s\n", filename); + #endif /* Try to get the template path from ENVIRONMENT */ tmpstr = getenv(QMAILADMIN_TEMPLATEDIR); @@ -80,6 +87,10 @@ /* Build the fully qualified file name */ snprintf(fqfn, (sizeof(fqfn) - 1), "%s/html/%s", tmpstr, filename); + #ifdef debug + fprintf(stderr, "Final template filename: %s\n", fqfn); + #endif + /* Does file exist */ if (lstat(fqfn, &mystat) == -1) { fprintf(stderr, "Qmailadmin: Can't stat '%s', check permissions.\n", fqfn); @@ -95,7 +106,7 @@ /* open the template */ fs = fopen( fqfn, "r" ); if (fs == NULL) { - fprintf(stderr,"STN1 %s %s\n", get_html_text("144"), fqfn); + fprintf(stderr,"STN1 %s %s\n", get_html_text(144), fqfn); return 144; } @@ -134,7 +145,7 @@ if(MaxPopAccounts > -1) { printf("%d/%d", CurPopAccounts, MaxPopAccounts); } else { - printf("%d/%s", CurPopAccounts, get_html_text("229")); + printf("%d/%s", CurPopAccounts, get_html_text(229)); } break; @@ -169,12 +180,6 @@ show_mailing_list_line(Username,Domain,Mytime,RealDir); break; - /* display a file (used for mod_autorespond ONLY) */ - /* this code should be moved to a function in autorespond.c */ - case 'F': - display_robot_message(); - break; - /* show the mailing list digest subscribers */ case 'G': show_list_group_now(2); @@ -206,7 +211,7 @@ if(MaxMailingLists > -1) { printf("%d/%d", CurMailingLists, MaxMailingLists); } else { - printf("%d/%s", CurMailingLists, get_html_text("229")); + printf("%d/%s", CurMailingLists, get_html_text(229)); } break; @@ -216,7 +221,7 @@ if(MaxForwards > -1) { printf("%d/%d", CurForwards, MaxForwards); } else { - printf("%d/%s", CurForwards, get_html_text("229")); + printf("%d/%s", CurForwards, get_html_text(229)); } break; @@ -226,7 +231,7 @@ if(MaxAutoResponders > -1) { printf("%d/%d", CurAutoResponders, MaxAutoResponders); } else { - printf("%d/%s", CurAutoResponders, get_html_text("229")); + printf("%d/%s", CurAutoResponders, get_html_text(229)); } break; @@ -250,14 +255,14 @@ i=0; Buffer[i]=fgetc(fs); if (Buffer[i] == '/') { - fprintf(actout, "STN2 %s", get_html_text("144")); + fprintf(actout, "STN2 %s", get_html_text(144)); } else { for(;Buffer[i] != '\0' && Buffer[i] != '#' && i < sizeof(Buffer)-1;) { Buffer[++i] = fgetc(fs); } Buffer[i] = '\0'; if ((strstr(Buffer, "../")) != NULL) { - fprintf(actout, "STN3 %s: %s", get_html_text("144"), Buffer); + fprintf(actout, "STN3 %s: %s", get_html_text(144), Buffer); } else if((strcmp(Buffer, filename)) != 0) { send_template(Buffer); } @@ -293,7 +298,7 @@ if(AdminType == DOMAIN_ADMIN) printf("NOQUOTA"); else - printf(get_html_text("229")); + printf(get_html_text(229)); } break; @@ -395,7 +400,12 @@ case 'X': for(i=0;i<3;++i) dchar[i] = fgetc(fs); dchar[i] = 0; - printf("%s", get_html_text(dchar)); + target = atoi( dchar ); + #ifdef debug + fprintf(stderr, "X - dchar: %s target: %d\n", dchar, target); + fflush(stderr); + #endif + printf("%s", get_html_text(target)); break; /* logout link/text */ @@ -407,7 +417,7 @@ get_session_val("returnhttp="), value); } else { printf("%s/com/logout?user=%s&dom=%s&time=%d&\">%s</a>", - CGIPATH, Username, Domain, Mytime, get_html_text("218")); + CGIPATH, Username, Domain, Mytime, get_html_text(218)); } break; Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- user.c 1 Feb 2004 00:50:28 -0000 1.15 +++ user.c 7 Feb 2004 09:22:36 -0000 1.16 @@ -117,7 +117,7 @@ if (pw == NULL) { /* No more users to view */ sprintf(uBufA, "%i", colspan); - sprintf(uBufB, "%s", get_html_text("131")); + sprintf(uBufB, "%s", get_html_text(131)); send_template("show_error_line.html"); moreusers = 0; @@ -150,7 +150,7 @@ } } else { - sprintf(uBufC, "%s / %s", uBufD, get_html_text("229")); + sprintf(uBufC, "%s / %s", uBufD, get_html_text(229)); } /* display button to modify user */ @@ -206,12 +206,12 @@ { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxPopAccounts != -1 && CurPopAccounts >= MaxPopAccounts ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("199"), + sprintf(StatusMessage, "%s %d\n", get_html_text(199), MaxPopAccounts); show_menu(); return(199); @@ -226,7 +226,7 @@ if (!( AdminType==DOMAIN_ADMIN || (AdminType==USER_ADMIN && strcmp(ActionUser,Username)==0))){ - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } @@ -262,12 +262,12 @@ arguments = (char **)malloc(MAX_BUFF); if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if ( MaxPopAccounts != -1 && CurPopAccounts >= MaxPopAccounts ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("199"), + sprintf(StatusMessage, "%s %d\n", get_html_text(199), MaxPopAccounts); show_menu(); return(199); @@ -276,13 +276,13 @@ GetValue(TmpCGI,Newu, "newu=", sizeof(Newu)); if ( fixup_local_name(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("148"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(148), Newu); adduser(); return(148); } if ( check_local_user(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("175"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(175), Newu); adduser(); return(175); } @@ -293,14 +293,14 @@ GetValue(TmpCGI,Password1, "password1=", sizeof(Password1)); GetValue(TmpCGI,Password2, "password2=", sizeof(Password2)); if ( strcmp( Password1, Password2 ) != 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("200")); + sprintf(StatusMessage, "%s\n", get_html_text(200)); adduser(); return(200); } #ifndef ENABLE_LEARN_PASSWORDS if ( strlen(Password1) <= 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("234")); + sprintf(StatusMessage, "%s\n", get_html_text(234)); adduser(); return(234); } @@ -316,13 +316,13 @@ GetValue(TmpCGI, c_num, "number_of_mailinglist=", MAX_BUFF); num = atoi(c_num); if(!(mailingListNames = malloc(sizeof(char *) * num))) { - sprintf(StatusMessage, "%s\n", get_html_text("201")); + sprintf(StatusMessage, "%s\n", get_html_text(201)); return(201); } else { for(cnt = 0; cnt < num; cnt++) { if(!(mailingListNames[cnt] = malloc(MAX_BUFF))) { - sprintf(StatusMessage, "%s\n", get_html_text("201")); + sprintf(StatusMessage, "%s\n", get_html_text(201)); return(201); } } @@ -362,7 +362,7 @@ vsetuserquota (Newu, Domain, "NOQUOTA"); } else if ( Quota[0] != 0 ) { if(quota_to_bytes(qconvert, Quota)) { - sprintf(StatusMessage, get_html_text("314")); + sprintf(StatusMessage, get_html_text(314)); } else { vsetuserquota (Newu, Domain, qconvert); } @@ -381,13 +381,13 @@ /* report success */ sprintf(StatusMessage, "%s %s@%s (%s) %s", - get_html_text("002"), Newu, Domain, Gecos, - get_html_text("119")); + get_html_text(2), Newu, Domain, Gecos, + get_html_text(119)); } else { /* otherwise, report error */ sprintf(StatusMessage, "<font color=\"red\">%s %s@%s (%s) %s</font>", - get_html_text("002"), Newu, Domain, Gecos, get_html_text("120")); + get_html_text(2), Newu, Domain, Gecos, get_html_text(120)); } call_hooks(HOOK_ADDUSER, Newu, Domain, Password1, Gecos); @@ -451,7 +451,7 @@ at the start of the program name only. BUG 2003-12 */ error = execl(cmd, cmd, p1, p2, p3, p4, NULL); fprintf(actout, "Error %d %s \"%s\", %s, %s, %s, %s, %s\n", - errno, get_html_text("202"), cmd, hook_type, p1, p2, p3, p4); + errno, get_html_text(202), cmd, hook_type, p1, p2, p3, p4); /* if (error == -1) return (-1); */ exit(127); } else { @@ -475,13 +475,13 @@ struct vqpasswd *pw; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } vdeluser( ActionUser, Domain ); - sprintf(StatusMessage, "%s %s", ActionUser, get_html_text("141")); + sprintf(StatusMessage, "%s %s", ActionUser, get_html_text(141)); /* Start create forward when delete - * Code added by Eugene Teo 6 June 2000 @@ -492,7 +492,7 @@ if (strcmp(forward, "on") == 0) { GetValue(TmpCGI, forwardto, "forwardto=", sizeof(forwardto)); if(adddotqmail_shared(ActionUser, forwardto, -1)!=0) { - sprintf(StatusMessage, get_html_text("315"), forwardto); + sprintf(StatusMessage, get_html_text(315), forwardto); } } @@ -510,7 +510,7 @@ GetValue(TmpCGI,Newu, "newu=", sizeof(Newu)); if (check_email_addr(Newu) ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("148"), Newu); + sprintf(StatusMessage, "%s %s\n", get_html_text(148), Newu); setremotecatchall(); return(148); } @@ -523,7 +523,7 @@ if ( (fs = fopen(".qmail-default", "w")) == NULL ) { fprintf(stderr,"QmailAdmin: SRCN %s %s\n", - get_html_text("144"), ".qmail-default"); + get_html_text(144), ".qmail-default"); } else { fprintf(fs,"| %s/bin/vdelivermail '' %s\n",VPOPMAILDIR,Newu); @@ -540,12 +540,12 @@ if ( (fs = fopen(".qmail-default", "w")) == NULL ) { fprintf(stderr,"QmailAdmin: BA %s %s\n", - get_html_text("144"), ".qmail-default"); + get_html_text(144), ".qmail-default"); } else { fprintf(fs,"| %s/bin/vdelivermail '' bounce-no-mailbox\n",VPOPMAILDIR); fclose(fs); } - strcpy(CurCatchall, get_html_text("130")); + strcpy(CurCatchall, get_html_text(130)); show_users(Username, Domain, Mytime); return(130); } @@ -556,12 +556,12 @@ if ( (fs = fopen(".qmail-default", "w")) == NULL ) { fprintf(stderr,"QmailAdmin: DA %s %s\n", - get_html_text("144"), ".qmail-default"); + get_html_text(144), ".qmail-default"); } else { fprintf(fs,"| %s/bin/vdelivermail '' delete\n",VPOPMAILDIR); fclose(fs); } - strcpy(CurCatchall, get_html_text("303")); + strcpy(CurCatchall, get_html_text(303)); show_users(Username, Domain, Mytime); return(303); } @@ -584,24 +584,24 @@ if (!( AdminType==DOMAIN_ADMIN || (AdminType==USER_ADMIN && strcmp(ActionUser,Username)==0))){ - sprintf(StatusMessage,"%s", get_html_text("142")); + sprintf(StatusMessage,"%s", get_html_text(142)); return(142); } if (strlen(Password1)>0 && strlen(Password2)>0 ) { if ( strcmp( Password1, Password2 ) != 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("200")); + sprintf(StatusMessage, "%s\n", get_html_text(200)); moduser(); return(200); } ret_code = vpasswd( ActionUser, Domain, Password1, USE_POP); if ( ret_code != VA_SUCCESS ) { - sprintf(StatusMessage, "%s (%s)", get_html_text("140"), + sprintf(StatusMessage, "%s (%s)", get_html_text(140), verror(ret_code)); } else { - /* sprintf(StatusMessage,"%s %s@%s.", get_html_text("139"), + /* sprintf(StatusMessage,"%s %s@%s.", get_html_text(139), ActionUser, Domain ); */ - strcpy (StatusMessage, get_html_text("139")); + strcpy (StatusMessage, get_html_text(139)); } } @@ -616,23 +616,23 @@ /* Blank or no change, do nothing */ } else if (strncmp(Quota, "NOQUOTA", 2)==0) { if (vsetuserquota( ActionUser, Domain, Quota )) { - sprintf(StatusMessage, get_html_text("307")); /* invalid quota */ + sprintf(StatusMessage, get_html_text(307)); /* invalid quota */ } else { - sprintf(StatusMessage, get_html_text("308")); + sprintf(StatusMessage, get_html_text(308)); } } else if (atoi(Quota)) { quotaptr = Quota; if (quota_to_bytes(qconvert, quotaptr)) { - sprintf(StatusMessage, get_html_text("307")); + sprintf(StatusMessage, get_html_text(307)); } else if(strcmp(qconvert, vpw->pw_shell)==0) { /* unchanged, do nothing */ } else if(vsetuserquota( ActionUser, Domain, qconvert )) { - sprintf(StatusMessage, get_html_text("307")); + sprintf(StatusMessage, get_html_text(307)); } else { - sprintf(StatusMessage, get_html_text("309"), qconvert); + sprintf(StatusMessage, get_html_text(309), qconvert); } } else { - sprintf(StatusMessage, get_html_text("307")); + sprintf(StatusMessage, get_html_text(307)); } } #endif @@ -721,13 +721,13 @@ /* If nothing was entered, error */ if ( box[0] == 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("215")); + sprintf(StatusMessage, "%s\n", get_html_text(215)); moduser(); return(215); /* check it for a valid email address } else if ( check_email_addr( box ) == 1 ) { - sprintf(StatusMessage, "%s\n", get_html_text("148")); + sprintf(StatusMessage, "%s\n", get_html_text(148)); moduser(); */ } @@ -772,7 +772,7 @@ /* if no subject, error */ if ( box[0] == 0 ) { - sprintf(StatusMessage, "%s\n", get_html_text("216")); + sprintf(StatusMessage, "%s\n", get_html_text(216)); moduser(); return(216); } Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- util.c 1 Feb 2004 02:13:56 -0000 1.10 +++ util.c 7 Feb 2004 09:22:36 -0000 1.11 @@ -148,10 +148,10 @@ fprintf( stderr, ".qmail-default: %s\n", Buffer); if (strstr(Buffer, " bounce-no-mailbox\n") != NULL) { - sprintf(CurCatchall,"%s", get_html_text("130")); + sprintf(CurCatchall,"%s", get_html_text(130)); } else if (strstr(Buffer, " delete\n") != NULL) { - sprintf(CurCatchall,"%s", get_html_text("236")); + sprintf(CurCatchall,"%s", get_html_text(236)); } else if (... [truncated message content] |
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30936 Modified Files: Tag: stable-1_2 ChangeLog alias.c autorespond.c dotqmail.c forward.c template.c util.c Log Message: Store aliases and autoresponders in valias table if vpopmail was compiled with --enable-valias. Development of this feature was sponsored by ACIS Pty Ltd <http://www.acis.com.au/>. Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -d -r1.15.2.1 -r1.15.2.2 --- ChangeLog 30 Jan 2004 14:57:32 -0000 1.15.2.1 +++ ChangeLog 2 Feb 2004 00:39:47 -0000 1.15.2.2 @@ -5,6 +5,9 @@ Tom Collins - Add note to INSTALL about requiring vpopmail 5.4.0 or later. + - Store aliases and autoresponders in valias table if vpopmail + was compiled with --enable-valias. Development of this feature + was sponsored by ACIS Pty Ltd <http://www.acis.com.au/>. 1.2.0 - released 28-Jan-04 Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- alias.c 14 Jan 2004 21:23:25 -0000 1.4 +++ alias.c 2 Feb 2004 00:39:47 -0000 1.4.2.1 @@ -25,6 +25,12 @@ #include <errno.h> #include <dirent.h> #include <vpopmail.h> +#include <vpopmail_config.h> +/* undef some macros that get redefined in config.h below */ +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION #include <vauth.h> #include "config.h" #include "qmailadmin.h" @@ -53,6 +59,35 @@ (*(const struct dirent **) b)->d_name); } +struct aliasentry { + char alias_name[MAX_FILE_NAME]; + char alias_command[MAX_BUFF]; + struct aliasentry *next; +}; + +struct aliasentry *firstalias = NULL, *curalias = NULL; + +add_alias_entry (char *alias_name, char *alias_command) +{ + if (firstalias == NULL) { + firstalias = malloc (sizeof(struct aliasentry)); + curalias = firstalias; + } else { + curalias->next = malloc (sizeof (struct aliasentry)); + curalias = curalias->next; + } + curalias->next = NULL; + strcpy (curalias->alias_name, alias_name); + strcpy (curalias->alias_command, alias_command); +} +struct aliasentry *get_alias_entry() +{ + struct aliasentry *temp; + + temp = curalias->next; + free (curalias); + return temp; +} show_dotqmail_lines(char *user, char *dom, time_t mytime, char *dir) { @@ -66,7 +101,10 @@ char *alias_name_from_command; int i,j,stop,k,startnumber; int m,n; + int page; struct dirent **namelist; + char this_alias[MAX_FILE_NAME]; + char *alias_line; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -74,13 +112,50 @@ exit(0); } - if (atoi(Pagenumber)==0) { - *Pagenumber='1'; - } + page = atoi(Pagenumber); + if (page == 0) page = 1; - startnumber = MAXALIASESPERPAGE * (atoi(Pagenumber) - 1); + startnumber = MAXALIASESPERPAGE * (page - 1); k=0; +#ifdef VALIAS + alias_line = valias_select_all(alias_name, Domain); + while (alias_line != NULL) { + strcpy (this_alias, alias_name); + alias_name_from_command = dotqmail_alias_command(alias_line); + if ( alias_name_from_command != NULL || *alias_line == '#') { + k++; + + if (k > MAXALIASESPERPAGE + startnumber) { + moreusers = 1; + break; + } + if (k > startnumber) { + if (*alias_line == '#') { + add_alias_entry (alias_name, "#"); + } else while (1) { + if (alias_name_from_command != NULL) { + add_alias_entry (alias_name, alias_name_from_command); + } + alias_line = valias_select_all_next(alias_name); + + /* exit if we run out of alias lines, or go to a new alias name */ + if ((alias_line == NULL) || (strcmp (this_alias, alias_name) != 0)) break; + + alias_name_from_command = dotqmail_alias_command(alias_line); + } + } + } + /* burn through remaining lines for this alias, if necessary */ + while ((alias_line != NULL) && (strcmp (this_alias, alias_name) == 0)) { + alias_line = valias_select_all_next(alias_name); + } + } +#else + /* We can't use valias code here, because it doesn't return a sorted + list of aliases. If we update vpopmail's vpalias.c to do that, + then qmailadmin could use the single set of valias_ functions above. + */ if ( (mydir = opendir(".")) == NULL ) { fprintf(actout,"<tr><td colspan=\"4\">"); fprintf(actout,"%s %d", get_html_text("143"), 1); @@ -101,15 +176,6 @@ if ( strstr(mydirent->d_name, "-owner") != NULL ) continue; if ( strstr(mydirent->d_name, "-default") != NULL ) continue; - if ( k < startnumber ) { - k++; - continue; - } - if ( k >MAXALIASESPERPAGE + startnumber) { - moreusers=1; - break; - } - if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { fprintf(actout,"<tr><td colspan=4>"); fprintf(actout,"%s %s", get_html_text("144"), mydirent->d_name); @@ -124,97 +190,126 @@ fgets(TmpBuf2, sizeof(TmpBuf2), fs); alias_name_from_command = dotqmail_alias_command(TmpBuf2); + if ( alias_name_from_command != NULL || *TmpBuf2 == '#') { + k++; + + if ( k >MAXALIASESPERPAGE + startnumber) { + moreusers=1; + fclose(fs); + break; + } + if (k <= startnumber) { + fclose (fs); + continue; + } + /* Note that the current system fails for multi-line .qmail-user files where the first line starts with a '#' or is invalid. This is good for mailing lists (since dotqmail_alias_command bails on program delivery that contains ezmlm) but bad for people who may have complex .qmail-user files that start with a comment. */ - if ( alias_name_from_command != NULL || *TmpBuf2 == '#') { - stop=0; - - fprintf(actout, "<tr>\n"); - qmail_button (alias_name, "deldotqmail", user, dom, mytime, "trash.png"); - if (*TmpBuf2 == '#') - fprintf(actout, "<td> </td>"); /* don't allow modify on blackhole */ - else - qmail_button (alias_name, "moddotqmail", user, dom, mytime, "modify.png"); - fprintf(actout, "<td align=left>%s</td>\n", alias_name); - fprintf(actout, "<td align=left>"); - if (*TmpBuf2 == '#') { /* this is a blackhole account */ - fprintf (actout, "<I>%s</I>", get_html_text("303")); - stop = 1; - } - while (!stop) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); - - /* check to see if it is an invalid line , - * if so skip to next - */ - if (alias_name_from_command == NULL ) { - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs)==NULL) { - stop=1; - } - continue; - } - - strcpy(alias_user, alias_name_from_command); - alias_domain=alias_user; - /* get the domain alone from alias_user */ - for(;*alias_domain != '\0' && *alias_domain != '@' - && *alias_domain != ' '; alias_domain++); - alias_domain++; - if(strcmp(alias_domain, Domain)==0) { - /* if a local user, exclude the domain */ - strcpy(TmpBuf3, alias_user); - for(j=0; TmpBuf3[j]!=0 && TmpBuf3[j]!='@';j++); - TmpBuf3[j]=0; - if (check_local_user(TmpBuf3)) { - strcpy(alias_user, TmpBuf3); - } else { - /* make it red so it jumps out -- this is no longer a valid forward */ - sprintf(alias_user, "<font color=\"red\">%s</font>", - alias_name_from_command); - } - } - - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs) == NULL) { - stop=1; - fprintf(actout, "%s ", alias_user); - } else { - fprintf(actout, "%s, ", alias_user); + add_alias_entry (alias_name, "#"); + } else while (1) { + if (alias_name_from_command != NULL) { + add_alias_entry (alias_name, alias_name_from_command); } + + if (fgets(TmpBuf2, sizeof(TmpBuf2), fs) == NULL) break; + alias_name_from_command = dotqmail_alias_command(TmpBuf2); } - fprintf(actout, "</td>\n"); - - fprintf(actout, "</tr>\n"); } fclose(fs); - k++; } } closedir(mydir); - /* bk: fix memory leak */ - for (m=0; m<n; m++) - free(namelist[m]); + /* free memory allocated by bkscandir */ + for (m=0; m<n; m++) free(namelist[m]); free(namelist); +#endif + + curalias = firstalias; + while (curalias != NULL) { + strcpy (this_alias, curalias->alias_name); + /* display the entry */ + + /* We assume that if first char is '#', this is a blackhole. + * This is a big assumption, and may cause problems at some point. + */ + + fprintf(actout, "<tr>\n"); + qmail_button (this_alias, "deldotqmail", user, dom, mytime, "trash.png"); + if (*curalias->alias_command == '#') + fprintf(actout, "<td> </td>"); /* don't allow modify on blackhole */ + else + qmail_button (this_alias, "moddotqmail", user, dom, mytime, "modify.png"); + fprintf(actout, "<td align=left>%s</td>\n", this_alias); + fprintf(actout, "<td align=left>"); + + stop=0; + if (*curalias->alias_command == '#') { + /* this is a blackhole account */ + fprintf (actout, "<I>%s</I>", get_html_text("303")); + stop = 1; + } + + while (!stop) { + strcpy(alias_user, curalias->alias_command); + /* get the domain alone from alias_user */ + for(alias_domain = alias_user; + *alias_domain != '\0' && *alias_domain != '@' && *alias_domain != ' '; + alias_domain++); + + /* if a local user, strip domain name from address */ + if ((*alias_domain == '@') && (strcasecmp (alias_domain+1, Domain) == 0)) { + /* strip domain name from address */ + *alias_domain = '\0'; + + if (!check_local_user(alias_user)) { + /* make it red so it jumps out -- this is no longer a valid forward */ + sprintf(alias_user, "<font color=\"red\">%s</font>", + curalias->alias_command); + } + } + + /* find next entry, so we know if we should print a , or not */ + while (1) { + curalias = get_alias_entry(); + + /* exit if we run out of alias lines, or go to a new alias name */ + if ((curalias == NULL) || (strcmp (this_alias, curalias->alias_name) != 0)) { + stop = 1; + fprintf (actout, "%s", alias_user); + break; + } + + fprintf (actout, "%s, ", alias_user); + break; + } + } + /* burn through any remaining entries */ + while ((curalias != NULL) && (strcmp (this_alias, curalias->alias_name) == 0)) { + curalias = get_alias_entry(); + } + fprintf(actout, "</td>\n</tr>\n"); + } if (AdminType == DOMAIN_ADMIN) { fprintf(actout, "<tr><td align=\"right\" colspan=\"4\">"); fprintf(actout, "[ "); - if(atoi(Pagenumber) > 1 ) { + if(page > 1 ) { fprintf(actout, "<a href=\"%s/com/showforwards?user=%s&dom=%s&time=%d&page=%d\">%s</a>", - CGIPATH,user,dom,mytime,atoi(Pagenumber)-1?atoi(Pagenumber)-1:atoi(Pagenumber),get_html_text("135")); + CGIPATH,user,dom,mytime,page - 1,get_html_text("135")); fprintf(actout, " | "); } - fprintf(actout, "<a href=\"%s/com/showforwards?user=%s&dom=%s&time=%d&page=%s\">%s</a>", - CGIPATH,user,dom,mytime,Pagenumber,get_html_text("136")); + fprintf(actout, "<a href=\"%s/com/showforwards?user=%s&dom=%s&time=%d&page=%d\">%s</a>", + CGIPATH,user,dom,mytime,page,get_html_text("136")); fprintf(actout, " | "); if (moreusers) { fprintf(actout, "<a href=\"%s/com/showforwards?user=%s&dom=%s&time=%d&page=%d\">%s</a>", - CGIPATH,user,dom,mytime,atoi(Pagenumber)+1,get_html_text("137")); + CGIPATH,user,dom,mytime,page+1,get_html_text("137")); fprintf(actout, " ]"); } fprintf(actout, "</td></tr>"); @@ -228,45 +323,36 @@ */ int show_dotqmail_file(char *user) { - FILE *fs; char alias_user[MAX_BUFF]; char *alias_domain; char *alias_name_from_command; - char *dot_file; - int l,j; + char *alias_line; + int j; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); vclose(); exit(0); } - - l = strlen(user); - dot_file= strcat(strcpy(malloc(8 + l), ".qmail-"), user); - - for(j=8;dot_file[j]!=0;j++) { - if (dot_file[j]=='.') { - dot_file[j] = ':'; - } - } - - if ( (fs=fopen(dot_file,"r"))==NULL) { - sprintf(StatusMessage,"%s %s<br>\n", get_html_text("144"), dot_file); - vclose(); - exit(0); - } fprintf(actout, "<tr>"); fprintf(actout, "<td align=\"center\" valign=\"top\"><b>%s</b></td>", user); - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - - while (fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + alias_line = valias_select (user, Domain); + while (alias_line != NULL) { + alias_name_from_command = dotqmail_alias_command(alias_line); - /* check to see if it is an invalid line , if so skip to next*/ + /* check to see if it is an invalid line , if so skip to next */ if (alias_name_from_command == NULL ) continue; + add_alias_entry (user, alias_line); + alias_line = valias_select_next(); + } + + curalias = firstalias; + while (curalias != NULL) { + alias_line = curalias->alias_command; + alias_name_from_command = dotqmail_alias_command (alias_line); strcpy(alias_user, alias_name_from_command); /* get the domain alone from alias_user */ alias_domain = alias_user; @@ -298,7 +384,7 @@ fprintf(actout, "<input type=\"hidden\" name=\"modu\" value=\"%s\">\n", user); fprintf(actout, "<input type=\"hidden\" name=\"linedata\" value=\"%s\">\n", - TmpBuf2); + alias_line); fprintf(actout, "<input type=\"hidden\" name=\"action\" value=\"delentry\">\n"); fprintf(actout, "<input type=\"image\" border=\"0\" src=\"%s/delete.png\">\n", IMAGEURL); @@ -309,52 +395,30 @@ fprintf(actout, "</tr>\n"); fprintf(actout, "<tr>\n"); fprintf(actout, "<td align=\"left\"> </td>\n"); + curalias = get_alias_entry(); } /* finish up the last line (all empty) */ fprintf(actout, "<td align=\"left\"> </td>"); fprintf(actout, "<td align=\"left\"> </td>"); fprintf(actout, "</tr>"); - fclose(fs); } int onevalidonly(char *user) { - FILE *fs; + char *alias_line; char *alias_name_from_command; - char *dot_file; - int l,j; - - l = strlen(user); - dot_file= strcat(strcpy(malloc(8 + l), ".qmail-"), user); - for(j=8;dot_file[j]!=0;j++) { - if (dot_file[j]=='.') { - dot_file[j] = ':'; - } - } + int lines; - if ( (fs=fopen(dot_file,"r"))==NULL) { - sprintf(StatusMessage,"%s %s<br>\n", get_html_text("144"), - dot_file); - vclose(); - exit(0); - } - - j=0; - while( fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL ) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + lines=0; + alias_line = valias_select (user, Domain); + while( alias_line != NULL ) { /* check to see if it is an invalid line , if so skip to next */ - if (alias_name_from_command == NULL ) continue; - - j++; + if (dotqmail_alias_command(alias_line) != NULL ) lines++; + alias_line = valias_select_next(); } - fclose(fs); - - if (j <2 ) return (1); - else return (0); + return (lines < 2); } - - moddotqmail() { if ( AdminType!=DOMAIN_ADMIN ) { @@ -499,7 +563,7 @@ return(-1); } - sprintf(TmpBuf2, "&%s\n", dest); + sprintf(TmpBuf2, "&%s", dest); if (dotqmail_add_line(forwardname, TmpBuf2)) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 2); return(-1); Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -d -r1.3 -r1.3.2.1 --- autorespond.c 13 Jan 2004 06:28:34 -0000 1.3 +++ autorespond.c 2 Feb 2004 00:39:47 -0000 1.3.2.1 @@ -51,42 +51,24 @@ int show_autorespond_line(char *user, char *dom, time_t mytime, char *dir) { - DIR *mydir; - struct dirent *mydirent; - FILE *fs; char *addr; + char alias_name[MAX_FILE_NAME]; + char *alias_line; int i,j; - if ( (mydir = opendir(".")) == NULL ) { - fprintf(actout, "<tr><td colspan=\"3\">%s %d</td></tr>\n", - get_html_text("143"), 1); - return 0; - } - sort_init(); - while( (mydirent=readdir(mydir)) != NULL ) { - /* does name start with ".qmail-" ? */ - if ( strncmp(".qmail-", mydirent->d_name, 7) == 0 ) { - if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { - fprintf(actout, "<tr><td colspan=\"3\">%s %s</td></tr>\n", - get_html_text("144"), mydirent->d_name); - continue; - } - - fgets( TmpBuf2, sizeof(TmpBuf2), fs); - fclose(fs); - - if ( strstr( TmpBuf2, "autorespond") != 0 ) { - sort_add_entry (&mydirent->d_name[7], 0); - } + alias_line = valias_select_all (alias_name, Domain); + while( alias_line != NULL ) { + if ( strstr( alias_line, "/autorespond ") != 0 ) { + sort_add_entry (alias_name, 0); } + alias_line = valias_select_all_next (alias_name); } - closedir(mydir); + sort_dosort(); for (i = 0; addr = sort_get_entry(i); ++i) { - str_replace (addr, ':', '.'); fprintf(actout, "<tr>"); fprintf(actout, "<td align=\"center\">"); @@ -158,7 +140,6 @@ exit(0); } - if ( check_local_user(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("175"), ActionUser); addautorespond(); @@ -196,7 +177,7 @@ /* - * Make the autorespodner directory + * Make the autoresponder directory */ memset(TmpBuf2,0,sizeof(TmpBuf2)); strncpy(TmpBuf2, ActionUser, sizeof(TmpBuf2)); @@ -206,18 +187,14 @@ /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; - - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); - - fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", + valias_delete (ActionUser, Domain); + sprintf(TmpBuf, "|%s/autorespond 10000 5 %s/%s/message %s/%s", AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); - + valias_insert (ActionUser, Domain, TmpBuf); if ( strlen(Newu) > 0 ) { - fprintf(fs, "&%s\n", Newu); + sprintf(TmpBuf, "&%s", Newu); + valias_insert (ActionUser, Domain, TmpBuf); } - fclose(fs); /* * Make the autoresponder message file @@ -234,8 +211,7 @@ */ sprintf(StatusMessage, "%s %s@%s\n", get_html_text("180"), ActionUser, Domain); - show_autoresponders(Username,Domain); - + show_autoresponders(Username, Domain, Mytime); } delautorespond() @@ -259,9 +235,8 @@ exit(0); } - for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]=='.') ActionUser[i] = ':'; - sprintf(TmpBuf2, ".qmail-%s", ActionUser); - if ( unlink(TmpBuf2) != 0 ) ack( get_html_text("181"), 345); + /* delete the alias */ + valias_delete (ActionUser, Domain); memset(TmpBuf2,0,sizeof(TmpBuf2)); for(i=0;ActionUser[i]!=0;++i) { @@ -272,8 +247,7 @@ } } - for(i=0;TmpBuf2[i]!=0;++i) if (TmpBuf2[i]==':') TmpBuf2[i] = '.'; - for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]==':') ActionUser[i] = '.'; + /* delete the autoresponder directory */ sprintf(TmpBuf, "%s/%s", RealDir, TmpBuf2); vdelfiles(TmpBuf); sprintf(StatusMessage, "%s %s\n", get_html_text("182"), ActionUser); @@ -298,6 +272,7 @@ } +/* addautorespondnow and modautorespondnow should be merged into a single function */ modautorespondnow() { FILE *fs; @@ -325,14 +300,14 @@ } if (strlen(Alias) <= 1) { - sprintf(StatusMessage, "%s %s\n", get_html_text("177"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text("178"), ActionUser); modautorespond(); vclose(); exit(0); } if (strlen(Message) <= 1) { - sprintf(StatusMessage, get_html_text("BODY_EMPTY"), ActionUser); + sprintf(StatusMessage, "%s %s\n", get_html_text("179"), ActionUser); modautorespond(); vclose(); exit(0); @@ -342,31 +317,22 @@ /* * Make the autoresponder directory */ - strcpy(TmpBuf2,ActionUser); - upperit(TmpBuf2); - mkdir(TmpBuf2, 0750); + memset(TmpBuf2,0,sizeof(TmpBuf2)); + strncpy(TmpBuf2, ActionUser, sizeof(TmpBuf2)); + upperit(TmpBuf2); + mkdir(TmpBuf2, 0750); /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); - - fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", + valias_delete (ActionUser, Domain); + sprintf(TmpBuf, "|%s/autorespond 10000 5 %s/%s/message %s/%s", AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); - + valias_insert (ActionUser, Domain, TmpBuf); if ( strlen(Newu) > 0 ) { - for(i=0;Newu[i]!='@';TmpBuf3[i] = Newu[i],++i); - if((vpw=vauth_getpw(TmpBuf3, Domain))!=NULL && (strstr(Newu,Domain)!= 0)){ - fprintf(fs, "%s/Maildir/\n", vpw->pw_dir); - } else { - fprintf(fs, "&%s\n", Newu); - } - } else if ( (vpw = vauth_getpw(ActionUser, Domain)) != NULL) { - fprintf(fs, "%s/Maildir/\n", vpw->pw_dir); - } - fclose(fs); + sprintf(TmpBuf, "&%s", Newu); + valias_insert (ActionUser, Domain, TmpBuf); + } /* * Make the autoresponder message file @@ -376,44 +342,29 @@ fprintf(fs, "From: %s@%s\n", ActionUser,Domain); fprintf(fs, "Subject: %s\n\n", Alias); fprintf(fs, "%s", Message); + fclose(fs); /* * Report success */ - sprintf(StatusMessage, "%s %s@%s\n", get_html_text("183"),ActionUser,Domain); + sprintf(StatusMessage, "%s %s@%s\n", get_html_text("183"), + ActionUser, Domain); show_autoresponders(Username, Domain, Mytime); } count_autoresponders() { - DIR *mydir; - struct dirent *mydirent; - FILE *fs; - char mailinglist_name[MAX_FILE_NAME]; - int i,j; - - if ( (mydir = opendir(".")) == NULL ) { - fprintf(actout,"%s %d<BR>\n", get_html_text("143"), 1); - fprintf(actout,"</table>"); - return(0); - } + char alias_name[MAX_FILE_NAME]; + char *alias_line; CurAutoResponders = 0; - while( (mydirent=readdir(mydir)) != NULL ) { - /* does name start with ".qmail-" ? */ - if ( strncmp(".qmail-", mydirent->d_name, 7) == 0 ) { - if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { - fprintf(actout,"%s %s<br>\n", get_html_text("144"), - mydirent->d_name); - continue; - } - fgets( TmpBuf2, sizeof(TmpBuf2), fs); - if ( strstr( TmpBuf2, "autorespond") != 0 ) { - ++CurAutoResponders; - } - fclose(fs); + + alias_line = valias_select_all (alias_name, Domain); + while( alias_line != NULL ) { + if ( strstr( alias_line, "/autorespond ") != 0 ) { + CurAutoResponders++; } + alias_line = valias_select_all_next (alias_name); } - closedir(mydir); } Index: dotqmail.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/dotqmail.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- dotqmail.c 10 Oct 2003 16:36:24 -0000 1.2 +++ dotqmail.c 2 Feb 2004 00:39:47 -0000 1.2.2.1 @@ -22,10 +22,26 @@ #include <string.h> #include <unistd.h> #include <sys/stat.h> +#include <vpopmail.h> +#include <vpopmail_config.h> #include "config.h" #include "qmailadmin.h" #include "qmailadminx.h" +int dotqmail_delete_files(char *user) +{ + return (! valias_delete (user, Domain)); +} +int dotqmail_add_line(char *user, char *line) +{ + return (valias_insert (user, Domain, line)); +} +#ifdef VALIAS +int dotqmail_del_line(char *user, char *line) +{ + return (valias_remove (user, Domain, line)); +} +#else #define _(String) gettext(String) #define MAX_LINE 512 @@ -67,24 +83,6 @@ return(0); } -int dotqmail_delete_files(char *user) -{ - int i,j; - - i = strlen(user); - - mydotqmail_name = strcat(strcpy(malloc(8 + i), ".qmail-"), user); - for(j=8;mydotqmail_name[j]!=0;j++) { - if (mydotqmail_name[j]=='.') { - mydotqmail_name[j] = ':'; - } - } - - if (!(unlink(mydotqmail_name))) return(1); - return(0); - -} - void dotqmail_close_files(char *user, int keep) { if (fr) fclose(fr); @@ -102,36 +100,6 @@ free(dotqmail_bak_name); } -int dotqmail_add_line(char *user, char *line) -{ - int exist = 0; - int i; - - if (dotqmail_open_files(user)) return(1); - - - if (fr) { - while (fgets(LineBuf, sizeof(LineBuf), fr)) { - i = strlen(line); - - if (!strncmp(LineBuf, line, sizeof(LineBuf))) { - exist = 1; - } - fputs(LineBuf, fw); - lr++; - } - lw = lr; - } - - if (!exist) { - fputs(line, fw); - lw++; - } - - dotqmail_close_files(user, exist); - return(0); -} - int dotqmail_del_line(char *user, char *line) { int exist = 1; @@ -190,3 +158,4 @@ dotqmail_close_files(user, 1); return(lr); } +#endif Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -d -r1.2 -r1.2.2.1 --- forward.c 10 Oct 2003 16:36:24 -0000 1.2 +++ forward.c 2 Feb 2004 00:39:47 -0000 1.2.2.1 @@ -55,43 +55,41 @@ return 0; } -int count_forwards(void) +int count_forwards() { - DIR *mydir; - struct dirent *mydirent; - struct stat mystat; - FILE *fs; + char *alias_line; char *alias_name_from_command; + char alias_name[MAX_FILE_NAME]; + char this_alias[MAX_FILE_NAME]; + int isforward; - /* FIXME: Do some caching here. */ CurForwards = 0; - if ((mydir = opendir(".")) == NULL) { - fprintf(actout, "<tr><td>%s %d</tr></td>\n", get_html_text("143"), 1); - return 0; - } - - while ((mydirent=readdir(mydir)) != NULL) { - /* - * don't read files that are really ezmlm-idx listowners, - * i.e. .qmail-user-owner - * - */ - if (strncmp (".qmail-", mydirent->d_name, 7) == 0) { - /* ignore symbolic links (ezmlm files) */ - if (!lstat(mydirent->d_name, &mystat) && S_ISLNK(mystat.st_mode)) continue; - - if ((fs=fopen(mydirent->d_name,"r")) == NULL) { - fprintf(actout, "%s %s<br>\n", get_html_text("144"), mydirent->d_name); - continue; + alias_line = valias_select_all (alias_name, Domain); + while (alias_line != NULL) { + strcpy (this_alias, alias_name); + if (*alias_line == '#') { /* blackhole++ */ } + else { + char *p1, *p2; + int isforward; + isforward = 1; + while (isforward && (alias_line != NULL) + && (strcmp (this_alias, alias_name) == 0)) { + p1 = strstr (alias_line, "/ezmlm-"); + p2 = strchr (alias_line, ' '); + if ( (p1 != NULL) && (p2 == NULL || p1 < p2) ) isforward = 0; + if (strstr (alias_line, "/autorespond ")) isforward = 0; + alias_line = valias_select_all_next(alias_name); } - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - fgets(TmpBuf2, sizeof(TmpBuf2), fs); - if (*TmpBuf2 != '|' && *TmpBuf2 != '#') CurForwards++; - fclose(fs); + if (isforward) CurForwards++; + } + + /* burn through remaining lines for this alias, if necessary */ + while ((alias_line != NULL) && (strcmp (this_alias, alias_name) == 0)) { + alias_line = valias_select_all_next(alias_name); } } - closedir(mydir); return 0; } + Index: template.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/template.c,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -u -d -r1.7 -r1.7.2.1 --- template.c 26 Jan 2004 00:41:07 -0000 1.7 +++ template.c 2 Feb 2004 00:39:47 -0000 1.7.2.1 @@ -180,17 +180,16 @@ case 'F': { FILE *fs; - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for (i=6; TmpBuf[i] != 0; ++i) { - if (TmpBuf[i] == '.') TmpBuf[i] = ':'; - } - if ((fs=fopen(TmpBuf, "r")) == NULL) ack("123", 123); - fgets(TmpBuf2, sizeof(TmpBuf2), fs); + char *alias_line; - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { + alias_line = valias_select (ActionUser, Domain); + /* should verify here that alias_line contains "/autorespond " */ + + if (alias_line = valias_select_next()) { + strcpy (TmpBuf2, alias_line); /* See if it's a Maildir path rather than address */ - i = strlen(TmpBuf2) - 2; + i = strlen(TmpBuf2) - 1; if (TmpBuf2[i] == '/') { --i; for(; TmpBuf2[i] != '/'; --i); @@ -202,12 +201,9 @@ TmpBuf3[j] = '\0'; fprintf(actout, "value=\"%s@%s\"><td>\n", TmpBuf3, Domain); } else { - /* take off newline */ - i = strlen(TmpBuf2); --i; TmpBuf2[i] = 0; fprintf(actout, "value=\"%s\"><td>\n", &TmpBuf2[1]); } } - fclose(fs); upperit(ActionUser); sprintf(TmpBuf, "%s/message", ActionUser); Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -d -r1.4 -r1.4.2.1 --- util.c 7 Jan 2004 15:36:26 -0000 1.4 +++ util.c 2 Feb 2004 00:39:47 -0000 1.4.2.1 @@ -115,14 +115,19 @@ struct stat buf; int i,j; + /* check for aliases and autoresponders */ + if ( valias_select (user, Domain)) return(-1); + + /* check for mailing list */ strcpy(TmpBuf, ".qmail-"); for(i=0,j=7;user[i]!=0;++i,++j){ if ( user[i] == '.' ) TmpBuf[j] = ':'; else TmpBuf[j] = user[i]; } TmpBuf[j] = 0; - if ( stat(TmpBuf, &buf) == 0 ) return(-1); + + /* check for POP/IMAP user */ if ( vauth_getpw(user, Domain)) return(-1); return(0); |
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14252 Modified Files: Makefile.am Makefile.in NEWS TODO aclocal.m4 configure mailinglist.c qmailadmin.c util.c Log Message: Remove the colortable because there isn't much hard coded HTML left, and it will be gone soon. Index: Makefile.am =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile.am 22 Jan 2004 04:43:12 -0000 1.12 +++ Makefile.am 1 Feb 2004 02:13:56 -0000 1.13 @@ -67,7 +67,6 @@ rm -rf $(DESTDIR)@htmllibdir@/html $(mkinstalldirs) $(DESTDIR)@htmllibdir@/html cp $(srcdir)/html/*.html $(DESTDIR)@htmllibdir@/html - cp $(srcdir)/html/colortable $(DESTDIR)@htmllibdir@/html chmod 755 $(DESTDIR)@htmllibdir@/html chmod 644 $(DESTDIR)@htmllibdir@/html/* rm -rf $(DESTDIR)@htmllibdir@/lang Index: Makefile.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/Makefile.in,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile.in 22 Jan 2004 04:43:12 -0000 1.17 +++ Makefile.in 1 Feb 2004 02:13:56 -0000 1.18 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.6.3 from Makefile.am. +# Makefile.in generated by automake 1.7.2 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 @@ -13,90 +13,132 @@ # PARTICULAR PURPOSE. @SET_MAKE@ -SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -sbindir = @sbindir@ -libexecdir = @libexecdir@ -datadir = @datadir@ -sysconfdir = @sysconfdir@ -sharedstatedir = @sharedstatedir@ -localstatedir = @localstatedir@ -libdir = @libdir@ -infodir = @infodir@ -mandir = @mandir@ -includedir = @includedir@ -oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . -ACLOCAL = @ACLOCAL@ -AUTOCONF = @AUTOCONF@ -AUTOMAKE = @AUTOMAKE@ -AUTOHEADER = @AUTOHEADER@ - am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c -INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) -transform = @program_transform_name@ +transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : -host_alias = @host_alias@ host_triplet = @host@ - -EXEEXT = @EXEEXT@ -OBJEXT = @OBJEXT@ -PATH_SEPARATOR = @PATH_SEPARATOR@ - -bindir = @cgibindir@ - -# -# Install qmailadmin setuid to @vpopuser@ -# -INSTALL_PROGRAM = ${INSTALL} -o @vpopuser@ -m 6755 -g @vpopgroup@ $(AM_INSTALL_PROGRAM_FLAGS) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ CGIBINTARGETS = @CGIBINTARGETS@ CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ + +DEFS = -I. @auth_incs@ DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +INSTALL_DATA = @INSTALL_DATA@ + +# +# Install qmailadmin setuid to @vpopuser@ +# +INSTALL_PROGRAM = ${INSTALL} -o @vpopuser@ -m 6755 -g @vpopgroup@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = ${INSTALL_PROGRAM} -s +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +OBJEXT = @OBJEXT@ PACKAGE = @QA_PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ QA_PACKAGE = @QA_PACKAGE@ QA_VERSION = @QA_VERSION@ RANLIB = @RANLIB@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ SPAM_COMMAND = @SPAM_COMMAND@ STRIP = @STRIP@ VERSION = @QA_VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__quote = @am__quote@ auth_incs = @auth_incs@ auth_libs = @auth_libs@ + +bindir = @cgibindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ cgibindir = @cgibindir@ +datadir = @datadir@ enable_help = @enable_help@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ htmldir = @htmldir@ htmllibdir = @htmllibdir@ imagedir = @imagedir@ imageurl = @imageurl@ +includedir = @includedir@ +infodir = @infodir@ install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ vpopgroup = @vpopgroup@ vpopmaildir = @vpopmaildir@ vpopuser = @vpopuser@ @@ -115,8 +157,6 @@ qmailadmin_SOURCES = $(COMMONSOURCES) qmailadmin_LDADD = @auth_libs@ - -DEFS = -I. @auth_incs@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs @@ -134,10 +174,8 @@ am_qmailadmin_OBJECTS = $(am__objects_1) qmailadmin_OBJECTS = $(am_qmailadmin_OBJECTS) qmailadmin_LDFLAGS = + DEFAULT_INCLUDES = -I. -I$(srcdir) -I. -CPPFLAGS = @CPPFLAGS@ -LDFLAGS = @LDFLAGS@ -LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/alias.Po ./$(DEPDIR)/auth.Po \ @@ -152,7 +190,6 @@ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CFLAGS = @CFLAGS@ DIST_SOURCES = $(qmailadmin_SOURCES) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS TODO aclocal.m4 config.guess config.h.in \ @@ -208,7 +245,7 @@ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ + $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done @@ -251,22 +288,34 @@ -rm -rf ./$(DEPDIR) .c.o: -@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ +@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: -@AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - $(COMPILE) -c `cygpath -w $<` -CCDEPMODE = @CCDEPMODE@ +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ +@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ +@am__fastdepCC_TRUE@ then mv "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ +@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ +@am__fastdepCC_TRUE@ fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: ETAGS = etags ETAGSFLAGS = +CTAGS = ctags +CTAGSFLAGS = + tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -292,13 +341,28 @@ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . @@ -310,12 +374,19 @@ && rm -fr $(distdir); }; } GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - @list='$(DISTFILES)'; for file in $$list; do \ + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ @@ -336,7 +407,7 @@ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="${top_distdir}" distdir="$(distdir)" \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ @@ -362,8 +433,9 @@ mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/=build \ - && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -371,23 +443,39 @@ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - find $$dc_install_base -type f -print ; \ - exit 1; } >&2 ) \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' +distuninstallcheck: + cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after distclean:" ; \ + || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am @@ -457,18 +545,27 @@ mostlyclean-am: mostlyclean-compile mostlyclean-generic +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + uninstall-am: uninstall-binPROGRAMS uninstall-info-am -.PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic dist dist-all dist-gzip distcheck distclean \ +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic ctags dist dist-all dist-gzip distcheck distclean \ distclean-compile distclean-depend distclean-generic \ - distclean-hdr distclean-tags distcleancheck distdir dvi dvi-am \ - info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-local install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic tags uninstall \ + distclean-hdr distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am \ + install-data-local install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am @@ -508,7 +605,6 @@ rm -rf $(DESTDIR)@htmllibdir@/html $(mkinstalldirs) $(DESTDIR)@htmllibdir@/html cp $(srcdir)/html/*.html $(DESTDIR)@htmllibdir@/html - cp $(srcdir)/html/colortable $(DESTDIR)@htmllibdir@/html chmod 755 $(DESTDIR)@htmllibdir@/html chmod 644 $(DESTDIR)@htmllibdir@/html/* rm -rf $(DESTDIR)@htmllibdir@/lang Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- NEWS 1 Feb 2004 01:01:45 -0000 1.7 +++ NEWS 1 Feb 2004 02:13:56 -0000 1.8 @@ -12,6 +12,17 @@ ################################################################# +Moving forward... + +Remove colortable. There is very little hard coded html left, +so there is no need to change its color. Hard coded html is +currently only in mailinglist, and that will be removed soon. + +Remove obsolete function build_list_value() from mailinglist.c. + + +################################################################# + The final (hopefully) update : Change the version in configure Index: TODO =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO 31 Jan 2004 11:08:00 -0000 1.2 +++ TODO 1 Feb 2004 02:13:56 -0000 1.3 @@ -12,12 +12,13 @@ Look through archives for other todo items, and add them to this list. -Verify we are actually using the latest build system, and that -all patches have been added. Check for patches between RC1 and -final, and verify they exist in new code. - Eliminate as many global variables as possible. +Remove the last HTML from the c program. It is only found in +mailinglist.c because of the double nested if in the program +logic. Need to find a way to eliminate the nesting, or allow +for it in ##t when it is upgraded. + Move session handling from time based to a MD5 hash of some random data. Move the session files into a single directory and store login credentials of the current user in the Index: aclocal.m4 =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/aclocal.m4,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- aclocal.m4 18 Jan 2004 16:41:14 -0000 1.5 +++ aclocal.m4 1 Feb 2004 02:13:56 -0000 1.6 @@ -1,6 +1,6 @@ -# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- +# generated automatically by aclocal 1.7.2 -*- Autoconf -*- -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -43,7 +43,7 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... -AC_PREREQ([2.52]) +AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. @@ -69,6 +69,16 @@ AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], @@ -86,9 +96,9 @@ # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal) +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) @@ -100,17 +110,29 @@ AC_REQUIRE([AC_PROG_MAKE_SET])dnl _AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_][CC], +[AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_][CC], - defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_][CXX], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_][CXX], - defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[_am_stamp_count=`expr ${_am_stamp_count-0} + 1` +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -131,14 +153,14 @@ # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"]) +AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.6.3])]) + [AM_AUTOMAKE_VERSION([1.7.2])]) # Helper functions for option handling. -*- Autoconf -*- @@ -518,7 +540,7 @@ if depmode=$depmode \ source=conftest.c object=conftest.o \ depfile=conftest.Po tmpdepfile=conftest.TPo \ - $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 && + $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 && grep conftest.h conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then am_cv_$1_dependencies_compiler_type=$depmode @@ -533,6 +555,9 @@ fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) @@ -652,7 +677,9 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*- +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -692,7 +719,7 @@ # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU @@ -752,7 +779,7 @@ fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional \"$1\" was never defined. + AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) @@ -779,62 +806,19 @@ # serial 6 -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. We must strip everything past the first ":", -# and everything past the last "/". - -# _AM_DIRNAME(PATH) -# ----------------- -# Like AS_DIRNAME, only do it during macro expansion -AC_DEFUN([_AM_DIRNAME], - [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1, - m4_if(regexp([$1], [^//\([^/]\|$\)]), -1, - m4_if(regexp([$1], [^/.*]), -1, - [.], - patsubst([$1], [^\(/\).*], [\1])), - patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])), - patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl -])# _AM_DIRNAME - - -# The stamp files are numbered to have different names. -# We could number them on a directory basis, but that's additional -# complications, let's have a unique counter. -m4_define([_AM_STAMP_Count], [0]) - - -# _AM_STAMP(HEADER) -# ----------------- -# The name of the stamp file for HEADER. -AC_DEFUN([_AM_STAMP], -[m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl -AS_ESCAPE(_AM_DIRNAME(patsubst([$1], - [:.*])))/stamp-h[]_AM_STAMP_Count]) - - -# _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS) -# ------------------------------------------------------------ -# We used to try to get a real timestamp in stamp-h. But the fear is that -# that will cause unnecessary cvs conflicts. -AC_DEFUN([_AM_CONFIG_HEADER], -[# Add the stamp file to the list of files AC keeps track of, -# along with our hook. -AC_CONFIG_HEADERS([$1], - [# update the timestamp -echo 'timestamp for $1' >"_AM_STAMP([$1])" -$2], - [$3]) -])# _AM_CONFIG_HEADER +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. -# AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS) -# -------------------------------------------------------------- -AC_DEFUN([AM_CONFIG_HEADER], -[AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])]) -])# AM_CONFIG_HEADER +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. -#serial 1 # This test replaces the one in autoconf. # Currently this macro should have the same name as the autoconf macro # because gettext's gettext.m4 (distributed in the automake package) Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- configure 1 Feb 2004 01:01:45 -0000 1.18 +++ configure 1 Feb 2004 02:13:56 -0000 1.19 @@ -1,19 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.53. +# Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. - -if expr a : '\(a\)' >/dev/null 2>&1; then [...2540 lines suppressed...] + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -6237,8 +6528,11 @@ # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. Index: mailinglist.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/mailinglist.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mailinglist.c 31 Jan 2004 11:08:00 -0000 1.8 +++ mailinglist.c 1 Feb 2004 02:13:56 -0000 1.9 @@ -652,7 +652,7 @@ fprintf(actout," <TR>\n"); fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(Buffer3), subuser_count); fprintf(actout," </TR>\n"); - fprintf(actout," <TR align=center bgcolor=%s>\n", get_color_text("002")); + fprintf(actout," <TR align=center bgcolor=\"#cccccc\">\n"); fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); @@ -932,18 +932,6 @@ show_mailing_lists(Username, Domain, Mytime); } -build_list_value(char *param, char *color, char *opt1, char *desc1, char *opt2, char *desc2, int checked) -{ - fprintf(actout, "<tr bgcolor=%s>\n", get_color_text(color)); - fprintf(actout, " <td>\n"); - fprintf(actout, " <input type=radio name=%s value=%s%s></td>\n", param, opt1, checked ? "" : " CHECKED"); - fprintf(actout, " <td>%s</td>\n", get_html_text(desc1)); - fprintf(actout, " <td>\n"); - fprintf(actout, " <input type=radio name=%s value=%s%s></td>\n", param, opt2, checked ? " CHECKED" : ""); - fprintf(actout, " <td>%s</td>\n", get_html_text(desc2)); - fprintf(actout, "</tr>\n"); -} - build_option_str (char *type, char *param, char *options, char *description) { int selected; Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- qmailadmin.c 31 Jan 2004 11:08:00 -0000 1.10 +++ qmailadmin.c 1 Feb 2004 02:13:56 -0000 1.11 @@ -107,7 +107,6 @@ /* not in qmailadminx.h */ FILE *lang_fs; -FILE *color_table; void del_id_files( char *); int create_session_file( char *ip_addr, char *domaindir); @@ -237,7 +236,6 @@ init_globals(); if( open_lang()) errors += 1; - if( open_colortable()) errors += 2; get_parms(); get_my_ip( ip_addr ); Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- util.c 1 Feb 2004 00:50:28 -0000 1.9 +++ util.c 1 Feb 2004 02:13:56 -0000 1.10 @@ -522,36 +522,6 @@ return(""); } -int open_colortable() -{ - static char tmpbuf[200]; - char *tmpstr; - - tmpstr = getenv(QMAILADMIN_TEMPLATEDIR); - if (tmpstr == NULL ) tmpstr = HTMLLIBDIR; - - snprintf(tmpbuf, sizeof(tmpbuf), "%s/html/colortable", tmpstr); - if ( (color_table=fopen(tmpbuf, "r"))==NULL) return(-1); - return(0); -} - -char *get_color_text( char *index ) -{ - static char tmpbuf[400]; - char *tmpstr; - - if (color_table == NULL) return(""); - - rewind(color_table); - while(fgets(tmpbuf,sizeof(tmpbuf),color_table)!=NULL){ - tmpstr = strtok(tmpbuf, " "); - if (strcmp(tmpstr, index) == 0 ) { - tmpstr = strtok(NULL, "\n"); - return(tmpstr); - } - } - return(""); -} /* bk - use maildir++ quotas now char *get_quota_used(char *dir) { char *tmpstr; |
From: <rw...@pr...> - 2004-02-01 02:15:55
|
Update of /cvsroot/qmailadmin/qmailadmin/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14252/html Modified Files: header.html Removed Files: colortable Log Message: Remove the colortable because there isn't much hard coded HTML left, and it will be gone soon. Index: header.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/header.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- header.html 30 Jan 2004 06:45:08 -0000 1.4 +++ header.html 1 Feb 2004 02:13:56 -0000 1.5 @@ -21,13 +21,11 @@ <BR><BR> -<A Href="http://www.developersdesk.com/">Home Page</a><BR> -<A Href=""></a><BR> -<A Href="http://robinton.developersdesk.com/">Email Management</a><BR> -<A Href="/subscribe/">Mailing Lists</a><BR> -<A Href="http://robinton.developersdesk.com/cgi-bin/qmailadmin/?user=postmaster&dom=developersdesk.com">Administration</a><BR> -<A Href="http://robinton.developersdesk.com/mailadmin/index.php">My Admin</a><BR> -<A Href="/cgi-bin/sqwebmail/">Webmail</a><BR> +<A Href="http://qmailadmin.sf.net/">Home Page</a><BR> +</a><BR> +<A Href="/cgi-bin/qmailadmin/?user=postmaster&dom=test.com">QmailAdmin</a><BR> +<BR><BR><BR><BR> +NOTE: change this in html/header.html </TD><TD width=5% bgcolor="#C0C000"> --- colortable DELETED --- |
From: <rw...@pr...> - 2004-02-01 01:03:33
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17902 Modified Files: NEWS configure configure.in Log Message: Change the version number in configure.in and configure to 1.3.0. Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- NEWS 1 Feb 2004 00:50:28 -0000 1.6 +++ NEWS 1 Feb 2004 01:01:45 -0000 1.7 @@ -14,6 +14,13 @@ The final (hopefully) update : +Change the version in configure + + +################################################################# + +The final (hopefully) update : + Copy the build system from 1.2.0 final. Identify all changes from PRE-1 to FINAL and make sure they are Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- configure 1 Feb 2004 00:50:28 -0000 1.17 +++ configure 1 Feb 2004 01:01:45 -0000 1.18 @@ -1658,7 +1658,7 @@ QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1-pre1" +QA_VERSION="1.3.0" cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- configure.in 1 Feb 2004 00:50:28 -0000 1.16 +++ configure.in 1 Feb 2004 01:01:45 -0000 1.17 @@ -6,7 +6,7 @@ AC_CANONICAL_HOST QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.1-pre1" +QA_VERSION="1.3.0" AC_DEFINE_UNQUOTED(QA_PACKAGE,"$QA_PACKAGE","") AC_DEFINE_UNQUOTED(QA_VERSION,"$QA_VERSION","") |
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8822 Modified Files: ChangeLog INSTALL NEWS auth.c autorespond.c configure configure.in user.c util.c Log Message: Final update of batch. Verify all patches are intact. See NEWS and TODO\! Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ChangeLog 29 Jan 2004 05:18:22 -0000 1.15 +++ ChangeLog 1 Feb 2004 00:50:28 -0000 1.16 @@ -1,6 +1,11 @@ Numbers in square brackets ([]) indicate tracker item on SourceForge with patch or information related to the entry. +1.2.1-pre1 - unreleased + + Tom Collins + - Add note to INSTALL about requiring vpopmail 5.4.0 or later. + 1.2.0 - released 28-Jan-04 Tom Collins Index: INSTALL =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/INSTALL,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- INSTALL 24 Jan 2004 15:55:16 -0000 1.5 +++ INSTALL 1 Feb 2004 00:50:28 -0000 1.6 @@ -1,5 +1,7 @@ Install guide +QmailAdmin 1.2.0 and later requires Vpopmail 5.4.0 or later. + Please note that any time you reconfigure and install vpopmail you will need to rebuild and install QmailAdmin. QmailAdmin statically links libvpopmail, so you need to recompile it Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- NEWS 31 Jan 2004 11:08:00 -0000 1.5 +++ NEWS 1 Feb 2004 00:50:28 -0000 1.6 @@ -1,7 +1,9 @@ See CHANGELOG -NOTE: QmailAdmin 1.3.0 may not run properly... I still have -more changes to add! +NOTE: QmailAdmin ~should~ still run like it used to before I +made all these changes, but it has not been tested extensivly. +I see no need to worry about that now as the rip and tear is +not over, as you can see in TODO. The following information relates to a large block of changes that Rick Widmer added right before the final release of 1.2.0. @@ -10,6 +12,44 @@ ################################################################# +The final (hopefully) update : + +Copy the build system from 1.2.0 final. + +Identify all changes from PRE-1 to FINAL and make sure they are +all in 1.3.0. + + alias.c + Delete duplicated #include <unistd.h> + Delete invalid fclose about line 117 + + auth.c + Check HAS_PW_FLAGS about line 155 + + autorespond.c + strreplace(addr, ':', '.') about line 89 + + qmailadmin.c + undef PACKAGE_* + + template.c + undef PACKAGE_* + add comment to ##z + make value static in get_session_val + + user.c + undef PACKAGE_* + substantial changes to update_user_info + + util.c + add warning about memory leak in get_html_text() + make tmpbuf static in get_color_text + make tmpbuf static in get_quota_used + + + +################################################################# + Changes from 040116 : Replace vclose(); exit(0); with return() so everything returns Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- auth.c 31 Jan 2004 11:08:00 -0000 1.6 +++ auth.c 1 Feb 2004 00:50:28 -0000 1.7 @@ -40,7 +40,11 @@ if ( strlen(Domain) > 0 ) { if ( strcmp(Username,"postmaster")==0 ) { AdminType = DOMAIN_ADMIN; +#ifdef VQPASSWD_HAS_PW_FLAGS + } else if ( vpw->pw_flags & QA_ADMIN ) { +#else } else if ( vpw->pw_gid & QA_ADMIN ) { +#endif AdminType = DOMAIN_ADMIN; } else { AdminType = USER_ADMIN; Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- autorespond.c 31 Jan 2004 11:08:00 -0000 1.7 +++ autorespond.c 1 Feb 2004 00:50:28 -0000 1.8 @@ -89,7 +89,7 @@ sort_dosort(); for (i = 0; addr = sort_get_entry(i); ++i) { - for(i=0;addr[i]!=0;++i) if ( addr[i] == ':' ) addr[i] = '.'; + str_replace(addr, ':', '.'); qmail_button(uBufA, "delautorespond", addr, "delete.png" ); qmail_button(uBufB, "modautorespond", addr, "modify.png" ); Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- configure 30 Jan 2004 08:30:58 -0000 1.16 +++ configure 1 Feb 2004 00:50:28 -0000 1.17 @@ -1658,7 +1658,7 @@ QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.0" +QA_VERSION="1.2.1-pre1" cat >>confdefs.h <<_ACEOF Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure.in 24 Jan 2004 15:56:51 -0000 1.15 +++ configure.in 1 Feb 2004 00:50:28 -0000 1.16 @@ -6,7 +6,7 @@ AC_CANONICAL_HOST QA_PACKAGE="qmailadmin" -QA_VERSION="1.2.0" +QA_VERSION="1.2.1-pre1" AC_DEFINE_UNQUOTED(QA_PACKAGE,"$QA_PACKAGE","") AC_DEFINE_UNQUOTED(QA_VERSION,"$QA_VERSION","") Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- user.c 31 Jan 2004 11:08:00 -0000 1.14 +++ user.c 1 Feb 2004 00:50:28 -0000 1.15 @@ -352,43 +352,22 @@ #endif (mypw = vauth_getpw( Newu, Domain )) != NULL ) { - /* from the load_limits() function, set user flags */ - /* These aren't default limits, they're domain limits. - They should not be applied to new accounts. - if( DisablePOP > 0 ) mypw->pw_gid |= NO_POP; - if( DisableIMAP > 0 ) mypw->pw_gid |= NO_IMAP; - if( DisableDialup > 0 ) mypw->pw_gid |= NO_DIALUP; - if( DisablePasswordChanging > 0 ) mypw->pw_gid |= NO_PASSWD_CHNG; - if( DisableWebmail > 0 ) mypw->pw_gid |= NO_WEBMAIL; - if( DisableRelay > 0 ) mypw->pw_gid |= NO_RELAY; - */ - - /* Once we're sure people are using vpopmail 5.3.29 or later, - * we can switch back to old code (that only sets quota if - * there's something in the field). + /* vadduser() in vpopmail 5.3.29 and later sets the default + * quota, so we only need to change it if the user enters + * something in the Quota field. */ - if (Limits.defaultquota > 0) { - if (Limits.defaultmaxmsgcount > 0) - snprintf(pw_shell, sizeof(pw_shell), "%dS,%dC", Limits.defaultquota, Limits.defaultmaxmsgcount); - else - snprintf(pw_shell, sizeof(pw_shell), "%dS", Limits.defaultquota); - } else { - strcpy(pw_shell, "NOQUOTA"); - } - // Code added by jhopper #ifdef MODIFY_QUOTA if (strcmp (Quota, "NOQUOTA") == 0) { - strcpy (pw_shell, "NOQUOTA"); + vsetuserquota (Newu, Domain, "NOQUOTA"); } else if ( Quota[0] != 0 ) { if(quota_to_bytes(qconvert, Quota)) { sprintf(StatusMessage, get_html_text("314")); } else { - strcpy (pw_shell, qconvert); + vsetuserquota (Newu, Domain, qconvert); } } #endif - mypw->pw_shell = pw_shell; #ifdef MODIFY_SPAM GetValue(TmpCGI, spamvalue, "spamcheck=", sizeof(spamvalue)); @@ -400,24 +379,13 @@ } #endif - /* update the user information */ - if ( vauth_setpw( mypw, Domain ) != VA_SUCCESS ) { - - /* report error */ - sprintf(StatusMessage, "%s %s@%s (%s) %s", - get_html_text("002"), Newu, Domain, Gecos, - get_html_text("120")); - - } else { - - /* report success */ - sprintf(StatusMessage, "%s %s@%s (%s) %s", - get_html_text("002"), Newu, Domain, Gecos, - get_html_text("119")); - } + /* report success */ + sprintf(StatusMessage, "%s %s@%s (%s) %s", + get_html_text("002"), Newu, Domain, Gecos, + get_html_text("119")); - /* otherwise, report error */ } else { + /* otherwise, report error */ sprintf(StatusMessage, "<font color=\"red\">%s %s@%s (%s) %s</font>", get_html_text("002"), Newu, Domain, Gecos, get_html_text("120")); } Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- util.c 31 Jan 2004 11:08:00 -0000 1.8 +++ util.c 1 Feb 2004 00:50:28 -0000 1.9 @@ -499,6 +499,9 @@ } } +/* It's a good thing qmailadmin is a cgi script, because this + function leaks memory. That's OK though, Tom has plans + for rewriting the html_text stuff soon. */ char *get_html_text( char *index ) { static char *tmpbuf; |
From: <rw...@pr...> - 2004-01-31 23:20:21
|
Update of /cvsroot/qmailadmin/qmailadmin/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23957/html Modified Files: header.html show_mailinglist_line.html show_users.html Log Message: Batch 2 of Ricks changes. See NEWS for details. Index: header.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/header.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- header.html 30 Jan 2004 03:27:01 -0000 1.3 +++ header.html 30 Jan 2004 06:45:08 -0000 1.4 @@ -23,10 +23,10 @@ <A Href="http://www.developersdesk.com/">Home Page</a><BR> <A Href=""></a><BR> -<A Href="http://piemur.developersdesk.com/">Email Management</a><BR> +<A Href="http://robinton.developersdesk.com/">Email Management</a><BR> <A Href="/subscribe/">Mailing Lists</a><BR> -<A Href="http://piemur.developersdesk.com/cgi-bin/qmailadmin/?user=postmaster&dom=developersdesk.com">Administration</a><BR> -<A Href="http://piemur.developersdesk.com/mailadmin/index.php">My Admin</a><BR> +<A Href="http://robinton.developersdesk.com/cgi-bin/qmailadmin/?user=postmaster&dom=developersdesk.com">Administration</a><BR> +<A Href="http://robinton.developersdesk.com/mailadmin/index.php">My Admin</a><BR> <A Href="/cgi-bin/sqwebmail/">Webmail</a><BR> </TD><TD width=5% bgcolor="#C0C000"> Index: show_mailinglist_line.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_mailinglist_line.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- show_mailinglist_line.html 30 Jan 2004 03:27:01 -0000 1.1 +++ show_mailinglist_line.html 30 Jan 2004 06:45:08 -0000 1.2 @@ -2,14 +2,14 @@ <TD>##uA</TD> <TD>##uB</TD> <TD>##uC</TD> - <TD>##uD</TD> - <TD>##uE</TD> - <TD>##uF</TD> - <TD>##uG</TD> - <TD>##uH</TD> - <TD>##uI</TD> - <TD>##uJ</TD> - <TD>##uK</TD> - <TD>##uL</TD> + <TD align=center>##uD</TD> + <TD align=center>##uE</TD> + <TD align=center>##uF</TD> + <TD align=center>##uG</TD> + <TD align=center>##uH</TD> + <TD align=center>##uI</TD> + <TD align=center>##uJ</TD> + <TD align=center>##uK</TD> + <TD align=center>##uL</TD> </TR> Index: show_users.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_users.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- show_users.html 30 Jan 2004 03:27:01 -0000 1.2 +++ show_users.html 30 Jan 2004 06:45:08 -0000 1.3 @@ -81,7 +81,7 @@ <input type="hidden" name="user" value="##U"> <input type="hidden" name="dom" value="##D"> <input type="hidden" name="time" value="##T"> - <input type="text" name="searchuser" value="%s"> + <input type="text" name="searchuser" value="##A"> <input type="submit" value="##X204"> </form> <hr> @@ -91,24 +91,24 @@ <tr bgcolor=%s> <td colspan="%i" align="right"> <font size="2"><b>[ - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&page=%d">##X135</a> + <a href="##C/com/showusers?##W">##X135</a> |  - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&page=%s">##X136</a> + <a href="##C/com/showusers?##W">##X136</a> |  - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&page=%d">##X137</a> + <a href="##C/com/showusers?##W">##X137</a> ]<BR>[  - <a href="##C/com/deleteall?user=##U&dom=##D&time=##T&page=%d">##X235</a> + <a href="##C/com/deleteall?##W">##X235</a> |  - <a href="##C/com/bounceall?user=##U&dom=##D&time=##T&page=%d">##X134</a> + <a href="##C/com/bounceall?##W">##X134</a> |  - <a href="##C/com/setremotecatchall?user=##U&dom=##D&time=##T&page=%d">##X206</a> + <a href="##C/com/setremotecatchall?##W">##X206</a> ] </TD> </TR> @@ -117,9 +117,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/adduser?user=##U&time=##T&dom=##D">##X067</a> + <a href="##C/com/adduser?##W">##X067</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] |
From: <rw...@pr...> - 2004-01-31 19:10:52
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23957 Modified Files: NEWS alias.c autorespond.c command.c forward.c qmailadmin.c util.c Log Message: Batch 2 of Ricks changes. See NEWS for details. Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- NEWS 30 Jan 2004 03:28:19 -0000 1.2 +++ NEWS 30 Jan 2004 06:45:08 -0000 1.3 @@ -11,6 +11,26 @@ ################################################################# +Changes from 040108 : + +Remove show_aliases from alias.c. (obsolete) + +Clear the buffer in show_dotqmail_lines. + +Remove showaliases and showcouts from command.c. (obsolete) + +Remove /open/ case from qmailadmin.c. (obsolete) + +Remove ##r from template.c. + +Remove some debug from util.c. + +Make check for mailing lists more specific in count_stuff +function of util.c. + + +################################################################# + Changes from 040107 : Move all use of global TmpBuf* to function local Buffer*. Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- alias.c 30 Jan 2004 03:28:19 -0000 1.5 +++ alias.c 30 Jan 2004 06:45:08 -0000 1.6 @@ -36,17 +36,6 @@ int (*select)(struct dirent *), int (*compar)(const void *, const void *)); -int show_aliases(void) -{ - if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage, "%s", get_html_text("142")); - vclose(); - exit(0); - } - send_template("show_alias.html"); - return 0; -} - int qa_sort(const void * a, const void * b) { return strcasecmp ((*(const struct dirent **) a)->d_name, @@ -149,6 +138,7 @@ stop = 1; } while (!stop) { + strcpy(Buffer, ""); alias_name_from_command = dotqmail_alias_command(TmpBuf2); Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- autorespond.c 30 Jan 2004 03:28:19 -0000 1.4 +++ autorespond.c 30 Jan 2004 06:45:08 -0000 1.5 @@ -83,11 +83,14 @@ } } } + closedir(mydir); sort_dosort(); for (i = 0; addr = sort_get_entry(i); ++i) { - qmail_button(uBufA, "delautorespond", addr, "Buffer.png" ); + for(i=0;addr[i]!=0;++i) if ( addr[i] == ':' ) addr[i] = '.'; + + qmail_button(uBufA, "delautorespond", addr, "delete.png" ); qmail_button(uBufB, "modautorespond", addr, "modify.png" ); sprintf(uBufC, "%s@%s", addr, Domain); send_template_now("show_autorespond_line.html"); Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- command.c 30 Jan 2004 03:28:19 -0000 1.3 +++ command.c 30 Jan 2004 06:45:08 -0000 1.4 @@ -45,10 +45,6 @@ GetValue(TmpCGI, SearchUser, "searchuser=", sizeof(SearchUser)); show_users(Username, Domain, Mytime, TmpBuf2); - } else if (strcmp(TmpBuf2, "showaliases") == 0) { - GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - show_aliases(Username, Domain, Mytime, TmpBuf2); - } else if (strcmp(TmpBuf2, "showforwards") == 0) { GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); show_forwards(Username, Domain, Mytime, TmpBuf2); @@ -256,9 +252,6 @@ sprintf(TmpBuf, "%s/%s/Maildir", RealDir, Username ); del_id_files(TmpBuf); show_login(); - - } else if (strcmp(TmpBuf2, "showcounts") == 0 ) { - show_counts(); } vclose(); Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- forward.c 30 Jan 2004 03:28:19 -0000 1.3 +++ forward.c 30 Jan 2004 06:45:08 -0000 1.4 @@ -35,8 +35,9 @@ int show_forwards(char *user, char *dom, time_t mytime, char *dir) { + if (AdminType != DOMAIN_ADMIN) { - sprintf(StatusMessage,"%s", get_html_text("142")); + fprintf(stderr,"%s", get_html_text("142")); vclose(); exit(0); } Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- qmailadmin.c 30 Jan 2004 03:28:19 -0000 1.7 +++ qmailadmin.c 30 Jan 2004 06:45:08 -0000 1.8 @@ -187,34 +187,6 @@ process_commands(); fprintf( stderr, "in main after process_commands\n" ); - } else if (pi && strncmp(pi, "/open/", 6) == 0) { - fprintf( stderr, "\nMystery if case #2\n" ); - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - for(j=0,i=6;pi[i]!=0&&j<99;++i,++j) TmpBuf2[j] = pi[i]; - rm = getenv("REQUEST_METHOD"); - rm = (rm == NULL ? "" : strdup(rm)); - - if ( strncmp(rm , "POST", 4) == 0 ) { - get_cgi(); - } else { - TmpCGI = getenv("QUERY_STRING"); - TmpCGI = (TmpCGI == NULL ? "" : strdup(TmpCGI)); - } - - GetValue(TmpCGI, Username, "user=", sizeof(Username)); - GetValue(TmpCGI, Domain, "dom=", sizeof(Domain)); - GetValue(TmpCGI, Time, "time=", sizeof(Time)); - Mytime = atoi(Time); - - vget_assign(Domain,RealDir,sizeof(RealDir),&Uid,&Gid); - if ( geteuid() == 0 ) { - if ( setgid(Gid) != 0 ) perror("setgid"); - if ( setuid(Uid) != 0 ) perror("setuid"); - } - vclose(); - exit(0); - - } else { char *rm; struct vqpasswd *pw; Index: util.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/util.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- util.c 30 Jan 2004 03:28:19 -0000 1.5 +++ util.c 30 Jan 2004 06:45:08 -0000 1.6 @@ -57,8 +57,6 @@ struct vqpasswd *pw; - fprintf( stderr, "Count Stuff\n" ); - /* Count the Pop Accounts */ pw = vauth_getall(Domain,1,0); while(pw!=NULL){ @@ -66,8 +64,6 @@ pw = vauth_getall(Domain,0,0); } - fprintf( stderr, "Count Stuff after count pop %d\n", CurPopAccounts ); - /* Get limits data from vpopmail */ vget_limits(Domain, &Limits); MaxPopAccounts = Limits.maxpopaccounts; @@ -83,8 +79,6 @@ DisableWebmail = Limits.disable_webmail; DisableRelay = Limits.disable_relay; - fprintf( stderr, "Count Stuff after set limits\n" ); - /* scan the domain directory for .qmail files */ if ( (mydir = opendir(".")) == NULL ) { /* If we can't open the domain directory */ @@ -97,23 +91,20 @@ /* Scan the directory for .qmail files */ while ((mydirent=readdir(mydir)) != NULL) { - fprintf(stderr,"Checking: %s\n", mydirent->d_name); - if ( strncmp(".qmail-", mydirent->d_name, 7) != 0 ) { /* It is not a .qmail file */ - fprintf(stderr,"not .qmail file\n"); continue; } if (!lstat(mydirent->d_name, &mystat) && S_ISLNK(mystat.st_mode)) { /* It is a symlink, probably a mailing list */ - if ( strncmp("-owner", mydirent->d_name, 7) != 0 ) { + if ( strstr(mydirent->d_name, "-owner") != 0 && + strstr(mydirent->d_name, "-digest-owner") == 0 ) { /* If we only count the -owner link, the count */ /* should come out right. */ ++CurMailingLists; } - fprintf(stderr,"mail list file\n"); continue; } @@ -128,15 +119,12 @@ /* Decide what kind of account it is */ if (*Buffer == '#') { - fprintf(stderr,"Blackhole\n"); CurBlackholes++; } else if ( strstr( Buffer, "autorespond") != 0 ) { - fprintf(stderr,"Autoresponder\n"); CurAutoResponders++; } else if (*Buffer != '|' ) { - fprintf(stderr,"Forward\n"); CurForwards++; } @@ -147,19 +135,15 @@ closedir(mydir); /* Get the default catchall box name */ - fprintf( stderr, "This is a test\n" ); if ((fs=fopen(".qmail-default","r")) == NULL) { /* report error opening .qmail-default and exit */ fprintf( stderr, "show_user_lines can't open default file\n" ); sprintf( CurCatchall, "Can't open .qmail-default file" ); - } else { fgets( Buffer, sizeof(Buffer), fs); fclose(fs); - fprintf( stderr, ".qmail-default: %s\n", Buffer); - if (strstr(Buffer, " bounce-no-mailbox\n") != NULL) { sprintf(CurCatchall,"%s", get_html_text("130")); @@ -183,10 +167,6 @@ for(j=0,++i;Buffer[i]!=0;++j,++i) CurCatchall[j] = Buffer[i]; CurCatchall[j]=0; } - - fprintf( stderr, "CurCatchall: %s\n", CurCatchall); - - return 0; } fprintf( stderr, "Blackholes: %d Lists; %d Robots: %d Forwards: %d Users %d Catchall: %s\n", CurBlackholes, CurMailingLists, CurAutoResponders, CurForwards, CurPopAccounts, CurCatchall); |
From: <rw...@pr...> - 2004-01-31 11:09:43
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27962 Modified Files: NEWS TODO alias.c auth.c autorespond.c command.c forward.c limits.c mailinglist.c qmailadmin.c qmailadmin.h qmailadminx.h show.c template.c user.c util.c Log Message: Last of Rick's big block of changes. See NEWS and TODO for details. Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NEWS 30 Jan 2004 08:30:58 -0000 1.4 +++ NEWS 31 Jan 2004 11:08:00 -0000 1.5 @@ -8,6 +8,36 @@ I built up a large number of changes and will commit them in batches, in the same order they were created. +################################################################# + +Changes from 040116 : + +Replace vclose(); exit(0); with return() so everything returns +to the caller and passes back a status value. DO NOT exit before +painting the footer.html file. The return value is often the +index into the lang/ file to retrieve the status message. + +Changes to the auth code, including moving session file handling +from qmailadmin.c to auth.c. + +Move the GetValues from command.c to qmailadmin.c so they are +only done once. + +Change ADMIN type values so they can be used with < and > rather +than checking == or != on each. + +Move processing header.html and footer.html to qmailadmin.c +instead of having send_template() and send_template_now(). +Remove send_template, rename send_template_now to send_template, +and change all calls to send_template_now() to send_template(). +Remember... we ALWAYS return on failure, and header.html and +footer.html will ALWAYS be processed. + + + + + + ################################################################# Index: TODO =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/TODO,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- TODO 10 Sep 2003 21:38:41 -0000 1.1.1.1 +++ TODO 31 Jan 2004 11:08:00 -0000 1.2 @@ -1,3 +1,70 @@ +*************************************************** +*************************************************** + +Rick's todo list: + +Add jump to first field javascript to templates. + +TMDA checkbox. + +CSS support in templates. + +Look through archives for other todo items, and add them +to this list. + +Verify we are actually using the latest build system, and that +all patches have been added. Check for patches between RC1 and +final, and verify they exist in new code. + +Eliminate as many global variables as possible. + +Move session handling from time based to a MD5 hash of some +random data. Move the session files into a single directory +and store login credentials of the current user in the +session file. + +Restructure form handling so each edit page uses the following +structure, and put it in its own file named for the .html file +it displays, and the menu choice that calls it. + +-------------------------------------------------------------- + +if( button not clicked ) { + + Get data from mail system + Set 'error' - + +} else { + + Get data from form // GetValue()s + + Check for errors +} + + +if( no errors ) { + + update mail system + send Location: header to next screen + +} else { + + Paint template + +} + + +-------------------------------------------------------------- + +Consider list instead of menu on first page. + + + +*************************************************** +*************************************************** + +Original TODO list follows + * Convert Alias/Forward code to use valias functions Heather L Sherman <he...@id...> Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- alias.c 30 Jan 2004 08:30:58 -0000 1.7 +++ alias.c 31 Jan 2004 11:08:00 -0000 1.8 @@ -61,9 +61,7 @@ struct dirent **namelist; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if (atoi(Pagenumber)==0) { @@ -76,7 +74,7 @@ if ( (mydir = opendir(".")) == NULL ) { strcpy(uBufA, "4"); sprintf(uBufB, "%s %d", get_html_text("143"), 1); - send_template_now("show_error_line.html"); + send_template("show_error_line.html"); return(0); } @@ -105,7 +103,7 @@ if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { strcpy(uBufA, "4"); sprintf(uBufB, "SDQL %s %s", get_html_text("144"), mydirent->d_name); - send_template_now("show_error_line.html"); + send_template("show_error_line.html"); continue; } for(i=7,j=0;j<MAX_FILE_NAME-1&&mydirent->d_name[i]!=0;++i,++j) { @@ -184,7 +182,7 @@ } strcpy(uBufD, Buffer1); strcpy(Buffer1, ""); - send_template_now("show_forwards_line.html"); + send_template("show_forwards_line.html"); } fclose(fs); k++; @@ -215,9 +213,7 @@ int l,j; if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } l = strlen(user); @@ -281,10 +277,7 @@ } if ( (fs=fopen(dot_file,"r"))==NULL) { - sprintf(StatusMessage,"%s %s<br>\n", get_html_text("144"), - dot_file); - vclose(); - exit(0); + return(144); } j=0; @@ -304,79 +297,67 @@ -void moddotqmail() +int moddotqmail() { if ( AdminType!=DOMAIN_ADMIN ) { - sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template("mod_dotqmail.html"); } -void moddotqmailnow() +int moddotqmailnow() { struct vqpasswd *pw; if ( strcmp(ActionUser,"default")==0) { - sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if (strcmp(Action,"delentry")==0) { if (onevalidonly(ActionUser) ) { sprintf(StatusMessage, "%s\n", get_html_text("149")); moddotqmail(); - vclose(); - exit(0); + return(0); } if (dotqmail_del_line(ActionUser,LineData) ) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 1); moddotqmail(); - vclose(); - exit(0); + return(150); } sprintf(StatusMessage, "%s\n", get_html_text("151") ); moddotqmail(); - vclose(); - exit(0); + return(151); } else if (strcmp(Action,"add")==0) { if( adddotqmail_shared(ActionUser, Newu, 0)) { moddotqmail(); - vclose(); - exit(0); + return(0); } else { sprintf(StatusMessage,"%s %s\n", get_html_text("152"), Newu); moddotqmail(); - vclose(); - exit(0); + return(0); } } else { sprintf(StatusMessage, "%s\n", get_html_text("155")); - vclose(); - exit(0); + return(0); } } -adddotqmail() +int adddotqmail() { if ( MaxForwards != -1 && CurForwards >= MaxForwards ) { - sprintf(StatusMessage, "%s %d\n", - get_html_text("157"), MaxForwards); + sprintf(StatusMessage, "%s %d\n", get_html_text("157"), MaxForwards); show_menu(); - vclose(); - exit(0); + return(157); } send_template( "add_forward.html" ); } -adddotqmailnow() +int adddotqmailnow() { char Buffer[MAX_BUFF]; struct vqpasswd *pw; @@ -384,23 +365,20 @@ if (AdminType!=DOMAIN_ADMIN && !(AdminType==USER_ADMIN && strcmp(ActionUser, Username)==0)) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( MaxForwards != -1 && CurForwards >= MaxForwards ) { sprintf(StatusMessage, "%s %d\n", get_html_text("157"), MaxForwards); send_template( "add_forward.html" ); - vclose(); - exit(0); + return(0); } if (adddotqmail_shared(Alias, ActionUser, -1)) { adddotqmail(); - vclose(); - exit(0); + return(0); } else { sprintf(StatusMessage, "%s\n", get_html_text("152")); @@ -458,27 +436,25 @@ return(0); } -deldotqmail() +int deldotqmail() { if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template( "del_forward_confirm.html" ); } -deldotqmailnow() +int deldotqmailnow() { if (AdminType!=DOMAIN_ADMIN && !(AdminType==USER_ADMIN && !strcmp(ActionUser, Username))) { sprintf(StatusMessage,"%s", get_html_text("142")); show_menu(Username, Domain, Mytime); - vclose(); - exit(0); + return(142); } @@ -486,8 +462,7 @@ if (fixup_local_name(ActionUser)) { sprintf(StatusMessage,"%s %s\n", get_html_text("160"), Alias); deldotqmail(); - vclose(); - exit(0); + return(160); } if (!(dotqmail_delete_files(ActionUser))) { Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- auth.c 30 Jan 2004 08:30:58 -0000 1.5 +++ auth.c 31 Jan 2004 11:08:00 -0000 1.6 @@ -31,138 +31,141 @@ #include <vpopmail.h> #include <vauth.h> -extern char *crypt(); - -auth_system(ip_addr, pw) - char *ip_addr; - struct vqpasswd *pw; +set_admin_type() { - FILE *fs; - time_t time1; - time_t time2; - char ip_value[MAX_BUFF]; - char Buffer1[MAX_BUFF]; - char Buffer2[MAX_BUFF]; - - if( chdir(RealDir) < 0 ){ - sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir); - show_login(); - vclose(); - exit(0); + struct vqpasswd *vpw=NULL; + + vpw = vauth_getpw(Username, Domain); + AdminType = NO_ADMIN; + if ( strlen(Domain) > 0 ) { + if ( strcmp(Username,"postmaster")==0 ) { + AdminType = DOMAIN_ADMIN; + } else if ( vpw->pw_gid & QA_ADMIN ) { + AdminType = DOMAIN_ADMIN; + } else { + AdminType = USER_ADMIN; + } } +} - sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); +void del_id_files( char *dirname ) +{ + DIR *mydir; + struct dirent *mydirent; + struct stat statbuf; + char DirName[MAX_BIG_BUFF]; + char FileName[MAX_BIG_BUFF]; - fs = fopen(Buffer1, "r"); - if ( fs == NULL ) { - sprintf(StatusMessage, "%s\n", get_html_text("172")); - show_login(); - vclose(); - exit(0); - } + sprintf(DirName, "%s/Maildir", dirname); - if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 4); - vclose(); - exit(0); + mydir = opendir(DirName); + if ( mydir == NULL ) return; + + while((mydirent=readdir(mydir))!=NULL){ + if ( strstr(mydirent->d_name,".qw")!=0 ) { + sprintf(FileName, "%s/%s", DirName, mydirent->d_name); + unlink(FileName); + } } - fclose(fs); + closedir(mydir); +} +int create_session_file( char *ip_addr, char *domaindir) +{ + FILE *fs; + char Buffer[MAX_BIG_BUFF]; + char returnhttp[MAX_BUFF]; + char returntext[MAX_BUFF]; + struct vqpasswd *vpw=NULL; -#ifdef IPAUTH - GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); - if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(Buffer1); - sprintf(StatusMessage,"invalid\n"); - show_login(); - vclose(); - exit(0); + del_id_files( domaindir ); + + memset(Buffer, 0, sizeof(Buffer)); + + Mytime = time(NULL); + sprintf(Buffer, "%s/Maildir/%d.qw", domaindir, Mytime); + fs = fopen(Buffer, "w"); + if ( fs == NULL ) { + fprintf(actout,"MAIN %s %s\n", get_html_text("144"), Buffer); + fprintf(stderr,"MAIN %s %s\n", get_html_text("144"), Buffer); + return(1); } -#endif - time1 = atoi(Time); time2 = time(NULL); - if ( time2 > time1 + 7200 ) { - unlink(Buffer1); - sprintf(StatusMessage, "%s\n", get_html_text("173")); - show_login(); - vclose(); - exit(0); + vpw = vauth_getpw(Username, Domain); + AdminType = NO_ADMIN; + if ( strlen(Domain) > 0 ) { + if ( strcmp(Username,"postmaster")==0 ) { + AdminType = DOMAIN_ADMIN; + } else if ( vpw->pw_gid & QA_ADMIN ) { + AdminType = DOMAIN_ADMIN; + } else { + AdminType = USER_ADMIN; + } } + memset(Buffer, 0, sizeof(Buffer)); + + /* set session vars */ + GetValue(TmpCGI, returntext, "returntext=", sizeof(returntext)); + GetValue(TmpCGI, returnhttp, "returnhttp=", sizeof(returnhttp)); + sprintf(Buffer, + "ip_addr=%s&returntext=%s&returnhttp=%s&admintype=%d\n", + ip_addr, returntext, returnhttp, AdminType); + fputs(Buffer,fs); + fclose(fs); + return(0); } -auth_user_domain(ip_addr,pw) +int get_session_data( Username, Domain, ip_addr) + char *Username; + char *Domain; char *ip_addr; - struct vqpasswd *pw; { FILE *fs; time_t time1; time_t time2; char ip_value[MAX_BUFF]; - char Buffer1[MAX_BUFF]; + char FileName[MAX_BUFF]; char Buffer2[MAX_BUFF]; + struct vqpasswd *pw; + + pw = vauth_getpw( Username, Domain ); if ( chdir(RealDir) < 0 ) { - sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir ); - show_login(); - vclose(); - exit(0); + /* can't cd to domain directory */ + return( 171 ); } - sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); + /* Create filename for session file */ + sprintf(FileName, "%s/Maildir/%s.qw", pw->pw_dir, Time); + fprintf(stderr, "Session file name: %s\n", FileName ); - fs = fopen(Buffer1, "r"); - if ( fs == NULL ) { - sprintf(StatusMessage, "%s\n", get_html_text("172")); - show_login(); - vclose(); - exit(0); + /* Try to open file */ + if ( NULL == (fs = fopen(FileName, "r"))) { + fprintf(stderr, "Session file open failed\n" ); + return(172); } - if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { - sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 5); - vclose(); - exit(0); + + if ( NULL == ( fgets(Buffer2, sizeof(Buffer2), fs))) { + fprintf(stderr, "Session file read failed\n" ); + return(150); } + fclose(fs); #ifdef IPAUTH GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(Buffer1); - sprintf(StatusMessage, "%s %d (%s != %s .. %s)\n", get_html_text("150"), 6, ip_addr, ip_value, Buffer2); - show_login(); - vclose(); - exit(0); + fprintf(stderr, "Session IP address check failed\n" ); + unlink(FileName); + return(150); } #endif time1 = atoi(Time); time2 = time(NULL); if ( time2 > time1 + 7200 ) { - unlink(Buffer1); - sprintf(StatusMessage, "%s\n", get_html_text("173")); - show_login(); - vclose(); - exit(0); + unlink(FileName); + return(173); } -} - -set_admin_type() -{ - struct vqpasswd *vpw=NULL; - - vpw = vauth_getpw(Username, Domain); - AdminType = NO_ADMIN; - if ( strlen(Domain) > 0 ) { - if ( strcmp(Username,"postmaster")==0 ) { - AdminType = DOMAIN_ADMIN; -#ifdef VQPASSWD_HAS_PW_FLAGS - } else if ( vpw->pw_flags & QA_ADMIN ) { -#else - } else if ( vpw->pw_gid & QA_ADMIN ) { -#endif - AdminType = DOMAIN_ADMIN; - } else { - AdminType = USER_ADMIN; - } - } +return(0); } Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- autorespond.c 30 Jan 2004 08:30:58 -0000 1.6 +++ autorespond.c 31 Jan 2004 11:08:00 -0000 1.7 @@ -72,7 +72,7 @@ if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { strcpy(uBufA, "3"); sprintf(uBufB, "SAL %s %s\n", get_html_text("144"), mydirent->d_name); - send_template_now("show_error_line.html"); + send_template("show_error_line.html"); continue; } @@ -94,7 +94,7 @@ qmail_button(uBufA, "delautorespond", addr, "delete.png" ); qmail_button(uBufB, "modautorespond", addr, "modify.png" ); sprintf(uBufC, "%s@%s", addr, Domain); - send_template_now("show_autorespond_line.html"); + send_template("show_autorespond_line.html"); } sort_cleanup(); } @@ -104,15 +104,13 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( MaxAutoResponders != -1 && CurAutoResponders >= MaxAutoResponders ) { fprintf(actout, "%s %d\n", get_html_text("158"), MaxAutoResponders); show_menu(); - vclose(); - exit(0); + return(158); } send_template( "add_autorespond.html" ); @@ -129,58 +127,50 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( MaxAutoResponders != -1 && CurAutoResponders >= MaxAutoResponders ) { fprintf(actout, "%s %d\n", get_html_text("158"), MaxAutoResponders); show_menu(); - vclose(); - exit(0); + return(158); } if ( fixup_local_name(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("174"), ActionUser); addautorespond(); - vclose(); - exit(0); + return(174); } if ( check_local_user(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("175"), ActionUser); addautorespond(); - vclose(); - exit(0); + return(175); } if ( strlen(ActionUser) == 0 ) { sprintf(StatusMessage, "%s\n", get_html_text("176")); addautorespond(); - vclose(); - exit(0); + return(176); } if ( strlen(Newu)>0 && check_email_addr(Newu) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("177"), Newu); addautorespond(); - vclose(); - exit(0); + return(177); } if (strlen(Alias) <= 1) { sprintf(StatusMessage, "%s %s\n", get_html_text("178"), ActionUser); addautorespond(); - vclose(); - exit(0); + return(178); } if (strlen(Message) <= 1) { sprintf(StatusMessage, "%s %s\n", get_html_text("179"), ActionUser); addautorespond(); - vclose(); - exit(0); + return(179); } @@ -221,6 +211,7 @@ /* * Report success */ + CurAutoResponders++; sprintf(StatusMessage, "%s %s@%s\n", get_html_text("180"), ActionUser, Domain); show_autoresponders(Username,Domain); @@ -231,8 +222,7 @@ { if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template( "del_autorespond_confirm.html" ); } @@ -246,8 +236,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]=='.') ActionUser[i] = ':'; @@ -269,6 +258,7 @@ vdelfiles(Buffer1); sprintf(StatusMessage, "%s %s\n", get_html_text("182"), ActionUser); + CurAutoResponders--; if(CurAutoResponders == 0) { show_menu(Username, Domain, Mytime); } else { @@ -284,11 +274,12 @@ FILE *fs; int i,j; +/* if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } +*/ /* Build the .qmail file name */ sprintf(fqfn, ".qmail-%s", ActionUser); @@ -382,36 +373,31 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( fixup_local_name(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("174"), ActionUser); modautorespond(); - vclose(); - exit(0); + return(174); } if ( strlen(Newu)>0 && check_email_addr(Newu) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("177"), Newu); modautorespond(); - vclose(); - exit(0); + return(177); } if (strlen(Alias) <= 1) { sprintf(StatusMessage, "%s %s\n", get_html_text("177"), ActionUser); modautorespond(); - vclose(); - exit(0); + return(177); } if (strlen(Message) <= 1) { sprintf(StatusMessage, get_html_text("BODY_EMPTY"), ActionUser); modautorespond(); - vclose(); - exit(0); + return(0); } Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- command.c 30 Jan 2004 08:30:58 -0000 1.5 +++ command.c 31 Jan 2004 11:08:00 -0000 1.6 @@ -36,227 +36,212 @@ process_commands(char *command) { int pid; + int rv=0; // return value char Buffer[MAX_BUFF]; - if (strcmp(command, "showmenu") == 0 ) { - show_menu(Username, Domain, Mytime); + fprintf( stderr, "Process_commands: %s\n", command ); - } else if (strcmp(command, "showusers") == 0) { - GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - GetValue(TmpCGI, SearchUser, "searchuser=", sizeof(SearchUser)); - show_users(Username, Domain, Mytime, command); +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* No rights */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - } else if (strcmp(command, "showforwards") == 0) { - GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - show_forwards(Username, Domain, Mytime, command); + if (strcmp(command, "logout") == 0 ) { + sprintf(Buffer, "%s/%s/Maildir", RealDir, Username ); + del_id_files(Buffer); + show_login(); - } else if (strcmp(command, "showmailinglists") == 0) { - show_mailing_lists(Username, Domain, Mytime, command); +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* User rights */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + } else if (AdminType < USER_ADMIN ) { + rv = show_login(); + + } else if (strcmp(command, "showmenu") == 0 ) { + rv = show_menu(Username, Domain, Mytime); + + } else if (strcmp(command, "adddotqmail") == 0 ) { + rv = adddotqmail(); + + } else if (strcmp(command, "adddotqmailnow") == 0 ) { + GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); + rv = adddotqmailnow(); + + } else if (strcmp(command, "deldotqmail") == 0 ) { + rv = deldotqmail(); + + } else if (strcmp(command, "deldotqmailnow") == 0 ) { + rv = deldotqmailnow(); + + } else if (strcmp(command, "moddotqmail") == 0 ) { + rv = moddotqmail(); + + } else if (strcmp(command, "moddotqmailnow") == 0 ) { + GetValue(TmpCGI, Action, "action=", sizeof(Action)); + rv = moddotqmailnow(); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* Domain rights */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + } else if (AdminType < DOMAIN_ADMIN ) { + rv = show_menu(Username, Domain, Mytime); + +/* A U T O R E S P O N D E R S */ } else if (strcmp(command, "showautoresponders") == 0) { - show_autoresponders(Username, Domain, Mytime, command); + rv = show_autoresponders(Username, Domain, Mytime, command); - } else if (strcmp(command, "adduser") == 0 ) { - adduser(); + } else if (strcmp(command, "addautorespond") == 0 ) { + rv = addautorespond(); - } else if (strcmp(command, "addusernow") == 0 ) { - addusernow(); + } else if (strcmp(command, "addautorespondnow") == 0 ) { + GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); + GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); + rv = addautorespondnow(); - } else if (strcmp(command, "bounceall") == 0 ) { - bounceall(); + } else if (strcmp(command, "delautorespond") == 0 ) { + rv = delautorespond(); - } else if (strcmp(command, "deleteall") == 0 ) { - deleteall(); + } else if (strcmp(command, "delautorespondnow") == 0 ) { + rv = delautorespondnow(); - } else if (strcmp(command, "setremotecatchall") == 0 ) { - setremotecatchall(); + } else if (strcmp(command, "modautorespond") == 0 ) { + rv = modautorespond(); - } else if (strcmp(command, "setremotecatchallnow") == 0 ) { - setremotecatchallnow(); + } else if (strcmp(command, "modautorespondnow") == 0 ) { + GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); + GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); + rv = modautorespondnow(); + +/* F O R W A R D S */ + + } else if (strcmp(command, "showforwards") == 0) { + rv = show_forwards(Username, Domain, Mytime, command); + +/* M A I L I N G L I S T S */ + + } else if (strcmp(command, "showmailinglists") == 0) { + rv = show_mailing_lists(Username, Domain, Mytime, command); } else if (strcmp(command, "addlistmodnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - addlistgroupnow(1); + rv = addlistgroupnow(1); } else if (strcmp(command, "dellistmod") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - dellistgroup("del_listmod.html"); + rv = dellistgroup("del_listmod.html"); } else if (strcmp(command, "dellistmodnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - dellistgroupnow(1); + rv = dellistgroupnow(1); } else if (strcmp(command, "addlistmod") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - addlistgroup("add_listmod.html"); + rv = addlistgroup("add_listmod.html"); } else if (strcmp(command, "showlistmod") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - show_list_group("show_moderators.html"); + rv = show_list_group("show_moderators.html"); } else if (strcmp(command, "addlistdig") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - addlistgroup("add_listdig.html"); + rv = addlistgroup("add_listdig.html"); } else if (strcmp(command, "addlistdignow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - addlistgroupnow(2); + rv = addlistgroupnow(2); } else if (strcmp(command, "dellistdig") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - dellistgroup("del_listdig.html"); + rv = dellistgroup("del_listdig.html"); } else if (strcmp(command, "dellistdignow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - dellistgroupnow(2); + rv = dellistgroupnow(2); } else if (strcmp(command, "showlistdig") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - show_list_group("show_digest_subscribers.html"); - - } else if (strcmp(command, "moduser") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - moduser(); - - } else if (strcmp(command, "modusernow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Password1, "password1=", sizeof(Password1)); - GetValue(TmpCGI, Password2, "password2=", sizeof(Password2)); - GetValue(TmpCGI, Gecos, "gecos=", sizeof(Gecos)); - modusergo(); - - } else if (strcmp(command, "deluser") == 0 ) { - GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); - deluser(); - - } else if (strcmp(command, "delusernow") == 0 ) { - GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); - delusergo(); - - } else if (strcmp(command, "moddotqmail") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - moddotqmail(); - - } else if (strcmp(command, "moddotqmailnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - GetValue(TmpCGI, LineData, "linedata=", sizeof(LineData)); - GetValue(TmpCGI, Action, "action=", sizeof(Action)); - moddotqmailnow(); - - } else if (strcmp(command, "deldotqmail") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - deldotqmail(); - - } else if (strcmp(command, "deldotqmailnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - deldotqmailnow(); - - } else if (strcmp(command, "adddotqmail") == 0 ) { - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - adddotqmail(); - - } else if (strcmp(command, "adddotqmailnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); - GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); - GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); - adddotqmailnow(); + rv = show_list_group("show_digest_subscribers.html"); } else if (strcmp(command, "addmailinglist") == 0 ) { - addmailinglist(); + rv = addmailinglist(); } else if (strcmp(command, "delmailinglist") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - delmailinglist(); + rv = delmailinglist(); } else if (strcmp(command, "delmailinglistnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - delmailinglistnow(); + rv = delmailinglistnow(); } else if (strcmp(command, "addlistusernow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - addlistgroupnow(0); + rv = addlistgroupnow(0); } else if (strcmp(command, "dellistuser") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - dellistgroup("del_listuser.html"); + rv = dellistgroup("del_listuser.html"); } else if (strcmp(command, "dellistusernow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); - dellistgroupnow(0); + rv = dellistgroupnow(0); } else if (strcmp(command, "addlistuser") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - addlistgroup("add_listuser.html"); + rv = addlistgroup("add_listuser.html"); } else if (strcmp(command, "addmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); - addmailinglistnow(); + rv = addmailinglistnow(); } else if (strcmp(command, "modmailinglist") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - modmailinglist(); + rv = modmailinglist(); } else if (strcmp(command, "modmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); - modmailinglistnow(); + rv = modmailinglistnow(); - } else if (strcmp(command, "modautorespond") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - modautorespond(); + } else if (strcmp(command, "showlistusers") == 0 ) { + rv = show_list_group("show_subscribers.html"); - } else if (strcmp(command, "addautorespond") == 0 ) { - addautorespond(); + } else if (strcmp(command, "setdefault") == 0 ) { + rv = setdefaultaccount(); - } else if (strcmp(command, "addautorespondnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); - GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); - GetValue(TmpCGI, Message, "message=", sizeof(Message)); - GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); - addautorespondnow(); +/* U S E R S */ - } else if (strcmp(command, "modautorespondnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); - GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); - GetValue(TmpCGI, Message, "message=", sizeof(Message)); - GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); - modautorespondnow(); + } else if (strcmp(command, "showusers") == 0) { + rv = show_users(Username, Domain, Mytime, command); - } else if (strcmp(command, "showlistusers") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - show_list_group("show_subscribers.html"); + } else if (strcmp(command, "adduser") == 0 ) { + rv = adduser(); - } else if (strcmp(command, "setdefault") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - setdefaultaccount(); + } else if (strcmp(command, "addusernow") == 0 ) { + rv = addusernow(); - } else if (strcmp(command, "delautorespond") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - delautorespond(); + } else if (strcmp(command, "deluser") == 0 ) { + GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); + rv = deluser(); - } else if (strcmp(command, "delautorespondnow") == 0 ) { - GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); - delautorespondnow(); + } else if (strcmp(command, "delusernow") == 0 ) { + GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); + rv = delusergo(); + + } else if (strcmp(command, "moduser") == 0 ) { + rv = moduser(); + + } else if (strcmp(command, "modusernow") == 0 ) { + rv = modusergo(); + + } else if (strcmp(command, "bounceall") == 0 ) { + rv = bounceall(); + + } else if (strcmp(command, "deleteall") == 0 ) { + rv = deleteall(); + + } else if (strcmp(command, "setremotecatchall") == 0 ) { + rv = setremotecatchall(); + + } else if (strcmp(command, "setremotecatchallnow") == 0 ) { + rv = setremotecatchallnow(); + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ +/* System rights */ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + + } else { + fprintf(stderr, "Invalid command: %s\n", command); - } else if (strcmp(command, "logout") == 0 ) { - sprintf(Buffer, "%s/%s/Maildir", RealDir, Username ); - del_id_files(Buffer); - show_login(); } - vclose(); - exit(0); + if( rv > -1 ) { + printf( "Return Value: %d<BR>\n", rv ); + fprintf(stderr, "Return Value: %d<BR>\n", rv ); + } } setdefaultaccount() Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- forward.c 30 Jan 2004 08:30:58 -0000 1.5 +++ forward.c 31 Jan 2004 11:08:00 -0000 1.6 @@ -36,19 +36,21 @@ int show_forwards(char *user, char *dom, time_t mytime, char *dir) { + fprintf( stderr, "show_forwards\n" ); + if (AdminType != DOMAIN_ADMIN) { - fprintf(stderr, "%s", get_html_text("142")); - vclose(); - exit(0); + fprintf( stderr, "Not an admin\n" ); + sprintf(StatusMessage,"%s", get_html_text("142")); + return(142); } if(CurForwards == 0) { - fprintf(stderr, "%s", get_html_text("232")); + fprintf( stderr, "show_forwards - aint none\n" ); sprintf(StatusMessage,"%s", get_html_text("232")); show_menu(Username, Domain, Mytime); - vclose(); - exit(0); + return(232); } else { + fprintf( stderr, "show_forwards - send template\n" ); send_template("show_forwards.html"); } Index: limits.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/limits.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- limits.c 10 Oct 2003 16:36:24 -0000 1.2 +++ limits.c 31 Jan 2004 11:08:00 -0000 1.3 @@ -35,6 +35,9 @@ load_limits() { + + fprintf( stderr, "load_limits\n" ); + vget_limits(Domain, &Limits); MaxPopAccounts = Limits.maxpopaccounts; MaxAliases = Limits.maxaliases; @@ -48,4 +51,5 @@ DisablePasswordChanging = Limits.disable_passwordchanging; DisableWebmail = Limits.disable_webmail; DisableRelay = Limits.disable_relay; + } Index: mailinglist.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/mailinglist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- mailinglist.c 30 Jan 2004 08:30:58 -0000 1.7 +++ mailinglist.c 31 Jan 2004 11:08:00 -0000 1.8 @@ -47,18 +47,17 @@ int show_mailing_lists(char *user, char *dom, time_t mytime) { + fprintf(stderr, "show_mailing_lists was called\n"); if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } /* see if there's anything to display */ if ( CurMailingLists == 0 ) { sprintf(StatusMessage,"%s", get_html_text("231")); show_menu(); - vclose(); - exit(0); + return(231); } if ( MaxMailingLists == 0 ) { @@ -79,8 +78,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( MaxMailingLists == 0 ) { return(0); @@ -104,7 +102,7 @@ strcpy(uBufA, "5"); #endif sprintf(uBufB, "SMLL %s %s\n", get_html_text("144"), mydirent->d_name); - send_template_now("show_error_line.html"); + send_template("show_error_line.html"); continue; } fgets(Buffer, sizeof(Buffer), fs); @@ -149,7 +147,7 @@ fclose(fs); } #endif - send_template_now("show_mailinglist_line.html"); + send_template("show_mailinglist_line.html"); } sort_cleanup(); } @@ -180,8 +178,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if (*EZMLMDIR == 'n' || MaxMailingLists == 0 ) { @@ -227,7 +224,7 @@ sprintf(uBufA,"%d", i); sprintf(uBufB,"%s", addr); sprintf(uBufC,"%s@%s", addr, Domain); - send_template_now("show_mailinglist_line2.html"); + send_template("show_mailinglist_line2.html"); } sort_cleanup(); @@ -239,16 +236,14 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( MaxMailingLists != -1 && CurMailingLists >= MaxMailingLists ) { fprintf(actout, "%s %d\n", get_html_text("184"), MaxMailingLists); show_menu(); - vclose(); - exit(0); + return(184); } /* set up default options for new list */ @@ -266,8 +261,7 @@ { if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template( "del_mailinglist_confirm.html" ); @@ -283,8 +277,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( (mydir = opendir(".")) == NULL ) { @@ -322,6 +315,8 @@ sprintf(Buffer2, "%s/%s", RealDir, ActionUser); vdelfiles(Buffer2); + CurMailingLists--; + sprintf(StatusMessage, "%s %s\n", get_html_text("186"), ActionUser); if ( CurMailingLists == 0 ) { show_menu(); @@ -397,15 +392,13 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if ( fixup_local_name(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("188"), ActionUser); addmailinglist(); - vclose(); - exit(0); + return(188); } /* update listopt based on user selections */ @@ -577,18 +570,17 @@ fprintf(actout, "%s %d\n", get_html_text("184"), MaxMailingLists); show_menu(); - vclose(); - exit(0); + return(184); } if ( check_local_user(ActionUser) ) { sprintf(StatusMessage, "%s %s\n", get_html_text("175"), ActionUser); addmailinglist(); - vclose(); - exit(0); + return(175); } ezmlm_make(1); + CurMailingLists++; sprintf(StatusMessage, "%s %s@%s\n", get_html_text("187"), ActionUser, Domain); @@ -610,8 +602,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } lowerit(ActionUser); @@ -712,8 +703,7 @@ { if (AdminType != DOMAIN_ADMIN) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } if (MaxMailingLists == 0) { @@ -733,8 +723,7 @@ { if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template(template); @@ -756,8 +745,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } lowerit(ActionUser); @@ -771,8 +759,7 @@ } else { addlistuser(); } - vclose(); - exit(0); + return(148); } pid=fork(); @@ -802,8 +789,7 @@ get_html_text("193"), ActionUser, Domain); send_template( "add_listuser.html" ); } - vclose(); - exit(0); + return(999); } /* @@ -816,8 +802,7 @@ { if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } send_template(template); @@ -837,8 +822,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } lowerit(Newu); @@ -868,8 +852,7 @@ ActionUser, Domain); } show_mailing_lists(Username, Domain, Mytime); - vclose(); - exit(0); + return(999); } /* @@ -889,8 +872,7 @@ if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); - vclose(); - exit(0); + return(142); } strcpy (Alias, ""); /* initialize Alias (list owner) to empty string */ Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- qmailadmin.c 30 Jan 2004 08:30:58 -0000 1.9 +++ qmailadmin.c 31 Jan 2004 11:08:00 -0000 1.10 @@ -43,6 +43,7 @@ char Gecos[MAX_BUFF]; char Quota[MAX_BUFF]; char Time[MAX_BUFF]; +char Action[MAX_BUFF]; char ActionUser[MAX_BUFF]; char Newu[MAX_BUFF]; char Password1[MAX_BUFF]; @@ -109,172 +110,218 @@ FILE *color_table; void del_id_files( char *); +int create_session_file( char *ip_addr, char *domaindir); -main(argc,argv) - int argc; - char *argv[]; +get_parms() { - const char *u; - const char *p; - const char *ip_addr=getenv("REMOTE_ADDR"); - const char *x_forward=getenv("HTTP_X_FORWARDED_FOR"); - char *pi; - int i,j; char *rm; - time_t time1; - time_t time2; - FILE *fs; - int pid; - char returnhttp[MAX_BUFF]; - char returntext[MAX_BUFF]; - char TmpBuf[MAX_BIG_BUFF]; - char TmpBuf1[MAX_BUFF]; - char TmpBuf2[MAX_BUFF]; - char TmpBuf3[MAX_BUFF]; +/* Get the REQUEST_METHOD */ + rm = getenv("REQUEST_METHOD"); + rm = (rm == NULL ? "" : strdup(rm)); - init_globals(); +/* Decide how to retrieve the data */ + if ( strncmp(rm , "POST", 4) == 0 ) { + get_cgi(); + } else { + TmpCGI = getenv("QUERY_STRING"); + TmpCGI = (TmpCGI == NULL ? "" : strdup(TmpCGI)); + } + +/* Now get common values out of TmpCGI */ + GetValue(TmpCGI, Username, "user=", sizeof(Username)); + GetValue(TmpCGI, Domain, "dom=", sizeof(Domain)); + GetValue(TmpCGI, Time, "time=", sizeof(Time)); + GetValue(TmpCGI, Action, "action=", sizeof(Time)); + GetValue(TmpCGI, Password, "password=", sizeof(Password)); + + Mytime = atoi(Time); + + GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); + GetValue(TmpCGI, SearchUser, "searchuser=", sizeof(SearchUser)); + GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); + GetValue(TmpCGI, Password1, "password1=", sizeof(Password1)); + GetValue(TmpCGI, Password2, "password2=", sizeof(Password2)); + GetValue(TmpCGI, Gecos, "gecos=", sizeof(Gecos)); + GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); + GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); + GetValue(TmpCGI, LineData, "linedata=", sizeof(LineData)); + GetValue(TmpCGI, Message, "message=", sizeof(Message)); + GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); + + fprintf(stderr, "GetParms: Username: %s Password: %s Domain: %s\n", + Username, Password, Domain); + +} + +setuidgid(char *Domain) +{ + /* get the real uid and gid and change to that user */ + vget_assign(Domain,RealDir,sizeof(RealDir),&Uid,&Gid); + + if ( geteuid() == 0 ) { + if ( setgid(Gid) != 0 ) perror("setgid"); + if ( setuid(Uid) != 0 ) perror("setuid"); + } + + if ( chdir(RealDir) < 0 ) { + fprintf(stderr, "MAIN %s %s\n", get_html_text("171"), RealDir ); + } +} + +int get_command_parms( char *commandparms, int parmsize ) +{ + char *pi; + int i,j; + + fprintf(stderr, "get_command_parms started\n" ); - if (x_forward) ip_addr = x_forward; - if (!ip_addr) ip_addr = "127.0.0.1"; pi=getenv("PATH_INFO"); if ( pi ) pi = strdup(pi); + fprintf(stderr, "get_command_parms pi: %s\n", pi ); + + memset(commandparms, 0, parmsize); + fprintf(stderr, "sizeof commandparms: %d", parmsize); + + /* Cut off the first five characters... '/com/' */ if (pi && strncmp(pi, "/com/", 5) == 0) { - /* /com/ found in URL so there is something to do */ - fprintf( stderr, "\nMystery if case #1\n" ); - struct vqpasswd *pw; + for(j=0,i=5;pi[i]!=0&&j<99;++i,++j) commandparms[j] = pi[i]; + fprintf(stderr, "get command parms - found it: %s\n", commandparms ); + return( 0 ); + } - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - for(j=0,i=5;pi[i]!=0&&j<99;++i,++j) TmpBuf2[j] = pi[i]; - rm = getenv("REQUEST_METHOD"); - rm = (rm == NULL ? "" : strdup(rm)); + fprintf(stderr, "get command parms - nothing\n" ); + return(1); +} - if ( strncmp(rm , "POST", 4) == 0 ) { - get_cgi(); - } else { - TmpCGI = getenv("QUERY_STRING"); - TmpCGI = (TmpCGI == NULL ? "" : strdup(TmpCGI)); - } +get_my_ip( char *ip_address ) +{ - GetValue(TmpCGI, Username, "user=", sizeof(Username)); - GetValue(TmpCGI, Domain, "dom=", sizeof(Domain)); - GetValue(TmpCGI, Time, "time=", sizeof(Time)); - Mytime = atoi(Time); - pw = vauth_getpw( Username, Domain ); + const char *ip_addr=getenv("REMOTE_ADDR"); + const char *x_forward=getenv("HTTP_X_FORWARDED_FOR"); - /* get the real uid and gid and change to that user */ - vget_assign(Domain,RealDir,sizeof(RealDir),&Uid,&Gid); - if ( geteuid() == 0 ) { - if ( setgid(Gid) != 0 ) perror("setgid"); - if ( setuid(Uid) != 0 ) perror("setuid"); - } + if (x_forward) ip_addr = x_forward; + if (!ip_addr) ip_addr = "127.0.0.1"; - if ( chdir(RealDir) < 0 ) { - fprintf(stderr, "MAIN %s %s\n", get_html_text("171"), RealDir ); - } + strcpy(ip_address, ip_addr); +} + +serious_error_abort( int errors ) +{ +fprintf(stderr, "Serious internal error: %d\n", errors); + +printf("<HTML><BODY><H1>%s - %d</H1></BODY></HTML>", + "Serious internal error", errors ); +vclose(); +exit(0); +} + +get_pathinfo() +{ + + +} + +main(argc,argv) + int argc; + char *argv[]; +{ + char CommandParms[MAX_BUFF]; + char ip_addr[MAX_BUFF]; + struct vqpasswd *pw; + int errors = 0; + char err_code[4]; + + umask(VPOPMAIL_UMASK); + + init_globals(); + if( open_lang()) errors += 1; + if( open_colortable()) errors += 2; + get_parms(); + get_my_ip( ip_addr ); + + paint_headers(); + + /* If there are errors starting up, report them and exit */ + if( errors > 0 ) serious_error_abort( errors ); + + send_template("header.html"); + + if (!get_command_parms(CommandParms, sizeof(CommandParms))) { + + /* Have command - prepare to execute it */ + fprintf( stderr, "\nMystery if case #1\n" ); + setuidgid( Domain ); set_admin_type(); count_stuff(); - if ( AdminType == USER_ADMIN || AdminType == DOMAIN_ADMIN ) { - auth_user_domain(ip_addr, pw); + if( errors = get_session_data( Username, Domain, ip_addr )) { + + /* Error with session data - need to login */ + sprintf(err_code, "%3d\n", errors ); + fprintf( stderr, "Error code returned: %s", err_code); + sprintf(StatusMessage, "%s\n", get_html_text( err_code )); + show_login(); + } else { - auth_system(ip_addr, pw); + + /* Command requested, and session valid - do it */ + process_commands(CommandParms); + } - process_commands(TmpBuf2); - } else { - char *rm; - struct vqpasswd *pw; - FILE *fs; + } else if ( strlen(Action) == 0) { - fprintf( stderr, "\nMystery if case #3\n" ); + /* No button pressed... Show login page */ + show_login(); - /* Just logged in */ - rm = getenv("REQUEST_METHOD"); - if ( rm ) rm = strdup(rm); + } else if (0 == strlen(Username) || 0==strlen(Password)) { - if ( rm && ( strncmp(rm,"POST",4)==0 || strncmp(rm,"GET",3)==0)) { - if ( strncmp(rm , "POST", 4) == 0 ) { - get_cgi(); - } else { - TmpCGI = getenv("QUERY_STRING"); - TmpCGI = (TmpCGI == NULL ? "" : strdup(TmpCGI)); - } + /* If they left anything blank, don't bother to authenticate */ + sprintf(StatusMessage, "%s\n", get_html_text("316")); + show_login(); - GetValue(TmpCGI, Username, "username=", sizeof(Username)); - GetValue(TmpCGI, Domain, "domain=", sizeof(Domain)); - GetValue(TmpCGI, Password, "password=", sizeof(Password)); + } else if (NULL == (pw = vauth_user( Username, Domain, Password, "" ))) { - vget_assign(Domain,RealDir,sizeof(RealDir),&Uid,&Gid); - if ( geteuid() == 0 ) { - if ( setgid(Gid) != 0 ) perror("setgid"); - if ( setuid(Uid) != 0 ) perror("setuid"); - } + /* Invalid user/domain/password - show error message */ + sprintf(StatusMessage, "%s\n", get_html_text("198")); + show_login(); - /* Authenticate a user and domain admin */ - if ( strlen(Domain) > 0 ) { - chdir(RealDir); - load_limits(); + } else { - pw = vauth_user( Username, Domain, Password, "" ); - if ( pw == NULL ) { - sprintf(StatusMessage, "%s\n", get_html_text("198")); - show_login(); - vclose(); - exit(0); - } + /* Just logged in */ + setuidgid( Domain ); + if( create_session_file( ip_addr, pw->pw_dir )) { - sprintf(TmpBuf, "%s/Maildir", pw->pw_dir); - del_id_files( TmpBuf); + printf( "Unable to create session file" ); - Mytime = time(NULL); - sprintf(TmpBuf, "%s/Maildir/%d.qw", pw->pw_dir, Mytime); - fs = fopen(TmpBuf, "w"); - if ( fs == NULL ) { - fprintf(actout,"MAIN %s %s\n", get_html_text("144"), TmpBuf); - fprintf(stderr,"MAIN %s %s\n", get_html_text("144"), TmpBuf); - vclose(); - exit(0); - } - memset(TmpBuf, 0, sizeof(TmpBuf)); - /* set session vars */ - GetValue(TmpCGI, returntext, "returntext=", sizeof(returntext)); - GetValue(TmpCGI, returnhttp, "returnhttp=", sizeof(returnhttp)); - sprintf(TmpBuf, "ip_addr=%s&returntext=%s&returnhttp=%s\n", - ip_addr, returntext, returnhttp); - fputs(TmpBuf,fs); - // fputs(ip_addr, fs); - fclose(fs); - vget_assign(Domain, TmpBuf1, sizeof(TmpBuf1), &Uid, &Gid); - set_admin_type(); + } else { - /* show the main menu for domain admins, modify user page - for regular users */ - if (AdminType == DOMAIN_ADMIN) { - show_menu(Username, Domain, Mytime); - } else { - strcpy (ActionUser, Username); - moduser(); - } - vclose(); - exit(0); - } - } + load_limits(); + + if (AdminType == DOMAIN_ADMIN) { + + /* show the main menu for domain admins */ + show_menu(Username, Domain, Mytime); + + } else { + + /* show the modify user page for regular users */ + strcpy (ActionUser, Username); + moduser(); + + } + } } - show_login(); + + send_template("footer.html"); vclose(); } init_globals() { - int i,j; - struct vqpasswd *pw; - char *accept_lang; - char *langptr, *qptr; - int lang_err; - float maxq, thisq; memset(CGIValues, 0, sizeof(CGIValues)); CGIValues['0'] = 0; @@ -306,6 +353,7 @@ memset(Password, 0, sizeof(Password)); memset(Quota, 0, sizeof(Quota)); memset(Time, 0, sizeof(Time)); + memset(Action, 0, sizeof(Action)); memset(ActionUser, 0, sizeof(ActionUser)); memset(Newu, 0, sizeof(Newu)); memset(Password1, 0, sizeof(Password1)); @@ -315,68 +363,11 @@ memset(Message, 0, sizeof(Message)); AdminType = NO_ADMIN; +} - lang_fs = NULL; - - /* Parse HTTP_ACCEPT_LANGUAGE to find highest preferred language - * that we have a translation for. Example setting: - * de-de, ja;q=0.25, en;q=0.50, de;q=0.75 - * The q= lines determine which is most preferred, defaults to 1. - * Our routine starts with en at 0.0, and then would try de-de (1.00), - * de (1.00), ja (0.25), en (0.50), and then de (0.75). - */ - - /* default to English at 0.00 preference */ - maxq = 0.0; - strcpy (Lang, "en"); - - /* read in preferred languages */ - langptr = getenv("HTTP_ACCEPT_LANGUAGE"); - if (langptr != NULL) { - accept_lang = malloc (strlen(langptr)); - strcpy (accept_lang, langptr); - langptr = strtok(accept_lang, " ,\n"); - while (langptr != NULL) { - qptr = strstr (langptr, ";q="); - if (qptr != NULL) { - *qptr = '\0'; /* convert semicolon to NULL */ - thisq = (float) atof (qptr+3); - } else { - thisq = 1.0; - } - - /* if this is a better match than our previous best, try it */ - if (thisq > maxq) { - lang_err = open_lang (langptr); - - /* Remove this next section for strict interpretation of - * HTTP_ACCEPT_LANGUAGE. It will try language xx (with the - * same q value) if xx-yy fails. - */ - if ((lang_err == -1) && (langptr[2] == '-')) { - langptr[2] = '\0'; - lang_err = open_lang (langptr); - } - - if (lang_err == 0) { - maxq = thisq; - strcpy (Lang, langptr); - } - } - langptr = strtok (NULL, " ,\n"); - } - - free(accept_lang); - } - - /* open the best language choice */ - open_lang (Lang); - - /* open the color table */ - open_colortable(); - - umask(VPOPMAIL_UMASK); +paint_headers() +{ fprintf(actout,"Content-Type: text/html\n"); #ifdef NO_CACHE fprintf(actout,"Cache-Control: no-cache\n"); @@ -387,21 +378,3 @@ fprintf(actout,"\n"); } -void del_id_files( char *dirname ) -{ - DIR *mydir; - struct dirent *mydirent; - struct stat statbuf; - char Buffer[MAX_BUFF]; - - mydir = opendir(dirname); - if ( mydir == NULL ) return; - - while((mydirent=readdir(mydir))!=NULL){ - if ( strstr(mydirent->d_name,".qw")!=0 ) { - sprintf(Buffer, "%s/%s", dirname, mydirent->d_name); - unlink(Buffer); - } - } - closedir(mydir); -} Index: qmailadmin.h =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- qmailadmin.h 30 Jan 2004 03:28:19 -0000 1.2 +++ qmailadmin.h 31 Jan 2004 11:08:00 -0000 1.3 @@ -28,16 +28,16 @@ #define QMAILADMIN_UNLIMITED -1 -#define NO_ADMIN 0 - -#define DOMAIN_ADMIN 2 -#define USER_ADMIN 3 +#define NO_ADMIN 0 // Just show the login page again +#define USER_ADMIN 1 // Access only own address +#define DOMAIN_ADMIN 2 // Access entire domain +#define SYSTEM_ADMIN 3 // Access all domains #define NUM_SQL_OPTIONS 6 char *get_html_text( char *index ); -int open_lang( char *lang); +int open_lang(); int quota_to_bytes(char[], char*); //jhopper prototype int quota_to_megabytes(char[], char*); //jhopper prototype Index: qmailadminx.h =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadminx.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- qmailadminx.h 30 Jan 2004 08:30:58 -0000 1.4 +++ qmailadminx.h 31 Jan 2004 11:08:00 -0000 1.5 @@ -24,6 +24,7 @@ extern char Gecos[MAX_BUFF]; extern char Quota[MAX_BUFF]; extern char Time[MAX_BUFF]; +extern char Action[MAX_BUFF]; extern char ActionUser[MAX_BUFF]; extern char Newu[MAX_BUFF]; extern char Password1[MAX_BUFF]; @@ -86,7 +87,7 @@ extern char uBufL[MAX_BUFF]; void del_id_files( char *); -int open_lang( char *lang); +int open_lang(); extern char *strstart(); extern char *safe_getenv(); Index: show.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/show.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- show.c 30 Jan 2004 08:30:58 -0000 1.3 +++ show.c 31 Jan 2004 11:08:00 -0000 1.4 @@ -34,7 +34,7 @@ char *dom; time_t mytime; { - send_template( "menu_main.html" ); + send_template( "main_menu.html" ); } show_login() Index: template.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/template.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- template.c 30 Jan 2004 08:30:58 -0000 1.9 +++ template.c 31 Jan 2004 11:08:00 -0000 1.10 @@ -48,15 +48,7 @@ /* * send an html template to the browser */ -int send_template(char *actualfile) -{ - send_template_now("header.html"); - send_template_now(actualfile); - send_template_now("footer.html"); - return 0; -} - -int send_template_now(char *filename) +int send_template(char *filename) { FILE *fs; FILE *fs_qw; @@ -103,7 +95,7 @@ /* open the template */ fs = fopen( fqfn, "r" ); if (fs == NULL) { - fprintf(stderr,"%s %s\n", get_html_text("144"), fqfn); + fprintf(stderr,"STN1 %s %s\n", get_html_text("144"), fqfn); return 144; } @@ -267,7 +259,7 @@ if ((strstr(Buffer, "../")) != NULL) { fprintf(actout, "STN3 %s: %s", get_html_text("144"), Buffer); } else if((strcmp(Buffer, filename)) != 0) { - send_template_now(Buffer); + send_template(Buffer); } } break; @@ -390,7 +382,7 @@ sprintf( uBufB, "%s", QA_VERSION ); sprintf( uBufC, "%s", PACKAGE ); sprintf( uBufD, "%s", VERSION ); - send_template_now("version.html"); + send_template("version.html"); break; /* send the common URL parms */ @@ -406,7 +398,7 @@ printf("%s", get_html_text(dchar)); break; - /* exit / logout link/text */ + /* logout link/text */ case 'x': printf("<a href=\""); strcpy (value, get_session_val("returntext=")); @@ -463,7 +455,6 @@ } } } -/* fprintf(stderr, "Qmailadmin: below while\n"); */ fclose(fs); fflush(actout); @@ -585,43 +576,34 @@ } else if (fgets(Buffer,sizeof(Buffer),fs1)!=NULL) { /* Parse the first line of the .qmail file */ - + if( '&'==Buffer[0] ) { /* It is a forward */ - fprintf( stderr, "Forward\n" ); strcpy(IsForward, "checked "); strcpy(ForwardAddr, strtok(&Buffer[1], "\n")); } else if (strstr(Buffer, "autorespond")!=NULL ) { /* It is a mail robot */ - fprintf( stderr, "Vacation\n" ); strcpy(IsVacation, "checked "); } else if (strstr(Buffer, "|/bin/true delete")!=NULL ) { /* It is a black hole */ - fprintf( stderr, "Black Hole\n" ); strcpy(IsBlackHole, "checked "); } else if (strstr(Buffer, "#")!=NULL ) { /* It is a better black hole */ - fprintf( stderr, "Better Black Hole\n" ); strcpy(IsBlackHole, "checked "); } else if (strstr(Buffer, "preline")!=NULL ) { /* It is a spam checked simple delivery */ - ... [truncated message content] |
From: <rw...@pr...> - 2004-01-31 11:09:43
|
Update of /cvsroot/qmailadmin/qmailadmin/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27962/lang Modified Files: en Log Message: Last of Rick's big block of changes. See NEWS and TODO for details. Index: en =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/lang/en,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- en 30 Jan 2004 03:28:20 -0000 1.3 +++ en 31 Jan 2004 11:08:00 -0000 1.4 @@ -281,3 +281,4 @@ 313 the address 314 Bad quota supplied 315 User deleted. Unable to set forward to '%s'. +316 Required field missing. |
From: <rw...@pr...> - 2004-01-30 23:31:25
|
Update of /cvsroot/qmailadmin/qmailadmin/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30505/lang Modified Files: en Log Message: Part 1 of big rww patch. See NEWS for details. More to come Index: en =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/lang/en,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- en 10 Oct 2003 03:40:59 -0000 1.2 +++ en 30 Jan 2004 03:28:20 -0000 1.3 @@ -95,7 +95,7 @@ 127 New Forward 128 New Mail Robot 129 New Mailing List -130 CatchAll: Bounced +130 <b>Bounced</b> 131 No users left to view, please return to the previous page 132 Default 133 Index: @@ -201,7 +201,7 @@ 233 No Mail Robots to Display 234 Please enter a password 235 Set catchall email deleted -236 CatchAll: Deleted +236 <b>Deleted</b> 237 Add<br>Digest Subscriber 238 Delete<br>Digest Subscriber 239 Show<br>Digest Subscribers |
Update of /cvsroot/qmailadmin/qmailadmin/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29432 Modified Files: README add_autorespond.html add_forward.html add_listdig.html add_listmod.html add_listuser.html add_mailinglist-idx.html add_mailinglist-no-idx.html add_user.html del_autorespond_confirm.html del_forward_confirm.html del_listdig.html del_listmod.html del_listuser.html del_mailinglist_confirm.html del_user_confirm.html footer.html header.html main_menu.html mod_autorespond.html mod_dotqmail.html mod_mailinglist-idx.html mod_user.html setremotecatchall.html show_autorespond.html show_digest_subscribers.html show_forwards.html show_login.html show_mailinglist.html show_moderators.html show_subscribers.html show_users.html Added Files: menu_user.html mod_autorespond_line.html mod_dotqmail_line.html show_autorespond_line.html show_counts_line.html show_error_line.html show_forwards_line.html show_mailinglist_line.html show_mailinglist_line2.html show_users_line.html table_error_line.html version.html Log Message: Part 1 of big rww patch. See NEWS for details. More to come --- NEW FILE: menu_user.html --- <h2>##S</h2> <table height="464" width="405" cellspacing="0" cellpadding="0" border="0"> <tr> <td> <table height="463" width="199" cellspacing="0" cellpadding="0" border="0" background="##Z/main1.png"> <tr> <td><img src="##Z/pixel.png" height="1" width="1" border="0"></td> </tr> </table> </td> <td> <table height="463" width="206" cellspacing="0" cellpadding="0" border="0" background="##Z/main2.png"> <tr> <td align="left"> <font size="2" color="#000000"><b>##D</b></font><br> <font size="2" color="#ff0000"><b>##X001</b></font><br> <a href="##C/com/moduser?##W&moduser=##A"> <font size="2" color="#000000"><b>##X111 ##A</b></font></a> <br><br> <font size="2" color="#000000"><b>##X249:</b><br> ##X243 ##q qnote? <br>##X254 <br> <br> <br> <br><a href="##C/com/showmenu?user=##U&dom=##D&time=##T&"><font size="2" color="#000000"><b>##X217</b></font></a> <br><span style="font-weight: bold; font-size: medium;">##x</span> <br> </td> </tr> </table> </td> </tr> </table> --- NEW FILE: mod_autorespond_line.html --- <tr> <td align=\"left\"> </td> <td align="center" valign="top"> ##A </td> <td align="center" valign="top"> <form method="post" name="moddotqmail" action="##C/com/moddotqmailnow\"> <input type="hidden" name="user" value="##U"> <input type="hidden" name="dom" value="##D"> <input type="hidden" name="time" value="##T"> <input type="hidden" name="modu" value="##A">\n", <input type="hidden" name="linedata" value="TmpBuf2">\n", <input type="hidden" name="action" value="delentry">\n"); <input type="image" border="0" src="%s/delete.png\">\n", </form> </td> </tr> --- NEW FILE: mod_dotqmail_line.html --- <tr> <td align=\"left\"> </td> <td align="center" valign="top"> ##A </td> <td align="center" valign="top"> <form method="post" name="moddotqmail" action="##C/com/moddotqmailnow\"> <input type="hidden" name="user" value="##U"> <input type="hidden" name="dom" value="##D"> <input type="hidden" name="time" value="##T"> <input type="hidden" name="modu" value="##A">\n", <input type="hidden" name="linedata" value="TmpBuf2">\n", <input type="hidden" name="action" value="delentry">\n"); <input type="image" border="0" src="%s/delete.png\">\n", </form> </td> </tr> --- NEW FILE: show_autorespond_line.html --- <TR> <TD align=center>##uA</TD> <TD align=center>##uB</TD> <TD>##uC</TD> </TR> --- NEW FILE: show_counts_line.html --- ##X061 ##uA<BR> ##X074 ##uB<BR> ##X077 ##uC<BR> ##X061 ##uD<BR> --- NEW FILE: show_error_line.html --- <TR> <TD colspan=##uA>##uB</TD> </TR> --- NEW FILE: show_forwards_line.html --- <TR> <TD>##uA</TD> <TD>##uB</TD> <TD>##uC</TD> <TD>##uD</TD> </TR> --- NEW FILE: show_mailinglist_line.html --- <TR> <TD>##uA</TD> <TD>##uB</TD> <TD>##uC</TD> <TD>##uD</TD> <TD>##uE</TD> <TD>##uF</TD> <TD>##uG</TD> <TD>##uH</TD> <TD>##uI</TD> <TD>##uJ</TD> <TD>##uK</TD> <TD>##uL</TD> </TR> --- NEW FILE: show_mailinglist_line2.html --- <TR> <TD align=right> <INPUT TYPE="checkbox" NAME="subscribe##uA" VALUE="##uB"> </TD> <TD>##uC</TD> </TR> --- NEW FILE: show_users_line.html --- <TR> <TD>##uA</TD> <TD>##uB</TD> <TD align=center>##uC</TD> <TD align=center>##uD</TD> <TD align=center>##uE</TD> <TD align=center>##uF</TD> </TR> --- NEW FILE: table_error_line.html --- <TR> <TD colspan=##f> ##H </TD> </TR> --- NEW FILE: version.html --- <a href="http://sourceforge.net/projects/qmailadmin/">##uA</a> ##uB<BR> <a href="http://www.inter7.com/vpopmail/">##uC</a> ##uD<BR> Index: README =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/README,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- README 2 Jan 2004 05:30:47 -0000 1.2 +++ README 30 Jan 2004 03:27:01 -0000 1.3 @@ -1,24 +1,16 @@ -Information regarding HTML templates and macro substitutions. - -Contributed 12/2003 by Rick Widmer. - -Template substitution values for QmailAdmin Version 1.2.0 ---------------------------------------------------------- +Template substitution values for QmailAdmin Version 1.2.0-rc1 When QmailAdmin encounters ## while parsing a template file, it looks at the following character and replaces ## and the character with the information listed below. -The templates which use each value are listed below each item. - -Tag values H, n, Q, R, r, W, w are not defined in the source code. - -Tag values b, f, h, l, m, N, O are defined in template.c, but never -used in a current template. N isn't used anywhere either, but -it might be handy to use. If the rest are obsolete it may be best -to remove them. +The templates which use each value are listed below each item. But +it has not been updated since I changed template.c. Try a later +version. -Tag value H is not defined in template.c but is used in header.html. +Tag values b, f, H, h, l, m, n, O, Q, R, r, W, w are not defined +in the source code. N isn't used anywhere either, but it might +be handy to use. To see which templates use a particular tag: @@ -58,14 +50,6 @@ ------------------------------------------------------------------------- -##b Show the lines inside a alias table. Calls function - show_dowqmail_lines. - - not used in any current template files. - - -------------------------------------------------------------------------- - ##C Send the CGIPATH. This is frequently used as part of the Action= in forms, and in building URLs for links. (CGIPATH) @@ -121,13 +105,6 @@ ------------------------------------------------------------------------- -##f Show the forwards. Calls show_forwards. - - not used in any template files. - - -------------------------------------------------------------------------- - ##G Show the mailing list Digetst Subscribers. This calls function show_list_group_now(2). @@ -151,14 +128,6 @@ ------------------------------------------------------------------------- -##h Show the counts, not sure which ones... Calls function - show_counts. - - not used in any current templates. - - -------------------------------------------------------------------------- - ##I No comment in source code. Calls function show_dotqmail_file. mod_dotqmail @@ -246,13 +215,6 @@ ------------------------------------------------------------------------- -##l Show the aliases stuff. This calls function show_aliases. - - not used in any current templates. - - -------------------------------------------------------------------------- - ##M Show the mailing list subscribers. The function show_list_group_now is called. @@ -261,14 +223,6 @@ ------------------------------------------------------------------------- -##m Show the mailing lists. The function show_mailing_lists is - called. - - not used in any current templates. - - -------------------------------------------------------------------------- - ##N Parse include files. This is a fairly long section of inline code that either displays a template file doing ## substitution or sometimes displays text string 144. [file permission error] @@ -277,13 +231,6 @@ ------------------------------------------------------------------------- -##n not used. - - not used in any current templates. - - -------------------------------------------------------------------------- - ##O Build a pulldown menu of all POP/IMAP users. This calls function vauth_getall then builds an option tag for each entry returned. <option value=(pw_name)>(pw_name)</option> Index: add_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_autorespond.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_autorespond.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_autorespond.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -47,9 +44,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showautoresponders?user=##U&dom=##D&time=##T&">##X077</a> + <a href="##C/com/showautoresponders?##W">##X077</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -65,5 +62,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> - </body> Index: add_forward.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_forward.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_forward.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_forward.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -56,9 +53,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showforwards?user=##U&dom=##D&time=##T&">##X122</a> + <a href="##C/com/showforwards?##W">##X122</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -75,4 +72,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: add_listdig.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listdig.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_listdig.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listdig.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: add_listmod.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listmod.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_listmod.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listmod.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W>##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: add_listuser.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_listuser.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_listuser.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_listuser.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: add_mailinglist-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_mailinglist-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_mailinglist-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_mailinglist-idx.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,69 +1,70 @@ - </head> - <body bgcolor="#ffffff"> - <center> - <h2>##S</h2> - <!-- Black frame 2 pixels wide --> - <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> + <h2>##S</h2> + <!-- Black frame 2 pixels wide --> + <form method="get" name="addmailinglist" action="##C/com/addmailinglistnow"> + <table cellpadding="2" cellspacing="0" border="0" align="center" + valign="top" width="600" bgcolor="#000000"> + <tr> + <td> <!-- Frame content --> - <table cellpadding="0" cellspacing="0" border="0" align="center" valign="top" width="100%" bgcolor="#ffffff"> - <!-- Form title --> - <tr> + <table cellpadding="0" cellspacing="0" border="0" align="center" + valign="top" width="100%" bgcolor="#ffffff"> + <!-- Form title --> + <tr> <td bgcolor="#000000" align="center"> - <font color="#ffffff" size="3"> - <b>##X015</b> - </font> - </td> - </tr> - <!-- End of form title --> - <!-- Form content --> - <tr> + <font color="#ffffff" size="3"><b>##X015</b></font></td> + </tr> + <!-- End of form title --> + <!-- Form content --> + <tr> <td> - <table cellpadding="5" cellspacing="1" border="0" width="100%"> - <!-- Form fields --> + <table cellpadding="5" cellspacing="1" border="0" width="100%"> + <!-- Form fields --> + <tr> + <td align="left"> + <table cellpadding="0" cellspacing="0" border="0"> <tr> - <td align="left"> - <form method="get" name="addmailinglist" action="##C/com/addmailinglistnow"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td ALIGN=RIGHT><b>##X016</b></td> - <td><input type="text" size=16 name="newu" maxlength="128">@##D</td> - </tr> - <tr> - <td ALIGN=RIGHT><b>##X017</b></td> - <td><input type="text" size=30 name="listowner" maxlength="128"></td> - </tr> - <tr> - <td ALIGN=RIGHT><b>##X256</b></td> - <td><input type="text" size=16 name="prefix" maxlength="128"></td> - </tr> - </table> -<!-- options for the mailing list --> -##E - <input type="hidden" name="user" value="##U"> - <input type="hidden" name="dom" value="##D"> - <input type="hidden" name="time" value="##T"> - <DIV ALIGN=RIGHT><input type="submit" value="##X060" name="##X060"></DIV> - </form> - <div align="right"> - <hr> - <font size="2"><b> - [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> - | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> - | -##x - ] - </b></font> - </div> - </td> + <td ALIGN=RIGHT><b>##X016 </b></td> + <td><input type="text" size="16" name="newu" maxlength="128"></td> </tr> - <!-- End of form fields --> - </table> + <tr> + <td ALIGN=RIGHT><b>##X017</b></td> + <td><input type="text" size=30 name="listowner" maxlength="128"></td> + </tr> + <tr> + <td ALIGN=RIGHT><b>##X256</b></td> + <td><input type="text" size=16 name="prefix" maxlength="128"></td> + </tr> + </table> + <!-- options for the mailing list --> + ##E + <DIV ALIGN=RIGHT> + <input type="submit" value="##X060" name="##X060"> + </DIV> + <div align="right"> + <hr> + <font size="2"><b> + [ + <a href="##C/com/showmailinglists?##W">##X080</a> + | + <a href="##C/com/showmenu?##W">##X001</a> + | + ##x + ] + </b></font> + </div> + </td> + </tr> + <!-- End of form fields --> + </table> </td> - </tr> + </tr> </table> <!-- End of frame content --> - </td></tr></table> - <!-- End of black frame --> - </center> + </td> + </tr> + </table> + <input type="hidden" name="user" value="##U"> + <input type="hidden" name="dom" value="##D"> + <input type="hidden" name="time" value="##T"> + </form> + <!-- End of black frame --> Index: add_mailinglist-no-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_mailinglist-no-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_mailinglist-no-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_mailinglist-no-idx.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,66 +1,68 @@ - </head> - <body bgcolor="#ffffff"> - <center> - <h2>##S</h2> - <!-- Black frame 2 pixels wide --> - <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> + <h2>##S</h2> + <!-- Black frame 2 pixels wide --> + <form method="get" name="addmailinglist" action="##C/com/addmailinglistnow"> + <table cellpadding="2" cellspacing="0" border="0" align="center" + valign="top" width="600" bgcolor="#000000"> + <tr> + <td> <!-- Frame content --> - <table cellpadding="0" cellspacing="0" border="0" align="center" valign="top" width="100%" bgcolor="#ffffff"> - <!-- Form title --> - <tr> + <table cellpadding="0" cellspacing="0" border="0" align="center" + valign="top" width="100%" bgcolor="#ffffff"> + <!-- Form title --> + <tr> <td bgcolor="#000000" align="center"> - <font color="#ffffff" size="3"> - <b>##X015</b> - </font> - </td> - </tr> - <!-- End of form title --> - <!-- Form content --> - <tr> + <font color="#ffffff" size="3"><b>##X015</b></font></td> + </tr> + <!-- End of form title --> + <!-- Form content --> + <tr> <td> - <table cellpadding="5" cellspacing="1" border="0" width="100%"> - <!-- Form fields --> + <table cellpadding="5" cellspacing="1" border="0" width="100%"> + <!-- Form fields --> + <tr> + <td align="left"> + <table cellpadding="0" cellspacing="0" border="0"> <tr> - <td align="left"> - <form method="get" name="addmailinglist" action="##C/com/addmailinglistnow"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td align=right><b>##X016 </b></td> - <td><input type="text" size="30" name="newu" maxlength="128"></td> - </tr> - <tr> - <td align="left" colspan=2><INPUT TYPE=CHECKBOX NAME="opt14" VALUE="a" CHECKED> ##X018</td> - </tr> - <tr> - <td align="left" colspan=2><input type=checkbox name="opt8" value="p" - checked> ##X039</td> - </tr> - </table> - <input type="hidden" name="user" value="##U"> - <input type="hidden" name="dom" value="##D"> - <input type="hidden" name="time" value="##T"> - <input type="submit" value="##X060" name="##X060"> - </form> - <div align="right"> - <hr> - <font size="2"><b> - [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> - | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> - | -##x - ] - </b></font> - </div> - </td> + <td ALIGN=RIGHT><b>##X016 </b></td> + <td><input type="text" size="16" name="newu" maxlength="128"></td> </tr> - <!-- End of form fields --> - </table> + <tr> + <td align="left" colspan=2> + <INPUT TYPE=CHECKBOX NAME="opt14" VALUE="a" CHECKED> ##X018 + </td> + </tr> + <tr> + <td align="left" colspan=2> + <input type=checkbox name="opt8" value="p" checked> ##X039 + </td> + </tr> + </table> + <div align="right"> + <input type="submit" value="##X060" name="##X060"> + <hr> + <font size="2"><b> + [ + <a href="##C/com/showmailinglists?##W">##X080</a> + | + <a href="##C/com/showmenu?##W">##X001</a> + | + ##x + ] + </b></font> + </div> + </td> + </tr> + <!-- End of form fields --> + </table> </td> - </tr> + </tr> </table> <!-- End of frame content --> - </td></tr></table> - <!-- End of black frame --> - </center> + </td> + </tr> + </table> + <input type="hidden" name="user" value="##U"> + <input type="hidden" name="dom" value="##D"> + <input type="hidden" name="time" value="##T"> + </form> + <!-- End of black frame --> Index: add_user.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/add_user.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- add_user.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ add_user.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,87 +1,131 @@ - </head> - <body bgcolor="#ffffff"> - <center> - <h2>##S</h2> - <!-- Black frame 2 pixels wide --> - <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> - <!-- Frame content --> - <table cellpadding="0" cellspacing="0" border="0" align="center" valign="top" width="100%" bgcolor="#ffffff"> - <!-- Form title --> - <tr> + <h2>##S</h2> + <!-- Black frame 2 pixels wide --> + <form method="post" name="logon" action="##C/com/addusernow"> + + <table cellpadding="2" cellspacing="0" border="0" align="center" + valign="top" width="600" bgcolor="#000000"> + <tr> + <td> + <!-- Frame content --> + <table cellpadding="0" cellspacing="0" border="0" align="center" + valign="top" width="100%" bgcolor="#ffffff"> + <!-- Form title --> + <tr> <td bgcolor="#000000" align="center"> - <font color="#ffffff" size="3"> + <font color="#ffffff" size="3"> <b>##X090</b> - </font> + </font> </td> - </tr> - <!-- End of form title --> - <!-- Form content --> - <tr> + </tr> + <!-- End of form title --> + <!-- Form content --> + <tr> <td> - <table cellpadding="5" cellspacing="1" border="0" width="100%"> - <!-- Form fields --> + <table cellpadding="5" cellspacing="1" border="0" width="100%"> + <!-- Form fields --> + <tr> + <td> + <table cellpadding="0" cellspacing="0" border="0"> <tr> - <td> - <form method="post" name="logon" action="##C/com/addusernow"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td align=right><b>##X002: </b></td> - <td align="left"><input type="text" size="16" name="newu" maxlength="128">@##D</td> - </tr> + <td align=right><b>##X002: </b></td> + <td align="left"> + <input type="text" size="16" name="newu" maxlength="128">@##D + </td> + </tr> ##tq - <tr> - <td align=right><b>##X249: </b></td> - <td align="left"><input type="text" size="16" name="quota" maxlength="128"> ##X251</td> - </tr> + <tr> + <td align=right><b>##X249: </b></td> + <td align="left"> + <input type="text" size="16" name="quota" maxlength="128"> ##X251 + </td> + </tr> ##tt - <tr> - <td align=right><b>##X057: </b></td> - <td align="left"><input type="password" size="16" name="password1" maxlength="128"></td> - </tr> - <tr> - <td align=right><b>##X091 </b></td> - <td align="left"><input type="password" size="16" name="password2" maxlength="128"></td> - </tr> - <tr> - <td align=right><b>##X092: </b></td> - <td align="left"><input type="text" size="32" name="gecos" maxlength="128"></td> - </tr> + <tr> + <td align=right><b>##X057: </b></td> + <td align="left"> + <input type="password" size="16" name="password1" maxlength="128"> + </td> + </tr> + + <tr> + <td align=right><b>##X091 </b></td> + <td align="left"> + <input type="password" size="16" name="password2" maxlength="128"> + </td> + </tr> + + <tr> + <td align=right><b>##X092: </b></td> + <td align="left"> + <input type="text" size="32" name="gecos" maxlength="128"> + </td> + </tr> ##ts - <tr> - <td align=right><b>##X304</b></td> - <td> - <input type="checkbox" name="spamcheck"> - </td> - </tr> + + <tr> + <td align=right><b>##X304</b></td> + <td> + <input type="checkbox" name="spamcheck"> + </td> + </tr> + </table> + </table> + ##tt - </table> - ##c - <input type="hidden" name="do.login" value="Add"> - <input type="hidden" name="user" value="##U"> - <input type="hidden" name="dom" value="##D"> - <input type="hidden" name="time" value="##T"> - <input type="submit" value="##X060" name="##X060"> - </form> - <div align="right"> - <hr> - <font size="2"><b> - [ - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&">##X061</a> - | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> - | -##x - ] - </b></font> - </div> - </td> + +<!-- Need a conditional ##T for are there mailing lists here --> + + <tr> + <td colspan=2> + <BR> + <table width=100% cellpadding=1 cellspacing=0 border=0 + align=center bgcolor="#FFFFFF"> + <tr bgcolor="#000000"> + <th> + <font color="#ffffff">##X095</font> + </th> </tr> - <!-- End of form fields --> - </table> + </table> + + <table width=100% cellpadding=0 cellspacing=0 border=0 + bgcolor="#e6e6e6"> + ##c + </table> + </TD> + </TR> + +<!-- end conditional here --> + + <tr> + <td align=right> + <div align="right"> + <hr> + <font size="2"><b> + [ + <a href="##C/com/showusers?##W">##X061</a> + | + <a href="##C/com/showmenu?##W">##X001</a> + | + ##x + ] + </b></font> + </div> + </td> + </tr> + <!-- End of form fields --> + </table> </td> - </tr> + </tr> </table> <!-- End of frame content --> - </td></tr></table> - <!-- End of black frame --> - </center> + </td> + </tr> + </table> + <!-- End of black frame --> + + <input type="hidden" name="do.login" value="Add"> + <input type="hidden" name="user" value="##U"> + <input type="hidden" name="dom" value="##D"> + <input type="hidden" name="time" value="##T"> + <input type="submit" name="Add" value="##X060"> + </form> Index: del_autorespond_confirm.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_autorespond_confirm.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_autorespond_confirm.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_autorespond_confirm.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -35,9 +32,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showautoresponders?user=##U&dom=##D&time=##T&">##X077</a> + <a href="##C/com/showautoresponders?##W">##X077</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -53,4 +50,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_forward_confirm.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_forward_confirm.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_forward_confirm.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_forward_confirm.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -35,9 +32,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showforwards?user=##U&dom=##D&time=##T&">##X122</a> + <a href="##C/com/showforwards?##W">##X122</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -53,4 +50,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_listdig.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_listdig.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_listdig.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_listdig.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_listmod.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_listmod.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_listmod.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_listmod.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_listuser.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_listuser.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_listuser.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_listuser.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -40,9 +37,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -58,4 +55,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_mailinglist_confirm.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_mailinglist_confirm.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_mailinglist_confirm.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_mailinglist_confirm.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -35,9 +32,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -53,4 +50,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: del_user_confirm.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/del_user_confirm.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- del_user_confirm.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ del_user_confirm.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -42,9 +39,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&">##X061</a> + <a href="##C/com/showusers?##W">##X061</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -60,4 +57,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: footer.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/footer.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- footer.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ footer.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,2 +1,7 @@ - </body> -</html> +</TD></TR> +</TABLE> +<HR width=100%> +(C) now - me<BR> +##V +</BODY> +</HTML> Index: header.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/header.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- header.html 2 Jan 2004 05:34:05 -0000 1.2 +++ header.html 30 Jan 2004 03:27:01 -0000 1.3 @@ -1,6 +1,34 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRansitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> - <head> +<head> <title>QmailAdmin ##D</title> <meta http-equiv="content-type" content="text/html; charset=##X000"> <meta name="robots" content="noindex,follow"> + <style type="text/css"> + <!-- a {color: black;} --> + </style> + <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> + <META HTTP-EQUIV="Expires" CONTENT="Thu, 1 Jan 1970 00:00:00 GMT"> +</head> + + <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" + VLINK="#0000FF" ALINK="#FF0000" > + +<center><H1>QmailAdmin - ##D</H1></center> +<HR width=100%> +<table border=0 width=100% cellpadding=5> +<TR><TD width=15% bgcolor="#FFC0C0" valign=top> + +<BR><BR> + +<A Href="http://www.developersdesk.com/">Home Page</a><BR> +<A Href=""></a><BR> +<A Href="http://piemur.developersdesk.com/">Email Management</a><BR> +<A Href="/subscribe/">Mailing Lists</a><BR> +<A Href="http://piemur.developersdesk.com/cgi-bin/qmailadmin/?user=postmaster&dom=developersdesk.com">Administration</a><BR> +<A Href="http://piemur.developersdesk.com/mailadmin/index.php">My Admin</a><BR> +<A Href="/cgi-bin/sqwebmail/">Webmail</a><BR> + +</TD><TD width=5% bgcolor="#C0C000"> + +</TD><TD width=80% align=center valign=top> Index: main_menu.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/main_menu.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- main_menu.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ main_menu.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,11 +1,3 @@ -<style type="text/css"> -<!-- -a {color: black;} ---> -</style> - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <table height="464" width="405" cellspacing="0" cellpadding="0" border="0"> <tr> @@ -20,11 +12,41 @@ <table height="463" width="206" cellspacing="0" cellpadding="0" border="0" background="##Z/main2.png"> <tr> <td align="left"> - ##v + + <font size="2" color="#000000"><b>##D</b></font><br> + <font size="2" color="#ff0000"><b>##X001</b></font><br> + + <a href="##C/com/showusers?##W"> + <font size="2" color="#000000"><b>##X061</b></font></a><br> + + <a href="##C/com/showforwards?##W"> + <font size="2" color="#000000"><b>##X122</b></font></a><br> + + <a href="##C/com/showautoresponders?##W"> + <font size="2" color="#000000"><b>##X077</b></a></font><br> + + <a href="##C/com/showmailinglists?##W"> + <font size="2" color="#000000"><b>##X080</b></font></a><br> + + <br> + <font size="2" color="#ff0000"><b>##X124</b></font><br> + + <a href="##C/com/adduser?##W"> + <font size="2" color="#000000"><b>##X125</b></font></a><br> + + <a href="##C/com/adddotqmail?atype=forward&##W"> + <font size="2" color="#000000"><b>##X127</b></font></a><br> + + <a href="##C/com/addautorespond?##W"> + <font size="2" color="#000000"><b>##X128</b></a></font><br> + + <a href="##C/com/addmailinglist?##W"> + <font size="2" color="#000000"><b>##X129</b></font></a><br> + <br> <br> <br> - <br><a href="##C/com/showmenu?user=##U&dom=##D&time=##T&"><font size="2" color="#000000"><b>##X217</b></font></a> + <br><a href="##C/com/showmenu?##W"><font size="2" color="#000000"><b>##X217</b></font></a> <br><span style="font-weight: bold; font-size: medium;">##x</span> <br> </td> @@ -33,4 +55,3 @@ </td> </tr> </table> - </center> Index: mod_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_autorespond.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mod_autorespond.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_autorespond.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,64 +1,89 @@ - </head> - <body bgcolor="#ffffff"> - <center> - <h2>##S</h2> - <!-- Black frame 2 pixels wide --> - <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> + <h2>##S</h2> + <!-- Black frame 2 pixels wide --> + <form method="post" name="modautorespond" action="##C/com/modautorespondnow"> + <table cellpadding="2" cellspacing="0" border="0" align="center" + valign="top" width="600" bgcolor="#000000"> + <tr> + <td> <!-- Frame content --> - <table cellpadding="0" cellspacing="0" border="0" align="center" valign="top" width="100%" bgcolor="#ffffff"> - <!-- Form title --> - <tr> + <table cellpadding="0" cellspacing="0" border="0" align="center" + valign="top" width="100%" bgcolor="#ffffff"> + <!-- Form title --> + <tr> <td bgcolor="#000000" align="center"> - <font color="#ffffff" size="3"> - <b>##X105</b> - </font> + <font color="#ffffff" size="3"><b>##X105</b></font> </td> - </tr> - <!-- End of form title --> - <!-- Form content --> - <tr> + </tr> + <!-- End of form title --> + <!-- Form content --> + <tr> <td> - <table cellpadding="5" cellspacing="1" border="0" width="100%"> - <!-- Form fields --> + <table cellpadding="5" cellspacing="1" border="0" width="100%"> + <!-- Form fields --> + <tr> + <td> + <table cellpadding="0" cellspacing="0" border="0" width="95%"> <tr> - <td> - <form method="post" name="modautorespond" action="##C/com/modautorespondnow"> - <table cellpadding="0" cellspacing="0" border="0"> - <tr> - <td align=right><b>##X004</b> </td> - <td>##A@##D</td> - </tr> - <tr> - <td align=right><b>##X005</b> </td> - <td><input type="text" size="40" name="owner" maxlength="128" ##F</td> - </tr> - </table> - <input type="hidden" name="newu" value="##A"> - <input type="hidden" name="user" value="##U"> - <input type="hidden" name="dom" value="##D"> - <input type="hidden" name="time" value="##T"> - <input type="submit" name="do.login" value="##X105"> - </form> - <div align="right"> - <hr> - <font size="2"><b> - [ - <a href="##C/com/showautoresponders?user=##U&dom=##D&time=##T&">##X077</a> - | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> - | -##x - ] - </b></font> - </div> - </td> + <td align=right><b>##X004</b> </td> + <td>##A@##D</td> + <td rowspan=3 align=center valign=bottom> + <input type="submit" name="do.login" value="##X105"> + </TD> </tr> - <!-- End of form fields --> - </table> + <tr> + <td align=right><b>##X005</b> </td> + <td> + <input type="text" size="40" name="owner" maxlength="128" value="##uA"> + </td> + </tr> + <tr> + <td align=right><b>##X006</b> </td> + <td> + <input type="text" size=40 name="alias" maxlength=128 value="##uB"> + </td> + </tr> + </table> + </TD> + </TR> + + <tr> + <td colspan=2 align=center> + <b>Message to send</b> + <textarea cols=80 rows=40 name="message"> +##F +</textarea> + </td> + </TR> + + + + <TR> + <TD> + <div align="right"> + <hr> + <font size="2"><b> + [ + <a href="##C/com/showautoresponders?##W">##X077</a> + | + <a href="##C/com/showmenu?##W">##X001</a> + | + ] + </b></font> + </div> + </td> + </tr> + <!-- End of form fields --> + </table> </td> - </tr> + </tr> </table> <!-- End of frame content --> - </td></tr></table> - <!-- End of black frame --> - </center> + </td> + </tr> + </table> + <input type="hidden" name="newu" value="##A"> + <input type="hidden" name="user" value="##U"> + <input type="hidden" name="dom" value="##D"> + <input type="hidden" name="time" value="##T"> + </form> + <!-- End of black frame --> Index: mod_dotqmail.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_dotqmail.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mod_dotqmail.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_dotqmail.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -24,6 +21,11 @@ <th>##X305</th> <th>##X072</th> </tr> + <tr> + <td align="center" valign="top"> + <b>##A</b> + </td> + ##I </table> <table cellpadding="5" cellspacing="1" border="0" width="100%"> @@ -55,11 +57,11 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showforwards?user=##U&dom=##D&time=##T&">##X122</a> + <a href="##C/com/showforwards?##W">##X122</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | -##x + ##x ] </b></font> </div> @@ -73,4 +75,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: mod_mailinglist-idx.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_mailinglist-idx.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mod_mailinglist-idx.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_mailinglist-idx.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,8 +1,3 @@ - <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> - <META HTTP-EQUIV="Expires" CONTENT="Thu, 1 Jan 1970 00:00:00 GMT"> - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -47,9 +42,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -65,4 +60,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: mod_user.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/mod_user.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- mod_user.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ mod_user.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,5 +1,3 @@ - </head> - <body bgcolor="#ffffff"> <script type="text/javascript"> <!-- @@ -218,13 +216,11 @@ <hr> <font size="2"><b> [ -##ta - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&">##X061</a> + <a href="##C/com/showusers?##W">##X061</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | -##tt -##x + ##x ] </b></font> </div> @@ -235,4 +231,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: setremotecatchall.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/setremotecatchall.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- setremotecatchall.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ setremotecatchall.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -38,9 +35,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showusers?user=##U&dom=##D&time=##T&">##X061</a> + <a href="##C/com/showusers?##W">##X061</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -56,4 +53,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: show_autorespond.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_autorespond.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- show_autorespond.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ show_autorespond.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -33,9 +30,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/addautorespond?user=##U&dom=##D&time=##T">##X079</a> + <a href="##C/com/addautorespond?##W">##X079</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -50,4 +47,3 @@ </table> <!-- End of black frame --> </tr></td></table> - </center> Index: show_digest_subscribers.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_digest_subscribers.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- show_digest_subscribers.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ show_digest_subscribers.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,6 +1,3 @@ - </head> - <body bgcolor="#ffffff"> - <center> <h2>##S</h2> <!-- Black frame 2 pixels wide --> <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> @@ -34,9 +31,9 @@ <hr> <font size="2"><b> [ - <a href="##C/com/showmailinglists?user=##U&dom=##D&time=##T&">##X080</a> + <a href="##C/com/showmailinglists?##W">##X080</a> | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> + <a href="##C/com/showmenu?##W">##X001</a> | ##x ] @@ -52,4 +49,3 @@ <!-- End of frame content --> </td></tr></table> <!-- End of black frame --> - </center> Index: show_forwards.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_forwards.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- show_forwards.html 10 Sep 2003 21:38:44 -0000 1.1.1.1 +++ show_forwards.html 30 Jan 2004 03:27:01 -0000 1.2 @@ -1,55 +1,74 @@ - </head> - <body bgcolor="#ffffff"> - <center> - <h2>##S</h2> - <!-- Black frame 2 pixels wide --> - <table cellpadding="2" cellspacing="0" border="0" align="center" valign="top" width="600" bgcolor="#000000"><tr><td> + <h2>##S</h2> + <!-- Black frame 2 pixels wide --> + <table cellpadding="2" cellspacing="0" border="0" align="center" + valign="top" width="600" bgcolor="#000000"> + <tr> + <td> <!-- Frame content --> - <table cellpadding=3 cellspacing=0 border=0 align=center valign=top width=100% bgcolor="#ffffff"> - <!-- Form title --> - <tr bgcolor="#000000" valign=center> - <td align=left><font color="#ffffff" size=3><B>##D</B></FONT></td> - <td align=center><font color="#ffffff" size=3><B>##X074</B></FONT></td> - <td align=right><font color="#ffffff" size=3><b>[##X254 ##k]</b></FONT></td> - </tr> - <!-- End of form title --> - <!-- Form content --> - <tr> + <table cellpadding=3 cellspacing=0 border=0 align=center + valign=top width=100% bgcolor="#ffffff"> + <!-- Form title --> + <tr bgcolor="#000000" valign=center> + <td align=left> + <font color="#ffffff" size=3><B>##D</B></FONT> + </td> + <td align=center> + <font color="#ffffff" size=3><B>##X074</B></FONT> + </td> + <td align=right> + <font color="#ffffff" size=3><b>[##X254 ##k]</b></FONT> + </td> + </tr> + <!-- End of form title --> + <!-- Form content --> + <tr> <td bgcolor="#ffffff" align="center" width="100%" colspan=3> - <table cellpadding="5" cellspacing="0" border="0" align="center" width="100%"> - <!-- Form fields --> + <table cellpadding="5" cellspacing="0" border="0" align="center" width="100%"> + <!-- Form fields --> + <tr> + <td width="100%"> + <table cellpadding="1" cellspacing="0" border="0" align="center" width="100%"> + <tr bgcolor="#cccccc"> + <th align="center" width=50><font size="2">##X072</font></th> + <th align="center" width=50><font size="2">##X071</font></th> + <th align="left"><font size="2">##X106</font></th> + <th align="left"><font size="2">##X305</font></th> + </tr> + <!-- Inserts a four columns row --> + ##d <tr> - <td width="100%"> - <table cellpadding="1" cellspacing="0" border="0" align="center" width="100%"> - <tr bgcolor="#cccccc"> - <th align="center" width=50><font size="2">##X072</font></th> - <th align="center" width=50><font size="2">##X071</font></th> - <th align="left"><font size="2">##X106</font></th> - <th align="left"><font size="2">##X305</font></th> - </tr> - <!-- Inserts a four columns row --> - ##d - </table> - <div align="right"> - <hr> - <font size="2"><b> - [ - <a href="##C/com/adddotqmail?atype=forward&user=##U&dom=##D&time=##T">##X076</a> - | - <a href="##C/com/showmenu?user=##U&dom=##D&time=##T&">##X001</a> - | -##x - ] - </b></font> + <td align="right" colspan="4"> + [ + <a href="##C/com/showforwards?##W">##X135</a> + | + <a href="##C/com/showforwards?##W">##X136</a> + | + <a href="##C/com/showforwards?##W">##X137</a> + ] + </td> + </tr> + </table> + <div align="right"> + <hr> + <font size="2"><b> + [ + <a href="##C/com/adddotqmail?atype=forward&##W">##X076</a> + | + <a href="##C/com/showmenu?##W">##X001</a> + | + ##x + ] + </b></font> </div> - </td> + </td> </tr> <!-- End of form fields --> - </table> + </table> </td> - </tr> + </tr> </table> <!-- End of frame content --> - </td></tr></table> - <!-- End of black frame --> - </center> + </td> + </tr> + </table> + <!-- End of black frame --> Index: show_login.html =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/html/show_login.html,v retrieving revision 1.1.1.1 retrieving revision 1.... [truncated message content] |
From: <rw...@pr...> - 2004-01-30 22:04:13
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27610 Modified Files: NEWS alias.c auth.c autorespond.c command.c configure forward.c mailinglist.c qmailadmin.c qmailadminx.h show.c template.c user.c util.c Log Message: Big changes part 3. See NEWS for details Index: NEWS =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 30 Jan 2004 06:45:08 -0000 1.3 +++ NEWS 30 Jan 2004 08:30:58 -0000 1.4 @@ -11,6 +11,18 @@ ################################################################# +Changes from 040109 : + +Change from global TmpBuf* to function local Buffer* + +Start using more parms instead of globals. + +Remove some authentication checking deep within the program +because the limits will be enforced in command.c instead. + + +################################################################# + Changes from 040108 : Remove show_aliases from alias.c. (obsolete) Index: alias.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/alias.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- alias.c 30 Jan 2004 06:45:08 -0000 1.6 +++ alias.c 30 Jan 2004 08:30:58 -0000 1.7 @@ -49,7 +49,9 @@ DIR *mydir; struct dirent *mydirent; FILE *fs; - char Buffer[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; char alias_user[MAX_BUFF]; char alias_name[MAX_FILE_NAME]; char *alias_domain; @@ -110,9 +112,9 @@ alias_name[j] = mydirent->d_name[i] == ':' ? '.' : mydirent->d_name[i]; } alias_name[j] = 0; - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - fgets(TmpBuf2, sizeof(TmpBuf2), fs); - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + memset(Buffer2, 0, sizeof(Buffer2)); + fgets(Buffer2, sizeof(Buffer2), fs); + alias_name_from_command = dotqmail_alias_command(Buffer2); /* Note that the current system fails for multi-line .qmail-user files where the first line starts with a '#' or is invalid. @@ -120,33 +122,33 @@ on program delivery that contains ezmlm) but bad for people who may have complex .qmail-user files that start with a comment. */ - if ( alias_name_from_command != NULL || *TmpBuf2 == '#') { + if ( alias_name_from_command != NULL || *Buffer2 == '#') { stop=0; qmail_button(uBufA, "deldotqmail", alias_name, "trash.png"); - if (*TmpBuf2 == '#') + if (*Buffer2 == '#') strcpy( uBufB, " "); else qmail_button(uBufB, "moddotqmail", alias_name, "modify.png"); sprintf(uBufC, "%s", alias_name); - if (*TmpBuf2 == '#') { + if (*Buffer2 == '#') { /* this is a blackhole account */ - sprintf (Buffer, "%s", get_html_text("303")); + sprintf (Buffer1, "%s", get_html_text("303")); stop = 1; } while (!stop) { - strcpy(Buffer, ""); + strcpy(Buffer1, ""); - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + alias_name_from_command = dotqmail_alias_command(Buffer2); /* check to see if it is an invalid line , * if so skip to next */ if (alias_name_from_command == NULL ) { - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs)==NULL) { + if (fgets(Buffer2, sizeof(Buffer2), fs)==NULL) { stop=1; } continue; @@ -160,11 +162,11 @@ alias_domain++; if(strcmp(alias_domain, Domain)==0) { /* if a local user, exclude the domain */ - strcpy(TmpBuf3, alias_user); - for(j=0; TmpBuf3[j]!=0 && TmpBuf3[j]!='@';j++); - TmpBuf3[j]=0; - if (check_local_user(TmpBuf3)) { - strcpy(alias_user, TmpBuf3); + strcpy(Buffer3, alias_user); + for(j=0; Buffer3[j]!=0 && Buffer3[j]!='@';j++); + Buffer3[j]=0; + if (check_local_user(Buffer3)) { + strcpy(alias_user, Buffer3); } else { /* make it red so it jumps out -- this is no longer a valid forward */ sprintf(alias_user, "<font color=\"red\">%s</font>", @@ -172,16 +174,16 @@ } } - if (fgets(TmpBuf2, sizeof(TmpBuf2), fs) == NULL) { + if (fgets(Buffer2, sizeof(Buffer2), fs) == NULL) { stop=1; - sprintf(Buffer, "%s%s ", Buffer, alias_user); + sprintf(Buffer1, "%s%s ", Buffer1, alias_user); } else { - sprintf(Buffer, "%s%s, ", Buffer, alias_user); + sprintf(Buffer1, "%s%s, ", Buffer1, alias_user); } } - strcpy(uBufD, Buffer); - strcpy(Buffer, ""); + strcpy(uBufD, Buffer1); + strcpy(Buffer1, ""); send_template_now("show_forwards_line.html"); } fclose(fs); @@ -208,6 +210,8 @@ char *alias_domain; char *alias_name_from_command; char *dot_file; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; int l,j; if ( AdminType!=DOMAIN_ADMIN ) { @@ -230,10 +234,10 @@ return(144); } - memset(TmpBuf2, 0, sizeof(TmpBuf2)); + memset(Buffer2, 0, sizeof(Buffer2)); - while (fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + while (fgets( Buffer2, sizeof(Buffer2), fs) != NULL) { + alias_name_from_command = dotqmail_alias_command(Buffer2); /* check to see if it is an invalid line , if so skip to next*/ if (alias_name_from_command == NULL ) continue; @@ -246,11 +250,11 @@ alias_domain++; if(strcmp(alias_domain, Domain)==0) { /* if a local user, exclude the domain */ - strcpy(TmpBuf3, alias_user); - for(j=0; TmpBuf3[j]!=0 && TmpBuf3[j]!='@';j++); - TmpBuf3[j]=0; - if (check_local_user(TmpBuf3)) { - strcpy(alias_user, TmpBuf3); + strcpy(Buffer3, alias_user); + for(j=0; Buffer3[j]!=0 && Buffer3[j]!='@';j++); + Buffer3[j]=0; + if (check_local_user(Buffer3)) { + strcpy(alias_user, Buffer3); } else { /* make it red so it jumps out -- this is no longer a valid forward */ sprintf(alias_user, "<font color=\"red\">%s</font>", @@ -265,6 +269,7 @@ FILE *fs; char *alias_name_from_command; char *dot_file; + char Buffer[MAX_BUFF]; int l,j; l = strlen(user); @@ -283,8 +288,8 @@ } j=0; - while( fgets( TmpBuf2, sizeof(TmpBuf2), fs) != NULL ) { - alias_name_from_command = dotqmail_alias_command(TmpBuf2); + while( fgets( Buffer, sizeof(Buffer), fs) != NULL ) { + alias_name_from_command = dotqmail_alias_command(Buffer); /* check to see if it is an invalid line , if so skip to next */ if (alias_name_from_command == NULL ) continue; @@ -299,17 +304,19 @@ -moddotqmail() +void moddotqmail() { + if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); vclose(); exit(0); } + send_template("mod_dotqmail.html"); } -moddotqmailnow() +void moddotqmailnow() { struct vqpasswd *pw; @@ -371,6 +378,7 @@ adddotqmailnow() { + char Buffer[MAX_BUFF]; struct vqpasswd *pw; if (AdminType!=DOMAIN_ADMIN && @@ -401,6 +409,8 @@ } int adddotqmail_shared(char *forwardname, char *dest, int create) { + char Buffer[MAX_BUFF]; + /* adds line to .qmail for forwardname to dest */ /* (if create is 0, this is modifying an existing forward) */ /* returns -1 if error orccured, 0 if successful */ @@ -439,8 +449,8 @@ return(-1); } - sprintf(TmpBuf2, "&%s\n", dest); - if (dotqmail_add_line(forwardname, TmpBuf2)) { + sprintf(Buffer, "&%s\n", dest); + if (dotqmail_add_line(forwardname, Buffer)) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 2); return(-1); } Index: auth.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/auth.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- auth.c 30 Jan 2004 03:28:19 -0000 1.4 +++ auth.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -41,6 +41,8 @@ time_t time1; time_t time2; char ip_value[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if( chdir(RealDir) < 0 ){ sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir); @@ -49,9 +51,9 @@ exit(0); } - sprintf(TmpBuf1, "%s/Maildir/%s.qw", pw->pw_dir, Time); + sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); - fs = fopen(TmpBuf1, "r"); + fs = fopen(Buffer1, "r"); if ( fs == NULL ) { sprintf(StatusMessage, "%s\n", get_html_text("172")); show_login(); @@ -59,7 +61,7 @@ exit(0); } - if ( fgets(TmpBuf, sizeof(TmpBuf), fs) == NULL ) { + if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 4); vclose(); exit(0); @@ -67,9 +69,9 @@ fclose(fs); #ifdef IPAUTH - GetValue(TmpBuf, ip_value, "ip_addr=", sizeof(ip_value)); + GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage,"invalid\n"); show_login(); vclose(); @@ -79,7 +81,7 @@ time1 = atoi(Time); time2 = time(NULL); if ( time2 > time1 + 7200 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage, "%s\n", get_html_text("173")); show_login(); vclose(); @@ -95,6 +97,8 @@ time_t time1; time_t time2; char ip_value[MAX_BUFF]; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( chdir(RealDir) < 0 ) { sprintf(StatusMessage, "%s %s\n", get_html_text("171"), RealDir ); @@ -103,9 +107,9 @@ exit(0); } - sprintf(TmpBuf1, "%s/Maildir/%s.qw", pw->pw_dir, Time); + sprintf(Buffer1, "%s/Maildir/%s.qw", pw->pw_dir, Time); - fs = fopen(TmpBuf1, "r"); + fs = fopen(Buffer1, "r"); if ( fs == NULL ) { sprintf(StatusMessage, "%s\n", get_html_text("172")); show_login(); @@ -113,7 +117,7 @@ exit(0); } - if ( fgets(TmpBuf, sizeof(TmpBuf), fs) == NULL ) { + if ( fgets(Buffer2, sizeof(Buffer2), fs) == NULL ) { sprintf(StatusMessage, "%s %d\n", get_html_text("150"), 5); vclose(); exit(0); @@ -121,10 +125,10 @@ fclose(fs); #ifdef IPAUTH - GetValue(TmpBuf, ip_value, "ip_addr=", sizeof(ip_value)); + GetValue(Buffer2, ip_value, "ip_addr=", sizeof(ip_value)); if ( strcmp(ip_addr, ip_value) != 0 ) { - unlink(TmpBuf1); - sprintf(StatusMessage, "%s %d (%s != %s .. %s)\n", get_html_text("150"), 6, ip_addr, ip_value, TmpBuf); + unlink(Buffer1); + sprintf(StatusMessage, "%s %d (%s != %s .. %s)\n", get_html_text("150"), 6, ip_addr, ip_value, Buffer2); show_login(); vclose(); exit(0); @@ -133,7 +137,7 @@ time1 = atoi(Time); time2 = time(NULL); if ( time2 > time1 + 7200 ) { - unlink(TmpBuf1); + unlink(Buffer1); sprintf(StatusMessage, "%s\n", get_html_text("173")); show_login(); vclose(); Index: autorespond.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/autorespond.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- autorespond.c 30 Jan 2004 06:45:08 -0000 1.5 +++ autorespond.c 30 Jan 2004 08:30:58 -0000 1.6 @@ -56,6 +56,7 @@ struct dirent *mydirent; FILE *fs; char *addr; + char Buffer[MAX_BUFF]; int i,j; if ( (mydir = opendir(".")) == NULL ) { @@ -75,10 +76,10 @@ continue; } - fgets( TmpBuf2, sizeof(TmpBuf2), fs); + fgets( Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "autorespond") != 0 ) { + if ( strstr( Buffer, "autorespond") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); } } @@ -123,6 +124,8 @@ FILE *fs; int i; struct vqpasswd *vpw; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -184,21 +187,21 @@ /* * Make the autorespodner directory */ - memset(TmpBuf2,0,sizeof(TmpBuf2)); - strncpy(TmpBuf2, ActionUser, sizeof(TmpBuf2)); - upperit(TmpBuf2); - mkdir(TmpBuf2, 0750); + memset(Buffer2,0,sizeof(Buffer2)); + strncpy(Buffer2, ActionUser, sizeof(Buffer2)); + upperit(Buffer2); + mkdir(Buffer2, 0750); /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; + sprintf(Buffer1, ".qmail-%s", ActionUser); + for(i=6;Buffer1[i]!=0;++i) if ( Buffer1[i] == '.' ) Buffer1[i] = ':'; - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", - AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); + AUTORESPOND_PATH, RealDir, Buffer2, RealDir, Buffer2); if ( strlen(Newu) > 0 ) { fprintf(fs, "&%s\n", Newu); @@ -208,8 +211,8 @@ /* * Make the autoresponder message file */ - sprintf(TmpBuf, "%s/message", TmpBuf2); - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, "%s/message", Buffer2); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "From: %s@%s\n", ActionUser,Domain); fprintf(fs, "Subject: %s\n\n", Alias); fprintf(fs, "%s", Message); @@ -238,6 +241,8 @@ { int i; int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -246,22 +251,22 @@ } for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]=='.') ActionUser[i] = ':'; - sprintf(TmpBuf2, ".qmail-%s", ActionUser); - if ( unlink(TmpBuf2) != 0 ) ack( get_html_text("181"), 345); + sprintf(Buffer2, ".qmail-%s", ActionUser); + if ( unlink(Buffer2) != 0 ) ack( get_html_text("181"), 345); - memset(TmpBuf2,0,sizeof(TmpBuf2)); + memset(Buffer2,0,sizeof(Buffer2)); for(i=0;ActionUser[i]!=0;++i) { if(islower(ActionUser[i])) { - TmpBuf2[i]=toupper(ActionUser[i]); + Buffer2[i]=toupper(ActionUser[i]); } else { - TmpBuf2[i]=ActionUser[i]; + Buffer2[i]=ActionUser[i]; } } - for(i=0;TmpBuf2[i]!=0;++i) if (TmpBuf2[i]==':') TmpBuf2[i] = '.'; + for(i=0;Buffer2[i]!=0;++i) if (Buffer2[i]==':') Buffer2[i] = '.'; for(i=0;ActionUser[i]!=0;++i) if (ActionUser[i]==':') ActionUser[i] = '.'; - sprintf(TmpBuf, "%s/%s", RealDir, TmpBuf2); - vdelfiles(TmpBuf); + sprintf(Buffer1, "%s/%s", RealDir, Buffer2); + vdelfiles(Buffer1); sprintf(StatusMessage, "%s %s\n", get_html_text("182"), ActionUser); if(CurAutoResponders == 0) { @@ -360,7 +365,7 @@ { char Buffer[MAX_BUFF]; - while (fgets(Buffer, sizeof(TmpBuf2), MessageFile)) { + while (fgets(Buffer, sizeof(Buffer), MessageFile)) { fprintf(actout, "%s", Buffer); } } @@ -371,6 +376,9 @@ FILE *fs; int i; struct vqpasswd *vpw; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -410,23 +418,23 @@ /* * Make the autoresponder directory */ - strcpy(TmpBuf2,ActionUser); - upperit(TmpBuf2); - mkdir(TmpBuf2, 0750); + strcpy(Buffer2,ActionUser); + upperit(Buffer2); + mkdir(Buffer2, 0750); /* * Make the autoresponder .qmail file */ - sprintf(TmpBuf, ".qmail-%s", ActionUser); - for(i=6;TmpBuf[i]!=0;++i) if ( TmpBuf[i] == '.' ) TmpBuf[i] = ':'; - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, ".qmail-%s", ActionUser); + for(i=6;Buffer1[i]!=0;++i) if ( Buffer1[i] == '.' ) Buffer1[i] = ':'; + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "|%s/autorespond 10000 5 %s/%s/message %s/%s\n", - AUTORESPOND_PATH, RealDir, TmpBuf2, RealDir, TmpBuf2); + AUTORESPOND_PATH, RealDir, Buffer2, RealDir, Buffer2); if ( strlen(Newu) > 0 ) { - for(i=0;Newu[i]!='@';TmpBuf3[i] = Newu[i],++i); - if((vpw=vauth_getpw(TmpBuf3, Domain))!=NULL && (strstr(Newu,Domain)!= 0)){ + for(i=0;Newu[i]!='@';Buffer3[i] = Newu[i],++i); + if((vpw=vauth_getpw(Buffer3, Domain))!=NULL && (strstr(Newu,Domain)!= 0)){ fprintf(fs, "%s/Maildir/\n", vpw->pw_dir); } else { fprintf(fs, "&%s\n", Newu); @@ -439,8 +447,8 @@ /* * Make the autoresponder message file */ - sprintf(TmpBuf, "%s/message", TmpBuf2); - if ( (fs = fopen(TmpBuf, "w")) == NULL ) ack("123", 123); + sprintf(Buffer1, "%s/message", Buffer2); + if ( (fs = fopen(Buffer1, "w")) == NULL ) ack("123", 123); fprintf(fs, "From: %s@%s\n", ActionUser,Domain); fprintf(fs, "Subject: %s\n\n", Alias); fprintf(fs, "%s", Message); Index: command.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/command.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- command.c 30 Jan 2004 06:45:08 -0000 1.4 +++ command.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -33,115 +33,116 @@ -process_commands() +process_commands(char *command) { - int pid; + int pid; + char Buffer[MAX_BUFF]; - if (strcmp(TmpBuf2, "showmenu") == 0 ) { + if (strcmp(command, "showmenu") == 0 ) { show_menu(Username, Domain, Mytime); - } else if (strcmp(TmpBuf2, "showusers") == 0) { + } else if (strcmp(command, "showusers") == 0) { GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); GetValue(TmpCGI, SearchUser, "searchuser=", sizeof(SearchUser)); - show_users(Username, Domain, Mytime, TmpBuf2); + show_users(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showforwards") == 0) { + } else if (strcmp(command, "showforwards") == 0) { GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); - show_forwards(Username, Domain, Mytime, TmpBuf2); + show_forwards(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showmailinglists") == 0) { - show_mailing_lists(Username, Domain, Mytime, TmpBuf2); + } else if (strcmp(command, "showmailinglists") == 0) { + show_mailing_lists(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "showautoresponders") == 0) { - show_autoresponders(Username, Domain, Mytime, TmpBuf2); + } else if (strcmp(command, "showautoresponders") == 0) { + show_autoresponders(Username, Domain, Mytime, command); - } else if (strcmp(TmpBuf2, "adduser") == 0 ) { + } else if (strcmp(command, "adduser") == 0 ) { adduser(); - } else if (strcmp(TmpBuf2, "addusernow") == 0 ) { + } else if (strcmp(command, "addusernow") == 0 ) { addusernow(); - } else if (strcmp(TmpBuf2, "bounceall") == 0 ) { + } else if (strcmp(command, "bounceall") == 0 ) { bounceall(); - } else if (strcmp(TmpBuf2, "deleteall") == 0 ) { + } else if (strcmp(command, "deleteall") == 0 ) { deleteall(); - } else if (strcmp(TmpBuf2, "setremotecatchall") == 0 ) { + } else if (strcmp(command, "setremotecatchall") == 0 ) { setremotecatchall(); - } else if (strcmp(TmpBuf2, "setremotecatchallnow") == 0 ) { + } else if (strcmp(command, "setremotecatchallnow") == 0 ) { setremotecatchallnow(); - } else if (strcmp(TmpBuf2, "addlistmodnow") == 0 ) { + } else if (strcmp(command, "addlistmodnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(1); - } else if (strcmp(TmpBuf2, "dellistmod") == 0 ) { + } else if (strcmp(command, "dellistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listmod.html"); - } else if (strcmp(TmpBuf2, "dellistmodnow") == 0 ) { + } else if (strcmp(command, "dellistmodnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(1); - } else if (strcmp(TmpBuf2, "addlistmod") == 0 ) { + } else if (strcmp(command, "addlistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listmod.html"); - } else if (strcmp(TmpBuf2, "showlistmod") == 0 ) { + } else if (strcmp(command, "showlistmod") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_moderators.html"); - } else if (strcmp(TmpBuf2, "addlistdig") == 0 ) { + } else if (strcmp(command, "addlistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listdig.html"); - } else if (strcmp(TmpBuf2, "addlistdignow") == 0 ) { + } else if (strcmp(command, "addlistdignow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(2); - } else if (strcmp(TmpBuf2, "dellistdig") == 0 ) { + } else if (strcmp(command, "dellistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listdig.html"); - } else if (strcmp(TmpBuf2, "dellistdignow") == 0 ) { + } else if (strcmp(command, "dellistdignow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(2); - } else if (strcmp(TmpBuf2, "showlistdig") == 0 ) { + } else if (strcmp(command, "showlistdig") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_digest_subscribers.html"); - } else if (strcmp(TmpBuf2, "moduser") == 0 ) { + } else if (strcmp(command, "moduser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); moduser(); - } else if (strcmp(TmpBuf2, "modusernow") == 0 ) { + } else if (strcmp(command, "modusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Password1, "password1=", sizeof(Password1)); GetValue(TmpCGI, Password2, "password2=", sizeof(Password2)); GetValue(TmpCGI, Gecos, "gecos=", sizeof(Gecos)); modusergo(); - } else if (strcmp(TmpBuf2, "deluser") == 0 ) { + } else if (strcmp(command, "deluser") == 0 ) { GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); deluser(); - } else if (strcmp(TmpBuf2, "delusernow") == 0 ) { + } else if (strcmp(command, "delusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "deluser=", sizeof(ActionUser)); delusergo(); - } else if (strcmp(TmpBuf2, "moddotqmail") == 0 ) { + } else if (strcmp(command, "moddotqmail") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); moddotqmail(); - } else if (strcmp(TmpBuf2, "moddotqmailnow") == 0 ) { + } else if (strcmp(command, "moddotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); @@ -149,108 +150,108 @@ GetValue(TmpCGI, Action, "action=", sizeof(Action)); moddotqmailnow(); - } else if (strcmp(TmpBuf2, "deldotqmail") == 0 ) { + } else if (strcmp(command, "deldotqmail") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); deldotqmail(); - } else if (strcmp(TmpBuf2, "deldotqmailnow") == 0 ) { + } else if (strcmp(command, "deldotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); deldotqmailnow(); - } else if (strcmp(TmpBuf2, "adddotqmail") == 0 ) { + } else if (strcmp(command, "adddotqmail") == 0 ) { GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); adddotqmail(); - } else if (strcmp(TmpBuf2, "adddotqmailnow") == 0 ) { + } else if (strcmp(command, "adddotqmailnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, AliasType, "atype=", sizeof(AliasType)); adddotqmailnow(); - } else if (strcmp(TmpBuf2, "addmailinglist") == 0 ) { + } else if (strcmp(command, "addmailinglist") == 0 ) { addmailinglist(); - } else if (strcmp(TmpBuf2, "delmailinglist") == 0 ) { + } else if (strcmp(command, "delmailinglist") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delmailinglist(); - } else if (strcmp(TmpBuf2, "delmailinglistnow") == 0 ) { + } else if (strcmp(command, "delmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delmailinglistnow(); - } else if (strcmp(TmpBuf2, "addlistusernow") == 0 ) { + } else if (strcmp(command, "addlistusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); addlistgroupnow(0); - } else if (strcmp(TmpBuf2, "dellistuser") == 0 ) { + } else if (strcmp(command, "dellistuser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); dellistgroup("del_listuser.html"); - } else if (strcmp(TmpBuf2, "dellistusernow") == 0 ) { + } else if (strcmp(command, "dellistusernow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Newu, "newu=", sizeof(Newu)); dellistgroupnow(0); - } else if (strcmp(TmpBuf2, "addlistuser") == 0 ) { + } else if (strcmp(command, "addlistuser") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); addlistgroup("add_listuser.html"); - } else if (strcmp(TmpBuf2, "addmailinglistnow") == 0 ) { + } else if (strcmp(command, "addmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); addmailinglistnow(); - } else if (strcmp(TmpBuf2, "modmailinglist") == 0 ) { + } else if (strcmp(command, "modmailinglist") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); modmailinglist(); - } else if (strcmp(TmpBuf2, "modmailinglistnow") == 0 ) { + } else if (strcmp(command, "modmailinglistnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); modmailinglistnow(); - } else if (strcmp(TmpBuf2, "modautorespond") == 0 ) { + } else if (strcmp(command, "modautorespond") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); modautorespond(); - } else if (strcmp(TmpBuf2, "addautorespond") == 0 ) { + } else if (strcmp(command, "addautorespond") == 0 ) { addautorespond(); - } else if (strcmp(TmpBuf2, "addautorespondnow") == 0 ) { + } else if (strcmp(command, "addautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, Message, "message=", sizeof(Message)); GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); addautorespondnow(); - } else if (strcmp(TmpBuf2, "modautorespondnow") == 0 ) { + } else if (strcmp(command, "modautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "newu=", sizeof(ActionUser)); GetValue(TmpCGI, Alias, "alias=", sizeof(Alias)); GetValue(TmpCGI, Message, "message=", sizeof(Message)); GetValue(TmpCGI, Newu, "owner=", sizeof(Newu)); modautorespondnow(); - } else if (strcmp(TmpBuf2, "showlistusers") == 0 ) { + } else if (strcmp(command, "showlistusers") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); show_list_group("show_subscribers.html"); - } else if (strcmp(TmpBuf2, "setdefault") == 0 ) { + } else if (strcmp(command, "setdefault") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); GetValue(TmpCGI, Pagenumber, "page=", sizeof(Pagenumber)); setdefaultaccount(); - } else if (strcmp(TmpBuf2, "delautorespond") == 0 ) { + } else if (strcmp(command, "delautorespond") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delautorespond(); - } else if (strcmp(TmpBuf2, "delautorespondnow") == 0 ) { + } else if (strcmp(command, "delautorespondnow") == 0 ) { GetValue(TmpCGI, ActionUser, "modu=", sizeof(ActionUser)); delautorespondnow(); - } else if (strcmp(TmpBuf2, "logout") == 0 ) { - sprintf(TmpBuf, "%s/%s/Maildir", RealDir, Username ); - del_id_files(TmpBuf); + } else if (strcmp(command, "logout") == 0 ) { + sprintf(Buffer, "%s/%s/Maildir", RealDir, Username ); + del_id_files(Buffer); show_login(); } Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- configure 30 Jan 2004 03:28:19 -0000 1.15 +++ configure 30 Jan 2004 08:30:58 -0000 1.16 @@ -1,11 +1,19 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.57. +# Generated by GNU Autoconf 2.53. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. + +if expr a : '\(a\)' >/dev/null 2>&1; then [...2540 lines suppressed...] + { (exit 1); exit 1; }; } + ;; + esac +done; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" @@ -6528,11 +6237,8 @@ # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + $SHELL $CONFIG_STATUS || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. Index: forward.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/forward.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- forward.c 30 Jan 2004 06:45:08 -0000 1.4 +++ forward.c 30 Jan 2004 08:30:58 -0000 1.5 @@ -37,12 +37,13 @@ { if (AdminType != DOMAIN_ADMIN) { - fprintf(stderr,"%s", get_html_text("142")); + fprintf(stderr, "%s", get_html_text("142")); vclose(); exit(0); } if(CurForwards == 0) { + fprintf(stderr, "%s", get_html_text("232")); sprintf(StatusMessage,"%s", get_html_text("232")); show_menu(Username, Domain, Mytime); vclose(); Index: mailinglist.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/mailinglist.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mailinglist.c 30 Jan 2004 03:28:19 -0000 1.6 +++ mailinglist.c 30 Jan 2004 08:30:58 -0000 1.7 @@ -46,6 +46,7 @@ int show_mailing_lists(char *user, char *dom, time_t mytime) { + if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); vclose(); @@ -73,6 +74,7 @@ FILE *fs; char *addr; char testfn[MAX_FILE_NAME]; + char Buffer[MAX_BUFF]; int i,j; if ( AdminType!=DOMAIN_ADMIN ) { @@ -105,9 +107,9 @@ send_template_now("show_error_line.html"); continue; } - fgets(TmpBuf2, sizeof(TmpBuf2), fs); + fgets(Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 ) { + if ( strstr( Buffer, "ezmlm-reject") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); } } @@ -154,10 +156,12 @@ int is_mailing_list(FILE *fs) { + char Buffer[MAX_BUFF]; + while (!feof(fs)) { - fgets( TmpBuf2, sizeof(TmpBuf2), fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 || - strstr( TmpBuf2, "ezmlm-send") != 0 ) + fgets( Buffer, sizeof(Buffer), fs); + if ( strstr( Buffer, "ezmlm-reject") != 0 || + strstr( Buffer, "ezmlm-send") != 0 ) return -1; } return 0; @@ -172,6 +176,7 @@ char *addr; int i,j; int listcount; + char Buffer[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -197,9 +202,9 @@ fprintf(stderr,"SMLL3 %s %s\n", get_html_text("144"), mydirent->d_name); continue; } - fgets( TmpBuf2, sizeof(TmpBuf2), fs); + fgets( Buffer, sizeof(Buffer), fs); fclose(fs); - if ( strstr( TmpBuf2, "ezmlm-reject") != 0 ) { + if ( strstr( Buffer, "ezmlm-reject") != 0 ) { sort_add_entry (&mydirent->d_name[7], 0); listcount++; } @@ -273,6 +278,8 @@ int pid; DIR *mydir; struct dirent *mydirent; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -292,28 +299,28 @@ if(dotqmail_name[dotnum]=='.') dotqmail_name[dotnum] = ':'; } - sprintf(TmpBuf2, ".qmail-%s", dotqmail_name); - sprintf(TmpBuf3, ".qmail-%s-", dotqmail_name); + sprintf(Buffer2, ".qmail-%s", dotqmail_name); + sprintf(Buffer1, ".qmail-%s-", dotqmail_name); while( (mydirent=readdir(mydir)) != NULL ) { /* delete the main .qmail-"list" file */ - if ( strcmp(TmpBuf2, mydirent->d_name) == 0 ) { + if ( strcmp(Buffer2, mydirent->d_name) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), TmpBuf2); + ack(get_html_text("185"), Buffer2); } /* delete secondary .qmail-"list"-* files */ - } else if ( strncmp(TmpBuf3, mydirent->d_name, strlen(TmpBuf3)) == 0 ) { + } else if ( strncmp(Buffer1, mydirent->d_name, strlen(Buffer1)) == 0 ) { if ( unlink(mydirent->d_name) != 0 ) { - ack(get_html_text("185"), TmpBuf2); + ack(get_html_text("185"), Buffer2); } } } closedir(mydir); - sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); - vdelfiles(TmpBuf2); + sprintf(Buffer2, "%s/%s", RealDir, ActionUser); + vdelfiles(Buffer2); sprintf(StatusMessage, "%s %s\n", get_html_text("186"), ActionUser); if ( CurMailingLists == 0 ) { @@ -361,8 +368,12 @@ ezmlm_make (int newlist) { - FILE * file; - int pid; + FILE * file; + int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + char Buffer4[MAX_BUFF]; #ifdef EZMLMIDX char list_owner[MAX_BUFF]; @@ -470,17 +481,17 @@ } pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-make", EZMLMDIR); - sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); - sprintf(TmpBuf3, "%s/.qmail-%s", RealDir, dotqmail_name); + sprintf(Buffer1, "%s/ezmlm-make", EZMLMDIR); + sprintf(Buffer2, "%s/%s", RealDir, ActionUser); + sprintf(Buffer3, "%s/.qmail-%s", RealDir, dotqmail_name); - arguments[argc++]=TmpBuf2; - arguments[argc++]=TmpBuf3; + arguments[argc++]=Buffer2; + arguments[argc++]=Buffer3; arguments[argc++]=ActionUser; arguments[argc++]=Domain; arguments[argc]=NULL; - execv(TmpBuf1, arguments); + execv(Buffer1, arguments); exit(127); } else { wait(&pid); @@ -519,10 +530,10 @@ while (*tmpstr == '[') tmpstr++; /* Create (or delete) the file as appropriate */ - sprintf(TmpBuf, "%s/%s/prefix", RealDir, ActionUser); + sprintf(Buffer4, "%s/%s/prefix", RealDir, ActionUser); if (strlen(tmp) > 0) { - file=fopen(TmpBuf , "w"); + file=fopen(Buffer4 , "w"); if (file) { fprintf(file, "[%s]", tmpstr); @@ -531,12 +542,12 @@ } else { - unlink (TmpBuf); + unlink (Buffer4); } /* set Reply-To header */ - GetValue (TmpCGI, TmpBuf, "replyto=", sizeof(TmpBuf)); - replyto = atoi(TmpBuf); + GetValue (TmpCGI, Buffer4, "replyto=", sizeof(Buffer4)); + replyto = atoi(Buffer4); if (replyto == REPLYTO_SENDER) { /* ezmlm shouldn't remove/add Reply-To header */ ezmlm_setreplyto ("headeradd", ""); @@ -544,17 +555,17 @@ } else { if (replyto == REPLYTO_ADDRESS) { GetValue (TmpCGI, replyto_addr, "replyaddr=", sizeof(replyto_addr)); - sprintf (TmpBuf, "Reply-To: %s\n", replyto_addr); + sprintf (Buffer4, "Reply-To: %s\n", replyto_addr); } else { /* REPLYTO_LIST */ - strcpy (TmpBuf, "Reply-To: <#l#>@<#h#>\n"); + strcpy (Buffer4, "Reply-To: <#l#>@<#h#>\n"); } - ezmlm_setreplyto ("headeradd", TmpBuf); + ezmlm_setreplyto ("headeradd", Buffer4); ezmlm_setreplyto ("headerremove", "Reply-To"); } /* update inlocal file */ - sprintf(TmpBuf, "%s/%s/inlocal", RealDir, ActionUser); - if (file=fopen(TmpBuf, "w")) { + sprintf(Buffer4, "%s/%s/inlocal", RealDir, ActionUser); + if (file=fopen(Buffer4, "w")) { fprintf(file, "%s-%s", Domain, ActionUser); fclose(file); } @@ -586,6 +597,10 @@ int show_list_group_now(int mod) { + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + /* mod = 0 for subscribers, 1 for moderators, 2 for digest users */ FILE *fs; @@ -606,15 +621,15 @@ if (pid==0) { close(handles[0]); dup2(handles[1],fileno(stdout)); - sprintf(TmpBuf1, "%s/ezmlm-list", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-list", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-list", TmpBuf2, NULL); + execl(Buffer1, "ezmlm-list", Buffer2, NULL); exit(127); } else { close(handles[1]); @@ -632,43 +647,43 @@ /* Display subscriber/moderator/digest list, along with delete button */ if(mod == 1) { - strcpy(TmpBuf, "228"); strcpy(TmpBuf1, "220"); - /* strcpy(TmpBuf2, "087"); */ + strcpy(Buffer3, "228"); strcpy(Buffer1, "220"); + /* strcpy(Buffer2, "087"); */ } else if(mod == 2) { - strcpy(TmpBuf, "244"); strcpy(TmpBuf1, "246"); - /* strcpy(TmpBuf2, "245"); */ + strcpy(Buffer3, "244"); strcpy(Buffer1, "246"); + /* strcpy(Buffer2, "245"); */ } else { - strcpy(TmpBuf, "230"); strcpy(TmpBuf1, "222"); - /* strcpy(TmpBuf2, "084"); */ + strcpy(Buffer3, "230"); strcpy(Buffer1, "222"); + /* strcpy(Buffer2, "084"); */ } - strcpy(TmpBuf2, "072"); + strcpy(Buffer2, "072"); fprintf(actout,"<TABLE border=0 width=\"100%%\">\n"); fprintf(actout," <TR>\n"); - fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(TmpBuf), subuser_count); + fprintf(actout," <TH align=left COLSPAN=4><B>%s</B> %d<BR><BR></TH>\n", get_html_text(Buffer3), subuser_count); fprintf(actout," </TR>\n"); fprintf(actout," <TR align=center bgcolor=%s>\n", get_color_text("002")); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf1)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf2)); - fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(TmpBuf1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer2)); + fprintf(actout," <TH align=center><b><font size=2>%s</font></b></TH>\n", get_html_text(Buffer1)); fprintf(actout," </TR>\n"); if(mod == 1) { - strcpy(TmpBuf, "dellistmodnow"); + strcpy(Buffer3, "dellistmodnow"); } else if(mod == 2) { - strcpy(TmpBuf, "dellistdignow"); + strcpy(Buffer3, "dellistdignow"); } else { - strcpy(TmpBuf, "dellistusernow"); + strcpy(Buffer3, "dellistusernow"); } for(z = 0; addr = sort_get_entry(z); ++z) { fprintf(actout," <TR align=center>"); fprintf(actout," <TD align=right><A href=\"%s/com/%s?modu=%s&newu=%s&dom=%s&user=%s&time=%d\"><IMG src=\"%s/trash.png\" border=0></A></TD>\n", - CGIPATH, TmpBuf, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); + CGIPATH, Buffer3, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); fprintf(actout," <TD align=left>%s</TD>\n", addr); ++z; if(addr = sort_get_entry(z)) { fprintf(actout," <TD align=right><A href=\"%s/com/%s?modu=%s&newu=%s&dom=%s&user=%s&time=%d\"><IMG src=\"%s/trash.png\" border=0></A></TD>\n", - CGIPATH, TmpBuf, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); + CGIPATH, Buffer3, ActionUser, addr, Domain, Username, Mytime, IMAGEURL); fprintf(actout," <TD align=left>%s</TD>\n", addr); } else { fprintf(actout," <TD COLSPAN=2> </TD>"); @@ -731,6 +746,9 @@ addlistgroupnow (int mod) { +char Buffer1[MAX_BUFF]; +char Buffer2[MAX_BUFF]; + // mod = 0 for subscribers, 1 for moderators, 2 for digest subscribers int i, result; @@ -759,15 +777,15 @@ pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-sub", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-sub", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-sub", TmpBuf2, Newu, NULL); + execl(Buffer1, "ezmlm-sub", Buffer2, Newu, NULL); exit(127); } else wait(&pid); @@ -809,10 +827,13 @@ dellistmod() { dellistgroup ( "del_listmod.html" ); } dellistdig() { dellistgroup ( "del_listdig.html" ); } + dellistgroupnow(int mod) { int i; int pid; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -824,15 +845,15 @@ pid=fork(); if (pid==0) { - sprintf(TmpBuf1, "%s/ezmlm-unsub", EZMLMDIR); + sprintf(Buffer1, "%s/ezmlm-unsub", EZMLMDIR); if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/mod", RealDir, ActionUser); } else if(mod == 2 ) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/digest", RealDir, ActionUser); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + sprintf(Buffer2, "%s/%s/", RealDir, ActionUser); } - execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, Newu, NULL); + execl(Buffer1, "ezmlm-unsub", Buffer2, Newu, NULL); exit(127); } else wait(&pid); @@ -860,8 +881,11 @@ modmailinglist() { /* name of list to modify is stored in ActionUser */ + int i; FILE *fs; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; if ( AdminType!=DOMAIN_ADMIN ) { sprintf(StatusMessage,"%s", get_html_text("142")); @@ -874,12 +898,12 @@ /* get the current listowner and copy it to Alias */ strcpy (dotqmail_name, ActionUser); str_replace (dotqmail_name, '.', ':'); - sprintf(TmpBuf, ".qmail-%s-owner", dotqmail_name); - if((fs=fopen(TmpBuf, "r"))!=NULL) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if(strstr(TmpBuf2, "@")!=NULL) { + sprintf(Buffer1, ".qmail-%s-owner", dotqmail_name); + if((fs=fopen(Buffer1, "r"))!=NULL) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if(strstr(Buffer2, "@")!=NULL) { /* strip leading & if present */ - sprintf(Alias, "%s", (*TmpBuf2 == '&' ? (TmpBuf2 + 1) : TmpBuf2) ); + sprintf(Alias, "%s", (*Buffer2 == '&' ? (Buffer2 + 1) : Buffer2) ); i = strlen(Alias); --i; Alias[i] = '\0'; /* strip newline */ } } @@ -889,17 +913,17 @@ /* set default to "replies go to original sender" */ replyto = REPLYTO_SENDER; /* default */ *replyto_addr = '\0'; - sprintf(TmpBuf, "%s/headeradd", ActionUser); + sprintf(Buffer1, "%s/headeradd", ActionUser); /* get the Reply-To setting for the list */ - if ((fs = fopen (TmpBuf, "r")) != NULL) { - while (fgets (TmpBuf2, sizeof(TmpBuf2), fs)) { - if (strncasecmp ("Reply-To: ", TmpBuf2, 10) == 0) { - i = strlen(TmpBuf2); --i; TmpBuf2[i] = '\0'; /* strip newline */ - if (strcmp ("<#l#>@<#h#>", TmpBuf2 + 10) == 0) { + if ((fs = fopen (Buffer1, "r")) != NULL) { + while (fgets (Buffer2, sizeof(Buffer2), fs)) { + if (strncasecmp ("Reply-To: ", Buffer2, 10) == 0) { + i = strlen(Buffer2); --i; Buffer2[i] = '\0'; /* strip newline */ + if (strcmp ("<#l#>@<#h#>", Buffer2 + 10) == 0) { replyto = REPLYTO_LIST; } else { replyto = REPLYTO_ADDRESS; - strcpy (replyto_addr, TmpBuf2 + 10); + strcpy (replyto_addr, Buffer2 + 10); } } } @@ -989,6 +1013,8 @@ void set_options() { char c; FILE *fs; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; /* * Note that with ezmlm-idx it might be possible to replace most @@ -1005,28 +1031,28 @@ for (c = 'a'; c <= 'z'; checkopt[c++] = 0); // figure out some options in the -default file - sprintf(TmpBuf, ".qmail-%s-default", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 'P')) > 0) { + sprintf(Buffer1, ".qmail-%s-default", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-get", 'P')) > 0) { checkopt['b'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 's')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-get", 's')) > 0) { checkopt['g'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'S')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'S')) > 0) { checkopt['h'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'U')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'U')) > 0) { checkopt['j'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'l')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'l')) > 0) { checkopt['l'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'e')) > 0) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-manage", 'e')) > 0) { checkopt['n'] = 1; } - if((strstr(TmpBuf2, "ezmlm-request")) != 0) { + if((strstr(Buffer2, "ezmlm-request")) != 0) { checkopt['q'] = 1; } } @@ -1034,10 +1060,10 @@ } // figure out some options in the -accept-default file - sprintf(TmpBuf, ".qmail-%s-accept-default", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if(strstr(TmpBuf2, "ezmlm-archive") !=0) { + sprintf(Buffer1, ".qmail-%s-accept-default", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if(strstr(Buffer2, "ezmlm-archive") !=0) { checkopt['i'] = 1; } } @@ -1045,45 +1071,45 @@ } // figure out some options in the qmail file - sprintf(TmpBuf, ".qmail-%s", dotqmail_name); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-store", 'P')) > 0) { + sprintf(Buffer1, ".qmail-%s", dotqmail_name); + if( (fs=fopen(Buffer1, "r")) !=NULL ) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + if((get_ezmlmidx_line_arguments(Buffer2, "ezmlm-store", 'P')) > 0) { checkopt['o'] = 1; } - if((strstr(TmpBuf2, "ezmlm-gate")) != 0 || (strstr(TmpBuf2, "ezmlm-issubn")) != 0) { + if((strstr(Buffer2, "ezmlm-gate")) != 0 || (strstr(Buffer2, "ezmlm-issubn")) != 0) { checkopt['u'] = 1; } - if(strstr(TmpBuf2, "ezmlm-archive") !=0) { + if(strstr(Buffer2, "ezmlm-archive") !=0) { checkopt['i'] = 1; } } fclose(fs); } - sprintf(TmpBuf, ".qmail-%s-accept-default", dotqmail_name); - checkopt['m'] = file_exists(TmpBuf); + sprintf(Buffer1, ".qmail-%s-accept-default", dotqmail_name); + checkopt['m'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/archived", ActionUser); - checkopt['a'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/archived", ActionUser); + checkopt['a'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/digest/bouncer", ActionUser); - checkopt['d'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/digest/bouncer", ActionUser); + checkopt['d'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/prefix", ActionUser); - checkopt['f'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/prefix", ActionUser); + checkopt['f'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/public", ActionUser); - checkopt['p'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/public", ActionUser); + checkopt['p'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/remote", ActionUser); - checkopt['r'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/remote", ActionUser); + checkopt['r'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/modsub", ActionUser); - checkopt['s'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/modsub", ActionUser); + checkopt['s'] = file_exists(Buffer1); - sprintf(TmpBuf, "%s/text/trailer", ActionUser); - checkopt['t'] = file_exists(TmpBuf); + sprintf(Buffer1, "%s/text/trailer", ActionUser); + checkopt['t'] = file_exists(Buffer1); /* update the uppercase option letters (just the opposite of the lowercase) */ for (c = 'A'; c <= 'Z'; c++) @@ -1146,6 +1172,10 @@ char checked1[MAX_BUFF] = ""; char listname[128]; int checked; + char Buffer1[MAX_BUFF]; + char Buffer2[MAX_BUFF]; + char Buffer3[MAX_BUFF]; + char Buffer4[MAX_BUFF]; /* Note that we do not support the following list options: * k - posts from addresses in listname/deny are rejected @@ -1185,8 +1215,8 @@ fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("268")); /* this next option isn't necessary since we use the edit box to * set/delete the prefix - sprintf (TmpBuf, get_html_text("269"), listname); - build_option_str ("CHECKBOX", "opt3", "f", TmpBuf); + sprintf (Buffer4, get_html_text("269"), listname); + build_option_str ("CHECKBOX", "opt3", "f", Buffer4); fprintf(actout, "<BR>\n"); */ fprintf(actout, "<TABLE><TR><TD ROWSPAN=3 VALIGN=TOP>%s</TD>", @@ -1203,14 +1233,14 @@ build_option_str ("CHECKBOX", "opt4", "t", get_html_text("270")); fprintf(actout, "<BR>\n"); build_option_str ("CHECKBOX", "opt5", "d", get_html_text("271")); - sprintf (TmpBuf, get_html_text("272"), listname); - fprintf(actout, "<SMALL>(%s)</SMALL>", TmpBuf); + sprintf (Buffer4, get_html_text("272"), listname); + fprintf(actout, "<SMALL>(%s)</SMALL>", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (TmpBuf, get_html_text("273"), listname); - build_option_str ("CHECKBOX", "opt6", "q", TmpBuf); + sprintf (Buffer4, get_html_text("273"), listname); + build_option_str ("CHECKBOX", "opt6", "q", Buffer4); fprintf(actout, "<BR>\n"); - sprintf (TmpBuf, get_html_text("274"), listname, listname, listname); - fprintf(actout, " <SMALL>(%s)</SMALL></P>", TmpBuf); + sprintf (Buffer4, get_html_text("274"), listname, listname, listname); + fprintf(actout, " <SMALL>(%s)</SMALL></P>", Buffer4); /* Remote Administration */ fprintf(actout, "<P><B><U>%s</U></B><BR>\n", get_html_text("275")); @@ -1258,13 +1288,13 @@ /* See if sql is turned on */ checked = 0; - sprintf(TmpBuf, "%s/sql", ActionUser); - if( (fs=fopen(TmpBuf, "r")) !=NULL ) { + sprintf(Buffer4, "%s/sql", ActionUser); + if( (fs=fopen(Buffer4, "r")) !=NULL ) { checked = 1; - while(fgets(TmpBuf2, sizeof(TmpBuf2), fs)) { - strcpy(TmpBuf1, TmpBuf2); - i = strlen(TmpBuf1); --i; TmpBuf1[i] = 0; /* take off newline */ - if((strstr(TmpBuf1, ":")) != NULL) { + while(fgets(Buffer2, sizeof(Buffer2), fs)) { + strcpy(Buffer1, Buffer2); + i = strlen(Buffer1); --i; Buffer1[i] = 0; /* take off newline */ + if((strstr(Buffer1, ":")) != NULL) { sqlfileok = 1; } } @@ -1286,9 +1316,9 @@ /* get hostname */ strcpy(checked1, "localhost"); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, TmpBuf1, 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(i=0,j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, Buffer1, 1); + if((strstr(Buffer3, ":")) == NULL) { + for(i=0,j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1305,9 +1335,9 @@ /* get port */ strcpy(checked1, "3306"); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1323,9 +1353,9 @@ /* get user */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1341,9 +1371,9 @@ /* get password */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1359,9 +1389,9 @@ /* get database name */ strcpy(checked1, ""); if(usesql == 1 && sqlfileok == 1) { - strncpy(TmpBuf3, &TmpBuf1[++i], 1); - if((strstr(TmpBuf3, ":")) == NULL) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + strncpy(Buffer3, &Buffer1[++i], 1); + if((strstr(Buffer3, ":")) == NULL) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1378,8 +1408,8 @@ strcpy(checked1, "ezmlm"); if(usesql == 1 && sqlfileok == 1) { ++i; - if(strlen(TmpBuf1) != i) { - for(j=0;TmpBuf1[i]!=':'&&TmpBuf1[i]!='\0';++j,++i) checked1[j] = TmpBuf1[i]; + if(strlen(Buffer1) != i) { + for(j=0;Buffer1[i]!=':'&&Buffer1[i]!='\0';++j,++i) checked1[j] = Buffer1[i]; checked1[j] = '\0'; } } @@ -1404,8 +1434,7 @@ sprintf(buffer, "%s/%s/prefix", RealDir, ActionUser); file=fopen(buffer , "r"); - if (file) - { + if (file) { fgets(buffer, sizeof(buffer), file); fclose(file); Index: qmailadmin.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadmin.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- qmailadmin.c 30 Jan 2004 06:45:08 -0000 1.8 +++ qmailadmin.c 30 Jan 2004 08:30:58 -0000 1.9 @@ -59,11 +59,6 @@ char SearchUser[MAX_BUFF]; time_t Mytime; char *TmpCGI = NULL; -char TmpBuf[MAX_BIG_BUFF]; -char TmpBuf1[MAX_BUFF]; -char TmpBuf2[MAX_BUFF]; -char TmpBuf3[MAX_BUFF]; -char TempBuf[MAX_BUFF]; int Compressed; FILE *actout; @@ -133,6 +128,11 @@ char returnhttp[MAX_BUFF]; char returntext[MAX_BUFF]; + char TmpBuf[MAX_BIG_BUFF]; + char TmpBuf1[MAX_BUFF]; + char TmpBuf2[MAX_BUFF]; + char TmpBuf3[MAX_BUFF]; + init_globals(); if (x_forward) ip_addr = x_forward; @@ -174,7 +174,6 @@ fprintf(stderr, "MAIN %s %s\n", get_html_text("171"), RealDir ); } set_admin_type(); - fprintf( stderr, "in main before count_stuff\n" ); count_stuff(); if ( AdminType == USER_ADMIN || AdminType == DOMAIN_ADMIN ) { @@ -183,9 +182,7 @@ auth_system(ip_addr, pw); } - fprintf( stderr, "in main before process_commands\n" ); - process_commands(); - fprintf( stderr, "in main after process_commands\n" ); + process_commands(TmpBuf2); } else { char *rm; @@ -316,10 +313,6 @@ memset(Crypted, 0, sizeof(Crypted)); memset(Alias, 0, sizeof(Alias)); memset(Message, 0, sizeof(Message)); - memset(TmpBuf, 0, sizeof(TmpBuf)); - memset(TmpBuf1, 0, sizeof(TmpBuf1)); - memset(TmpBuf2, 0, sizeof(TmpBuf2)); - memset(TmpBuf3, 0, sizeof(TmpBuf3)); AdminType = NO_ADMIN; @@ -399,14 +392,15 @@ DIR *mydir; struct dirent *mydirent; struct stat statbuf; + char Buffer[MAX_BUFF]; mydir = opendir(dirname); if ( mydir == NULL ) return; while((mydirent=readdir(mydir))!=NULL){ if ( strstr(mydirent->d_name,".qw")!=0 ) { - sprintf(TmpBuf3, "%s/%s", dirname, mydirent->d_name); - unlink(TmpBuf3); + sprintf(Buffer, "%s/%s", dirname, mydirent->d_name); + unlink(Buffer); } } closedir(mydir); Index: qmailadminx.h =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/qmailadminx.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- qmailadminx.h 30 Jan 2004 03:28:19 -0000 1.3 +++ qmailadminx.h 30 Jan 2004 08:30:58 -0000 1.4 @@ -40,11 +40,6 @@ extern char SearchUser[MAX_BUFF]; extern time_t Mytime; extern char *TmpCGI; -extern char TmpBuf[MAX_BIG_BUFF]; -extern char TmpBuf1[MAX_BUFF]; -extern char TmpBuf2[MAX_BUFF]; -extern char TmpBuf3[MAX_BUFF]; -extern char TempBuf[MAX_BUFF]; extern int Compressed; extern FILE *actout; Index: show.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/show.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- show.c 10 Oct 2003 16:36:24 -0000 1.2 +++ show.c 30 Jan 2004 08:30:58 -0000 1.3 @@ -34,7 +34,7 @@ char *dom; time_t mytime; { - send_template( "main_menu.html" ); + send_template( "menu_main.html" ); } show_login() Index: template.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/template.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- template.c 30 Jan 2004 03:28:19 -0000 1.8 +++ template.c 30 Jan 2004 08:30:58 -0000 1.9 @@ -103,7 +103,7 @@ /* open the template */ fs = fopen( fqfn, "r" ); if (fs == NULL) { - fprintf(stderr,"STN1 %s %s\n", get_html_text("144"), fqfn); + fprintf(stderr,"%s %s\n", get_html_text("144"), fqfn); return 144; } @@ -146,6 +146,7 @@ } break; + ... [truncated message content] |