v. 2022.04.01 Combined patch for qmailadmin-1.2.16 by Roberto Puzzanghera more info at https://notes.sagredo.eu/en/qmail-notes-185/qmailadmin-23.html ================================================================================================= = This patch puts together * Roberto Puzzanghera's qmailadmin-skin patch Provides a new responsive skin to the control panel. It modifies everything under the html dir and many .c files in order to adjust the html that the original author embedded into the source files. Added a stylesheet style.css in the images folder and a couple of png files for the qmail logo. https://notes.sagredo.eu/files/qmail/patches/qmailadmin/skin/ * catchall patch by Luca Franceschini Restore the catch all account functiinality https://notes.sagredo.eu/files/qmail/patches/qmailadmin/qmailadmin-catchall.patch * qmail-log (unknown author) Gets the program to log authentication failures. This makes possibile to ban malicious IPs via fail2ban. It is required to create the log file /var/log/qma-auth.log initially and assign write priviledges to apache. https://notes.sagredo.eu/files/qmail/patches/qmailadmin/qmailadmin-1.2.16-log.patch * mailinglist.c.ezmlm7 patch (unknown author) Provides compatibility with ezmlm v. 7 https://notes.sagredo.eu/files/qmail/patches/qmailadmin/mailinglist.c.ezmlm7.patch * cracklib patch by Inter7. Improved by Roberto Puzzanghera Check for the password strenght. Requires the cracklib library and a configure rebuild. https://notes.sagredo.eu/files/qmail//patches//qmailadmin//cracklib/qmailadmin-cracklib.patch == Changelog * 2022.04.01 -qmailadmin now logs to stderr when qma-auth.log can't be opened in write mode. It was returning a white screen without any error message nor on screen, nor on stderr. * 2021.03.12 -patch cleanup * 2020.09.02 -mod_user.html: cleaned the html as it was printing unneeded strings * 2020.08.10 -mod_user.html: added value attribute to the name/gecos input tag (tx Pablo Murillo) * 2020.05.22 -mod_user.html: removed "required" attribute on password field, to allow modification with no password change * 2020.05.05 First release of the patch ================================================================================================== diff -ruN ../qmailadmin-1.2.16-original/Makefile.am qmailadmin-1.2.16/Makefile.am --- ../qmailadmin-1.2.16-original/Makefile.am 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/Makefile.am 2020-05-04 08:48:05.257814203 +0200 @@ -79,4 +79,4 @@ chmod 644 $(DESTDIR)@htmllibdir@/lang/* $(mkinstalldirs) $(DESTDIR)@imagedir@ cp $(srcdir)/images/*.png $(DESTDIR)@imagedir@ - + cp $(srcdir)/images/*.css $(DESTDIR)@imagedir@ diff -ruN ../qmailadmin-1.2.16-original/alias.c qmailadmin-1.2.16/alias.c --- ../qmailadmin-1.2.16-original/alias.c 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/alias.c 2020-05-03 12:38:18.000000000 +0200 @@ -305,11 +305,11 @@ */ printf ("%s", HTML_ALIAS_ROW_START); - qmail_button (this_alias, "deldotqmail", user, dom, mytime, "trash.png"); + qmail_button (this_alias, "deldotqmail", user, dom, mytime, "delete_forever"); if (*curalias->alias_command == '#') printf ("%s", HTML_EMPTY_TD); /* don't allow modify on blackhole */ else - qmail_button (this_alias, "moddotqmail", user, dom, mytime, "modify.png"); + qmail_button (this_alias, "moddotqmail", user, dom, mytime, "create"); printh (HTML_ALIAS_NAME, this_alias); printf (HTML_ALIAS_DEST_START); @@ -715,7 +715,7 @@ *s = '\0'; if ((s = strrchr(user, '/')) == NULL) return NULL; - if (b != NULL) { snprinth (user, sizeof(user), "%H (%H)", s+1, b); } + if (b != NULL) { snprinth (user, sizeof(user), "%H (%H)", s+1, b); } else { snprinth (user, sizeof(user), "%H", s+1); } return (user); @@ -739,7 +739,7 @@ /* back up to pipe or first slash to remove path */ while (line[len] != '/' && line[len] != '|') len--; len++; /* len is now first char of program name */ - snprinth (command, sizeof(command), "%H", &line[len]); + snprinth (command, sizeof(command), "%H", &line[len]); return(command); } else { diff -ruN ../qmailadmin-1.2.16-original/autorespond.c qmailadmin-1.2.16/autorespond.c --- ../qmailadmin-1.2.16-original/autorespond.c 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/autorespond.c 2021-03-10 22:12:17.953823637 +0100 @@ -77,17 +77,17 @@ for (i = 0; (addr = sort_get_entry(i)); ++i) { printf (""); - printf (""); + printf (""); printh ("", cgiurl("delautorespond"), addr); - printf ("", IMAGEURL); + printf ("delete_forever"); printf (""); - printf (""); + printf (""); printh ("", cgiurl("modautorespond"), addr); - printf ("", IMAGEURL); + printf ("create"); printf (""); - printh ("%H@%H", addr, Domain); + printh ("%H@%H", addr, Domain); printf ("\n"); } @@ -192,13 +192,13 @@ * Make the autoresponder .qmail file */ valias_delete (ActionUser, Domain); - if ( strlen(Newu) > 0 ) { - sprintf(TmpBuf, "&%s", Newu); - valias_insert (ActionUser, Domain, TmpBuf); - } 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 ) { + sprintf(TmpBuf, "&%s", Newu); + valias_insert (ActionUser, Domain, TmpBuf); + } /* * Report success diff -ruN ../qmailadmin-1.2.16-original/command.c qmailadmin-1.2.16/command.c --- ../qmailadmin-1.2.16-original/command.c 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/command.c 2020-05-04 11:14:22.668604120 +0200 @@ -30,6 +30,7 @@ #include #include +#include "config.h" #include "alias.h" #include "autorespond.h" #include "cgi.h" diff -ruN ../qmailadmin-1.2.16-original/configure.in qmailadmin-1.2.16/configure.in --- ../qmailadmin-1.2.16-original/configure.in 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/configure.in 2020-05-04 11:15:44.923792626 +0200 @@ -26,6 +26,7 @@ dnl Checks for libraries. AC_CHECK_LIB(crypt,crypt) AC_CHECK_LIB(shadow,crypt) +AC_CHECK_LIB(crack,FascistCheck) #AC_CHECK_LIB(m,floor) #AC_CHECK_LIB(nsl, gethostbyaddr) #AC_CHECK_LIB(socket, getsockname) @@ -421,6 +422,31 @@ AC_DEFINE_UNQUOTED(SPAM_COMMAND, "$spam_command","") AC_SUBST(SPAM_COMMAND) +cracklib=no +AC_ARG_ENABLE(cracklib, [ --enable-cracklib=PATH Path to cracklib dictionary.], + cracklib="$enableval", + [ + if test "$cracklib" = "" + then + AC_MSG_ERROR([Unable to find your cracklib directory, specify --enable-cracklib.]) + fi + ] ) + +if test "$cracklib" = "yes" +then + cracklib="/usr/lib/cracklib_dict" +fi + +case $cracklib in +0*|n*|N*) + echo "checking whether to use password checking... no" + ;; +*) + AC_DEFINE_UNQUOTED(CRACKLIB,"$cracklib","") + echo "checking whether to use password checking... yes" + ;; +esac + HELP=no AC_ARG_ENABLE(help, [ --enable-help Display help links on login page.], HELP="$enableval",) @@ -485,4 +511,7 @@ then echo " spam command = "$spam_command"" fi - +if test "$cracklib" != "no" +then + echo "cracklib dictionary= "$cracklib"" +fi diff -ruN ../qmailadmin-1.2.16-original/html/add_autorespond.html qmailadmin-1.2.16/html/add_autorespond.html --- ../qmailadmin-1.2.16-original/html/add_autorespond.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_autorespond.html 2020-05-03 16:17:22.000000000 +0200 @@ -1,76 +1,45 @@ - - + +
- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X003 - -
- - - - - - -
-
- - - - - - - - - - - - - -
##X004 @##D
##X005 
##X006 
- - +

##X003

+ + + + +
+
+ + @##D +
+ + +
+
+ +
+ + +
+
+ +
+ +
+ +
+ +
-
-
- - [  - ##X077 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
- + +
+ +
+ +
diff -ruN ../qmailadmin-1.2.16-original/html/add_forward.html qmailadmin-1.2.16/html/add_forward.html --- ../qmailadmin-1.2.16-original/html/add_forward.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_forward.html 2020-05-03 11:41:50.000000000 +0200 @@ -1,85 +1,35 @@ - - + +
- +

##X007

-
-

##S

- -
- - - - - - - - - - - - -
- - ##X007 - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
##X106 ##X305
- @##D - -  ##X306  - -
##X010 -
   - -
-
-
-
- - [  - ##X122 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ + +
+
+ @##D +
+ + +
+
+ + ##X010 +
+ + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_listdig.html qmailadmin-1.2.16/html/add_listdig.html --- ../qmailadmin-1.2.16-original/html/add_listdig.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_listdig.html 2020-05-03 22:21:30.000000000 +0200 @@ -1,68 +1,34 @@ - - + - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X241 - -
- - - - - - -
-

##X241 ##A@##D

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ +

##X241

+ +
##X241 ##A@##D
+ +
+ + +
+ + +
+ + + + +
+ +
+ + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_listmod.html qmailadmin-1.2.16/html/add_listmod.html --- ../qmailadmin-1.2.16-original/html/add_listmod.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_listmod.html 2020-05-03 21:47:23.000000000 +0200 @@ -1,68 +1,34 @@ - - + - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X011 - -
- - - - - - -
-

##X012 ##A@##D

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ +

##X011

+ +
##X012 ##A@##D
+ +
+ + +
+ + +
+ + + + +
+ +
+ + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_listuser.html qmailadmin-1.2.16/html/add_listuser.html --- ../qmailadmin-1.2.16-original/html/add_listuser.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_listuser.html 2020-05-03 20:12:16.000000000 +0200 @@ -1,68 +1,34 @@ - - + - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X014 - -
- - - - - - -
-

##X014 ##A@##D

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ +

##X014

+ +
##X014 ##A@##D
+ +
+ + +
+ + +
+ + + + +
+ +
+ + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_mailinglist-idx.html qmailadmin-1.2.16/html/add_mailinglist-idx.html --- ../qmailadmin-1.2.16-original/html/add_mailinglist-idx.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_mailinglist-idx.html 2020-05-04 09:22:47.000000000 +0200 @@ -1,76 +1,45 @@ - - + + +
+ +

##X015

+ +
+ + +
+ + + @##D +
+ + +
+ + +
+ + +
+ + +
- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X015 - -
- - - - - - -
- - - - - - - - - - - - - - -
##X016@##D
##X017
##X256
##E -
- -
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ + + +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_mailinglist-no-idx.html qmailadmin-1.2.16/html/add_mailinglist-no-idx.html --- ../qmailadmin-1.2.16-original/html/add_mailinglist-no-idx.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_mailinglist-no-idx.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,73 +1,42 @@ - - + + +
+ +

##X015

- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X015 - -
- - - - - - -
-
- - - - - - - - - - - -
##X016 
 ##X018
 ##X039
- -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+
+ + +
+ + + @##D +
+ + +
+ + +
+ +
+ + +
+ + + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/add_user.html qmailadmin-1.2.16/html/add_user.html --- ../qmailadmin-1.2.16-original/html/add_user.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/add_user.html 2020-05-02 22:50:12.000000000 +0200 @@ -1,93 +1,66 @@ - - + +
- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X090 - -
- - - - - - -
-
- - - - - + +

##D

+ + +
##X090
+ + + + +
+ + + @##D +
##tq - - - - + + +
+ + + ##X251 +
##tt - - - - - - - - - - - - + +
+ + +
+ + +
+ + +
+ + +
+ + +
##ts - - - - + +
+
+ +
##tt -
##X002: @##D
##X249:  ##X251
##X057: 
##X091 
##X092: 
##X304 - -
##c - -
-
-
- - [  - ##X061 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + + +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/change_password.html qmailadmin-1.2.16/html/change_password.html --- ../qmailadmin-1.2.16-original/html/change_password.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/change_password.html 2020-05-03 22:37:42.000000000 +0200 @@ -1,36 +1,38 @@ - - -
-

##S

-
- - - - - - - - - - - - - - - - - - - - - - - -
##X013
##X057:
##X110:
##X091
- - - -
##R
-
-
+ +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + +
+ + + + + + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/change_password_success.html qmailadmin-1.2.16/html/change_password_success.html --- ../qmailadmin-1.2.16-original/html/change_password_success.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/change_password_success.html 2020-05-03 22:40:14.000000000 +0200 @@ -1,7 +1,9 @@ - - -
-

##X139

+ + +
+ +

##X139

+ ##R -
+ \ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_autorespond_confirm.html qmailadmin-1.2.16/html/del_autorespond_confirm.html --- ../qmailadmin-1.2.16-original/html/del_autorespond_confirm.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_autorespond_confirm.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,52 +1,27 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X098 - -
- - - - - - -
-

##X098 ##A@##D?

-
+ + +
+ +

##X098

+ +
##X098 ##A@##D?
+ + - - -
-
- - [  - ##X077 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + + + + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_forward_confirm.html qmailadmin-1.2.16/html/del_forward_confirm.html --- ../qmailadmin-1.2.16-original/html/del_forward_confirm.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_forward_confirm.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,52 +1,23 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X100 - -
- - - - - - -
-

##X100 ##A@##D?

-
- - -
-
-
- - [  - ##X122 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ +
+ +

##X100

+ +
##X100 ##A@##D?
+ +
+ + +
+ +
+
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_listdig.html qmailadmin-1.2.16/html/del_listdig.html --- ../qmailadmin-1.2.16-original/html/del_listdig.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_listdig.html 2020-05-03 22:25:04.000000000 +0200 @@ -1,58 +1,32 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X243 - -
- - - - - - -
-

##X243 ##A@##D?

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X243

+ +
##X243 ##A@##D?
+ +
+ + +
+ + +
+ + + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_listmod.html qmailadmin-1.2.16/html/del_listmod.html --- ../qmailadmin-1.2.16-original/html/del_listmod.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_listmod.html 2020-05-03 22:12:56.000000000 +0200 @@ -1,58 +1,33 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X196 - -
- - - - - - -
-

##X196 ##A@##D?

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X196

+ +
##X196 ##A@##D?
+ +
+ + +
+ + +
+ + + + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_listuser.html qmailadmin-1.2.16/html/del_listuser.html --- ../qmailadmin-1.2.16-original/html/del_listuser.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_listuser.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,58 +1,31 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X195 - -
- - - - - - -
-

##X195 ##A@##D?

-
- - - - - -
##X013 
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X195

+ +
##X195 ##A@##D?
+ +
+ +
+
+ +
+ + + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_mailinglist_confirm.html qmailadmin-1.2.16/html/del_mailinglist_confirm.html --- ../qmailadmin-1.2.16-original/html/del_mailinglist_confirm.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_mailinglist_confirm.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,52 +1,25 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X101 - -
- - - - - - -
-

##X101 ##A@##D?

-
- - -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X101

+ +
##X101 ##A@##D?
+ +
+ + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/del_user_confirm.html qmailadmin-1.2.16/html/del_user_confirm.html --- ../qmailadmin-1.2.16-original/html/del_user_confirm.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/del_user_confirm.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,59 +1,39 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X102 - -
- - - - - - -
-

##X102 ##A@##D?

-
-  ##X103
- - - - - -
##X104 
- - -
-
-
- - [  - ##X061 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+

##X102

+ +
##X102 ##A@##D?
+ +
+ + +
+ + +
+ + + ##ta +
+ + +
+ + + +
+
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/footer.html qmailadmin-1.2.16/html/footer.html --- ../qmailadmin-1.2.16-original/html/footer.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/footer.html 2020-05-05 15:30:06.974439672 +0200 @@ -1,2 +1,13 @@ - + + + +
+

##V

+
+ + + + + + diff -ruN ../qmailadmin-1.2.16-original/html/header.html qmailadmin-1.2.16/html/header.html --- ../qmailadmin-1.2.16-original/html/header.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/header.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,6 +1,59 @@ - - - - QmailAdmin ##D - - + + + + + + + + + + + QmailAdmin ##D + + + + + + + + + + + +
+
+
+ +

##S

+
+
+
+ +
+
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/main_menu.html qmailadmin-1.2.16/html/main_menu.html --- ../qmailadmin-1.2.16-original/html/main_menu.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/main_menu.html 2020-05-03 08:29:51.000000000 +0200 @@ -1,36 +1,9 @@ - - - -
-

##S

- - - - - - - - - - - -
- ##v -
-##X217 -
##x -
- ##ta -
-
- ##X124
- @##D
-   -
- ##tt -
-
+
+ + ##v +
  • ##x
+
+
+ + +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/mod_autorespond.html qmailadmin-1.2.16/html/mod_autorespond.html --- ../qmailadmin-1.2.16-original/html/mod_autorespond.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/mod_autorespond.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,71 +1,55 @@ - - + - +template.c line 223 + value="%H@%H"> +
+ + // subject/alias +
+ + +
+ + // message +
+ +
+--> + + + + + +
-
-

##S

- - +
- - - - - - - - - - - -
- - ##X105 - -
- - - - - -
-
- - - - - - - - - - -
##X004 ##A@##D
##X005  - - -
-
- - [  - ##X077 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- - +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/mod_dotqmail.html qmailadmin-1.2.16/html/mod_dotqmail.html --- ../qmailadmin-1.2.16-original/html/mod_dotqmail.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/mod_dotqmail.html 2020-05-03 14:04:34.000000000 +0200 @@ -1,83 +1,41 @@ - - + +
- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X071 - -
- - - - - - - ##I +

##X071

+ +
##X106##X305##X072
+ + + + + + + ##I +
##X106##X305##X072
- - - - - - - - - - - + - - - - -
- ##X108 - - ##X305
-
##X010 -
  + + + +
+
+ + ##X010 +
+ -
-
-
- - [  - ##X122 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+
+ +
diff -ruN ../qmailadmin-1.2.16-original/html/mod_mailinglist-idx.html qmailadmin-1.2.16/html/mod_mailinglist-idx.html --- ../qmailadmin-1.2.16-original/html/mod_mailinglist-idx.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/mod_mailinglist-idx.html 2020-05-04 12:58:23.899161687 +0200 @@ -1,75 +1,41 @@ - - - - - - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X225 ##A@##D - -
- - - - - - -
-
- - - - - - - - - -
##X017
##X256
+ + +
+ +

##X225 ##A@##D

+ + + + +
+ + +
+ + +
+ + +
+ ##E - -
- -
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ +
+ + + + + + + +
+ +
diff -ruN ../qmailadmin-1.2.16-original/html/mod_user.html qmailadmin-1.2.16/html/mod_user.html --- ../qmailadmin-1.2.16-original/html/mod_user.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/mod_user.html 2020-09-01 14:36:38.758282654 +0200 @@ -1,151 +1,154 @@ - - - - - - -
-

##S

- -
- - - - - - - - - - - - -
- - ##X109: ##A@##D - -
- - - - - -
-
- - - - - - - - - - - - - - -##tq - - - +
+ + +

##X109: ##A@##D

+ + + + + +
+ + +
+ + +
+ + +
+ + +
+ + +
+##tq + + ##ta +
+ + + ##X251 +
+ ##tt + + ##tu +
+ + + ##Q ##q MB +
+ ##tt ##tt -
##X092:
##X110:
##X091
##X249: -##ta - -  ##X251 -##tt -##tu ##Q ##q ##tt -

- - - - - -
##X260: - ##X205 -
- ##X303 -
-  ##X211 
-    ##X210  -

- ##X212
- ##X213  -
##X214 
- -
- + + +

##X260

+ + +
+ + +
+ + +
+ + +
+ + +
+ + + +     + +
+ +
+ + +
+ + +
+ + +

+ + +
+ +
+ + +
+ + + ##ts - - - - +
+ + +
##tt - - - -
##X304: - -
- -
+
- -
-
-
- - [  + +
+ +
+
-
- -
- -
+ + ##x + + diff -ruN ../qmailadmin-1.2.16-original/html/setremotecatchall.html qmailadmin-1.2.16/html/setremotecatchall.html --- ../qmailadmin-1.2.16-original/html/setremotecatchall.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/setremotecatchall.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,66 +1,29 @@ - - + +
- - -
-

##S

- -
- - - - - - - - - - - -
- - ##X207 - -
- - - - - - -
-
- - - - - -
##X208 
- -
-
-
- - [  - ##X061 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+

##X207

+ +
+ +
+ + +
+ + +
+ +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_autorespond.html qmailadmin-1.2.16/html/show_autorespond.html --- ../qmailadmin-1.2.16-original/html/show_autorespond.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_autorespond.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,53 +1,32 @@ - - -
-

##S

- -
- - - - - - - - - - - - - - -
##D##X077[##X254 ##K]
- - - - - -
- - - - - - + + +
+ +

##D

+ +
##X077 ##X254 ##K
+ +
##X072##X071##X078
+ + + + + + ##g -
##X072##X071##X078
-
-
- - [  - ##X079 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
-
+
+ + + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_digest_subscribers.html qmailadmin-1.2.16/html/show_digest_subscribers.html --- ../qmailadmin-1.2.16-original/html/show_digest_subscribers.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_digest_subscribers.html 2020-05-03 22:27:14.000000000 +0200 @@ -1,55 +1,22 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X247 - -
- - - - - - -
- - - - -
- ##X248 ##A@##D

- ##G -

-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X247

+ +
##X248 ##A@##D
+ + ##G + +
+ +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_forwards.html qmailadmin-1.2.16/html/show_forwards.html --- ../qmailadmin-1.2.16-original/html/show_forwards.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_forwards.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,55 +1,32 @@ - - -
-

##S

- -
- - - - - - - - - - - - - -
##D##X074[##X254 ##k]
- - - - - - -
- - - - - - + +
+ +

##D

+ + +
##X074 ##X254 ##k
+ +
##X072##X071##X106##X305
+ + + + + + + ##d -
##X072##X071##X106##X305
-
-
- - [  - ##X076 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + + +
+ +
diff -ruN ../qmailadmin-1.2.16-original/html/show_login.html qmailadmin-1.2.16/html/show_login.html --- ../qmailadmin-1.2.16-original/html/show_login.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_login.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,126 +1,26 @@ - - +
- - -
-

##S

- - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
- - -
-
- - -
-
- - -
-
- -
- - - - - - - - - - -
##X112
##X113
##X057
- - - -
##X316
-
- - -
- - -
-
- - - -
-
- - - -
-
- - - - -
-
- ##V -
-
-
- -##th - ##X257
- ##X258
- ##X259 -##tt -
- - -
-
- - -
-
- - -
-
- - -
-
-
+ + +

[ ##X316 ]

+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_mailinglist.html qmailadmin-1.2.16/html/show_mailinglist.html --- ../qmailadmin-1.2.16-original/html/show_mailinglist.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_mailinglist.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,48 +1,23 @@ - - -
-

##S

- -
- - - - - - - - - - - - - -
##D##X080[##X254 ##j]
- - - - - - -
- - ##e -
-
-
- - [  - ##X089 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##D

+ +
##X080 ##X254 ##j
+ + + ##e +
+ +
+ + +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_moderators.html qmailadmin-1.2.16/html/show_moderators.html --- ../qmailadmin-1.2.16-original/html/show_moderators.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_moderators.html 2020-05-03 22:26:48.000000000 +0200 @@ -1,55 +1,24 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X219 - -
- - - - - - -
- - - - -
- ##X191 ##A@##D

- ##o -

-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ +

##X219

+ +
##X191 ##A@##D
+ + + ##o + +
+ + +
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html/show_subscribers.html qmailadmin-1.2.16/html/show_subscribers.html --- ../qmailadmin-1.2.16-original/html/show_subscribers.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_subscribers.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,55 +1,25 @@ - - -
-

##S

- -
- - - - - - - - - - - -
- - ##X221 - -
- - - - - - -
- - - - -
-

##X189 ##A@##D

- ##M -
-
-
- - [  - ##X080 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ + +
+ + +

##X221

+ + +
##X189 ##A@##D
+ + + ##M + +
+ +
+ +
diff -ruN ../qmailadmin-1.2.16-original/html/show_users.html qmailadmin-1.2.16/html/show_users.html --- ../qmailadmin-1.2.16-original/html/show_users.html 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/html/show_users.html 2020-05-03 20:10:20.000000000 +0200 @@ -1,61 +1,37 @@ - - -
-

##S

- -
- - - - - - - - - - - - - -
##D##X061[##X254 ##B]
- - - - - - -
- - - - - - - - - - - - - - - ##p -
##s
##X002##X063##X250 / ##X249  ##X064##X065##X066
-
-
- - [  - ##X067 -  |  - ##X001 -  |  -##x -  ] - -
-
-
- -
- -
+ +
+ +

##D

+ + +
##X061 ##X254 ##B
+ +
##s
+ + + + + + + + + + + + + + ##p + +
##X002##X063##X250##X249##X064##X065##X066
+ +
+
+ +
\ No newline at end of file diff -ruN ../qmailadmin-1.2.16-original/html.h qmailadmin-1.2.16/html.h --- ../qmailadmin-1.2.16-original/html.h 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/html.h 2020-05-03 13:22:18.000000000 +0200 @@ -18,47 +18,46 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -#define HTML_MENU_START "[ " -#define HTML_MENU_SEP " | " -#define HTML_MENU_END " ]" +#define HTML_MENU_START "[ " +#define HTML_MENU_SEP " | " +#define HTML_MENU_END " ]" #define HTML_EMPTY_TD " " -#define HTML_BTN_GENERIC "" -#define HTML_BTN_DELETE "" +#define HTML_BTN_GENERIC "clear" +#define HTML_BTN_DELETE "delete_forever" #define HTML_ALIAS_ERROR "%s %s\n" #define HTML_ALIAS_ROW_START "" #define HTML_ALIAS_ROW_END "\n" -#define HTML_ALIAS_NAME "%H" +#define HTML_ALIAS_NAME "%H" // start of the list of destination addresses -#define HTML_ALIAS_DEST_START "" +#define HTML_ALIAS_DEST_START "" #define HTML_ALIAS_DEST_END "" // Possible destinations in list // BLACKHOLE uses text string 303 (All mail deleted) -#define HTML_ALIAS_BLACKHOLE "%s" +#define HTML_ALIAS_BLACKHOLE "%s" // LOCAL is for local addresses (no domain shown) #define HTML_ALIAS_LOCAL "%H" // INVALID is for local addresses that no longer exist (error condition) -#define HTML_ALIAS_INVALID "%H" +#define HTML_ALIAS_INVALID "%H" // REMOTE is for remote addresses (domain is shown) #define HTML_ALIAS_REMOTE "%H" #define HTML_ALIAS_SHOWPAGE "%s" #define HTML_ALIAS_DOSEARCH "%s" -#define HTML_ALIAS_FOOTER_START "" +#define HTML_ALIAS_FOOTER_START "" #define HTML_ALIAS_FOOTER_END "" // HTML from the "modify alias" page #define HTML_ALIAS_MOD_ROW_START "" #define HTML_ALIAS_MOD_ROW_END "" -#define HTML_ALIAS_MOD_NAME "%H" -#define HTML_ALIAS_MOD_DEST "%s\n" -#define HTML_ALIAS_MOD_DELETE "" \ +#define HTML_ALIAS_MOD_NAME "%H" +#define HTML_ALIAS_MOD_DEST "%s\n" +#define HTML_ALIAS_MOD_DELETE "" \ "" HTML_BTN_DELETE "\n" - Binary files ../qmailadmin-1.2.16-original/images/favicon-16x16.png and qmailadmin-1.2.16/images/favicon-16x16.png differ Binary files ../qmailadmin-1.2.16-original/images/favicon-32x32.png and qmailadmin-1.2.16/images/favicon-32x32.png differ Binary files ../qmailadmin-1.2.16-original/images/logo.png and qmailadmin-1.2.16/images/logo.png differ Binary files ../qmailadmin-1.2.16-original/images/logo_big.png and qmailadmin-1.2.16/images/logo_big.png differ diff -ruN ../qmailadmin-1.2.16-original/images/style.css qmailadmin-1.2.16/images/style.css --- ../qmailadmin-1.2.16-original/images/style.css 1970-01-01 01:00:00.000000000 +0100 +++ qmailadmin-1.2.16/images/style.css 2020-05-05 14:58:17.283124241 +0200 @@ -0,0 +1,77 @@ +.mt {margin-top: 40px;} +.mo {margin-left: 15px; margin-right: 15px;} +.mbc {margin-bottom: 90px;} +.p0, .p0 a {padding: 0px;} +footer { + font-size: 80%; + padding-top: 10px; + background-color: #ebebeb; + text-align: center; +} +h2 {margin-bottom: 40px;} +h5 {padding-bottom: 20px;} + +.form-signin { + width: 100%; + max-width: 330px; + padding: 15px; + margin: auto; +} +.form-signin .checkbox { + font-weight: 400; +} +.form-signin .form-control { + position: relative; + box-sizing: border-box; + height: auto; + padding: 10px; + font-size: 16px; +} +.form-signin .form-control:focus { + z-index: 2; +} +.form-signin input[type="password"] {margin-bottom: 10px;} +.my-input, input[type="text"] { + border: 1px solid #ced4da; + border-radius: .25rem; + padding-left: 5px; + padding-right: 5px; + margin-right: 10px; +} +.my-select { + padding: .1rem .1rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #495057; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} +td input[type="radio"] { + margin-left: 5px; + margin-right: 5px; +} +.btn-block, .btn-primary, .badge-primary { + background-color: #337ab7; + border-color: #2e6da4; +} +.d-flex div { + padding: .75rem 1.25rem; + margin-bottom: 20px; + margin-right: 20px; + border: 1px solid #ced4da; + border-radius: .25rem; + transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out; +} +.material-icons { + color:#555; + vertical-align:middle; +} + +.table.big thead th { + font-size: 0.8rem; + padding: .40rem; +} diff -ruN ../qmailadmin-1.2.16-original/lang/en qmailadmin-1.2.16/lang/en --- ../qmailadmin-1.2.16-original/lang/en 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/lang/en 2020-05-03 11:09:15.000000000 +0200 @@ -8,7 +8,7 @@ 007 Add Forward Account: 008 Forward Email Address: 009 Local Name: -010 (Account name to forward to
OR
full email address if forwarding to another domain) +010 (Account name to forward to OR full email address if forwarding to another domain.) 011 Add List Moderator 012 Add Moderator to mailing list 013 Email Address: diff -ruN ../qmailadmin-1.2.16-original/lang/it qmailadmin-1.2.16/lang/it --- ../qmailadmin-1.2.16-original/lang/it 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/lang/it 2020-05-03 11:05:14.000000000 +0200 @@ -8,7 +8,7 @@ 007 Aggiungi Forward: 008 Indirizzo Email Forward: 009 Casella locale: -010 L'indirizzo destinatario dell'inoltro deve essere indicato nella forma casella@dominio.xxx.
Il nome locale deve essere indicato nella forma: casella
Esempio:
Forward: remo@remo.it Nome locale: pluto
In questo modo tutto cio' che sara' inviato alla casella pluto del vostro dominio sara' inoltrato a remo@remo.it +010 L'indirizzo destinatario dell'inoltro deve essere indicato nella forma casella@dominio.xxx.
Il nome locale deve essere indicato nella forma: casella
Esempio:
Forward: remo@remo.it Nome locale: pluto
In questo modo tutto cio' che sara' inviato alla casella pluto del vostro dominio sara' inoltrato a remo@remo.it 011 Aggiungi moderatore della lista 012 Aggiungi moderatore alla Lista 013 Indirizzo Email: diff -ruN ../qmailadmin-1.2.16-original/mailinglist.c qmailadmin-1.2.16/mailinglist.c --- ../qmailadmin-1.2.16-original/mailinglist.c 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/mailinglist.c 2020-05-05 15:49:45.566952776 +0200 @@ -59,6 +59,10 @@ #define REPLYTO_LIST 2 #define REPLYTO_ADDRESS 3 +#define GROUP_SUBSCRIBER 0 +#define GROUP_MODERATOR 1 +#define GROUP_DIGEST 2 + void set_options(); void default_options(); @@ -110,24 +114,24 @@ } /* First display the title row */ - printf (""); - printf ("%s", html_text[72]); + printf ("\n"); + printf ("%s\n", html_text[72]); #ifdef EZMLMIDX - printf ("%s", html_text[71]); + printf ("%s\n", html_text[71]); #endif - printf ("%s", html_text[81]); - printf ("%s", html_text[83]); - printf ("%s", html_text[84]); - printf ("%s", html_text[85]); + printf ("%s\n", html_text[81]); + printf ("%s\n", html_text[83]); + printf ("%s\n", html_text[84]); + printf ("%s\n", html_text[85]); #ifdef EZMLMIDX - printf ("%s", html_text[86]); - printf ("%s", html_text[87]); - printf ("%s", html_text[88]); - printf ("%s", html_text[237]); - printf ("%s", html_text[238]); - printf ("%s", html_text[239]); + printf ("%s\n", html_text[86]); + printf ("%s\n", html_text[87]); + printf ("%s\n", html_text[88]); + printf ("%s\n", html_text[237]); + printf ("%s\n", html_text[238]); + printf ("%s\n", html_text[239]); #endif - printf ("\n"); + printf ("\n\n"); sort_init(); @@ -136,9 +140,9 @@ if ( strncmp(".qmail-", mydirent->d_name, 7) == 0 ) { if ( (fs=fopen(mydirent->d_name,"r"))==NULL) { #ifdef EZMLMIDX - printf ("%s %s\n", html_text[144], mydirent->d_name); + printf ("%s %s\n", html_text[144], mydirent->d_name); #else - printf ("%s %s\n", html_text[144], mydirent->d_name); + printf ("%s %s\n", html_text[144], mydirent->d_name); #endif continue; } @@ -158,34 +162,34 @@ str_replace (addr, ':', '.'); printf (""); - qmail_button(addr, "delmailinglist", user, dom, mytime, "trash.png"); + qmail_button(addr, "delmailinglist", user, dom, mytime, "delete_forever"); #ifdef EZMLMIDX - qmail_button(addr, "modmailinglist", user, dom, mytime, "modify.png"); + qmail_button(addr, "modmailinglist", user, dom, mytime, "create"); #endif - printh ("%H\n", addr); + printh ("%H\n", addr); - qmail_button(addr, "addlistuser", user, dom, mytime, "delete.png"); - qmail_button(addr, "dellistuser", user, dom, mytime, "delete.png"); - qmail_button(addr, "showlistusers", user, dom, mytime, "delete.png"); + qmail_button(addr, "addlistuser", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "dellistuser", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "showlistusers", user, dom, mytime, "radio_button_checked"); #ifdef EZMLMIDX - qmail_button(addr, "addlistmod", user, dom, mytime, "delete.png"); - qmail_button(addr, "dellistmod", user, dom, mytime, "delete.png"); - qmail_button(addr, "showlistmod", user, dom, mytime, "delete.png"); + qmail_button(addr, "addlistmod", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "dellistmod", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "showlistmod", user, dom, mytime, "radio_button_checked"); /* Is it a digest list? */ if ( (fs=fopen(testfn,"r"))==NULL) { /* not a digest list */ - printf (" "); + printf (" "); } else { - qmail_button(addr, "addlistdig", user, dom, mytime, "delete.png"); - qmail_button(addr, "dellistdig", user, dom, mytime, "delete.png"); - qmail_button(addr, "showlistdig", user, dom, mytime, "delete.png"); + qmail_button(addr, "addlistdig", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "dellistdig", user, dom, mytime, "radio_button_checked"); + qmail_button(addr, "showlistdig", user, dom, mytime, "radio_button_checked"); fclose(fs); } #endif - printf ("\n"); + printf ("\n\n"); } sort_cleanup(); } @@ -222,7 +226,7 @@ } if ( (mydir = opendir(".")) == NULL ) { - printf ("%s %d
\n", html_text[143], 1); + printf ("%s %d
\n", html_text[143], 1); return; } @@ -246,30 +250,27 @@ } closedir(mydir); + /* subscibe user to the following lists */ /* if there aren't any lists, don't display anything */ if (listcount == 0) { sort_cleanup(); return; } - printf ("
"); - printf (""); - printf ("\n", - html_text[95]); + printf ("

%s

\n", html_text[95]); sort_dosort(); - printf ("\n", listcount); + printf ("\n", listcount); + printf ("
    "); for (i = 0; i < listcount; ++i) { addr = sort_get_entry(i); str_replace (addr, ':', '.'); - printh ("
", i, addr); - printh ("", addr, Domain); + printh ("
  • ", i, addr); + printh ("%H@%H
  • ", addr, Domain); } - printf ("
    "); - printf ("%s
    %H@%H
    \n"); + printf ("\n"); sort_cleanup(); } @@ -533,7 +534,7 @@ arguments[argc++]=TmpBuf3; arguments[argc++]=ActionUser; arguments[argc++]=Domain; - arguments[argc]=NULL; + arguments[argc]=(char *) NULL; execv(TmpBuf1, arguments); exit(127); @@ -541,29 +542,6 @@ wait(&pid); } - /* - * ezmlm-make -e leaves .qmail-listname-(accept||reject) links for some reason. - * (causing file permission errors in "show mailing lists") Also, it doesn't - * delete dir/digest/ when turning off digests. This section cleans up... - */ - if(listopt['M'-'A'] == 'M') { /* moderation off */ - sprintf(tmp, "%s/.qmail-%s-accept-default", RealDir, dotqmail_name); - unlink (tmp); - sprintf(tmp, "%s/.qmail-%s-reject-default", RealDir, dotqmail_name); - unlink (tmp); - } - if(listopt['D'-'A'] == 'D') { /* digest off */ - sprintf(tmp, "%s/.qmail-%s-digest-return-default", RealDir, dotqmail_name); - unlink (tmp); - sprintf(tmp, "%s/.qmail-%s-digest-owner", RealDir, dotqmail_name); - unlink (tmp); - - /* delete the digest directory */ - sprintf(tmp, "%s/%s/digest", RealDir, ActionUser); - vdelfiles(tmp); - chdir(RealDir); - } - /* Check for prefix setting */ GetValue(TmpCGI, tmp, "prefix=", sizeof(tmp)); @@ -617,10 +595,10 @@ #ifdef EZMLMIDX /* if this is a new list, add owner as subscriber */ if (newlist && (*list_owner != '\0')) { - ezmlm_sub ("", list_owner); + ezmlm_sub (GROUP_SUBSCRIBER, list_owner); if (listopt['M'-'A'] == 'm') { /* moderation on */ /* add owner as moderator/remote admin as well */ - ezmlm_sub ("mod", list_owner); + ezmlm_sub (GROUP_MODERATOR, list_owner); } } #endif @@ -680,14 +658,14 @@ close(handles[0]); dup2(handles[1],fileno(stdout)); sprintf(TmpBuf1, "%s/ezmlm-list", EZMLMDIR); - if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); - } else if(mod == 2) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); + if(mod == GROUP_MODERATOR) { + execl(TmpBuf1, "ezmlm-list", TmpBuf2, "mod", (char *)NULL); + } else if(mod == GROUP_DIGEST) { + execl(TmpBuf1, "ezmlm-list", TmpBuf2, "digest", (char *)NULL); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + execl(TmpBuf1, "ezmlm-list", TmpBuf2, (char *)NULL); } - execl(TmpBuf1, "ezmlm-list", TmpBuf2, NULL); exit(127); } else { close(handles[1]); @@ -715,16 +693,20 @@ /* strcpy(TmpBuf2, "084"); */ } strcpy(TmpBuf2, "072"); - printf ("\n"); - printf (" \n"); - printf (" \n", get_html_text(TmpBuf), subuser_count); - printf (" \n"); - printf (" \n", get_color_text("002")); - printf (" \n", get_html_text(TmpBuf2)); - printf (" \n", get_html_text(TmpBuf1)); - printf (" \n", get_html_text(TmpBuf2)); - printf (" \n", get_html_text(TmpBuf1)); - printf (" \n"); + /* total subscribers */ + printf ("

    %s %d

    ", get_html_text(TmpBuf), subuser_count); + + /* column names */ + /* + printf ("\n"); + printf ("\n", get_html_text(TmpBuf2)); + printf ("\n", get_html_text(TmpBuf1)); + printf ("\n", get_html_text(TmpBuf2)); + printf ("\n", get_html_text(TmpBuf1)); + printf ("\n"); + */ + + printf ("
    \n"); if(mod == 1) { strcpy(TmpBuf, "dellistmodnow"); @@ -733,25 +715,25 @@ } else { strcpy(TmpBuf, "dellistusernow"); } + for(z = 0; (addr = sort_get_entry(z)); ++z) { - printf ("
    "); - printh (" \n", - cgiurl(TmpBuf), ActionUser, addr, IMAGEURL); - printh (" \n", addr); + printh ("
    delete_forever ", + cgiurl(TmpBuf), ActionUser, addr); + printh ("%H
    \n", addr); ++z; if( (addr = sort_get_entry(z)) ) { - printh (" \n", - cgiurl(TmpBuf), ActionUser, addr, IMAGEURL); - printh (" \n", addr); + printh ("
    delete_forever ", + cgiurl(TmpBuf), ActionUser, addr); + printh ("%H
    \n", addr); } else { - printf (" "); + printf (" "); } - printf (" "); } + printf ("\n"); + sort_cleanup(); - printf ("
    %s %d

    %s%s%s%s
    %s%s%s%s
    %H%H
    "); fclose(fs); close(handles[0]); wait(&pid); snprintf (StatusMessage, sizeof(StatusMessage), "%s\n", html_text[190]); @@ -790,7 +772,7 @@ void addlistdig() { addlistgroup( "add_listdig.html" ); } /* returns 0 for success */ -int ezmlm_sub (char *dir, char *email) +int ezmlm_sub (int mod, char *email) { int pid; char subpath[MAX_BUFF]; @@ -799,9 +781,14 @@ pid=fork(); if (pid==0) { snprintf(subpath, sizeof(subpath), "%s/ezmlm-sub", EZMLMDIR); - snprintf(listpath, sizeof(listpath), "%s/%s/%s", - RealDir, ActionUser, dir); - execl(subpath, "ezmlm-sub", listpath, email, NULL); + snprintf(listpath, sizeof(listpath), "%s/%s", RealDir, ActionUser); + if (mod == GROUP_MODERATOR) { + execl(subpath, "ezmlm-sub", listpath, "mod", email, (char *)NULL); + } else if (mod == GROUP_DIGEST) { + execl(subpath, "ezmlm-sub", listpath, "digest", email, (char *)NULL); + } else { + execl(subpath, "ezmlm-sub", listpath, email, (char *)NULL); + } exit(127); } else wait(&pid); @@ -824,9 +811,9 @@ if ( check_email_addr(Newu) ) { snprinth (StatusMessage, sizeof(StatusMessage), "%s %H\n", html_text[148], Newu); - if (mod == 1) { + if (mod == GROUP_MODERATOR) { addlistmod(); - } else if (mod == 2) { + } else if (mod == GROUP_DIGEST) { addlistdig(); } else { addlistuser(); @@ -835,18 +822,16 @@ exit(0); } - if(mod == 1 ) { - ezmlm_sub ("mod", Newu); + ezmlm_sub (mod, Newu); + if(mod == GROUP_MODERATOR ) { snprinth (StatusMessage, sizeof(StatusMessage), "%H %s %H@%H\n", Newu, html_text[194], ActionUser, Domain); send_template( "add_listmod.html" ); - } else if(mod == 2) { - ezmlm_sub ("digest", Newu); + } else if(mod == GROUP_DIGEST) { snprinth (StatusMessage, sizeof(StatusMessage), "%H %s %H@%H\n", Newu, html_text[240], ActionUser, Domain); send_template( "add_listdig.html" ); } else { - ezmlm_sub ("", Newu); snprinth (StatusMessage, sizeof(StatusMessage), "%H %s %H@%H\n", Newu, html_text[193], ActionUser, Domain); send_template( "add_listuser.html" ); @@ -888,21 +873,21 @@ pid=fork(); if (pid==0) { sprintf(TmpBuf1, "%s/ezmlm-unsub", EZMLMDIR); - if(mod == 1) { - sprintf(TmpBuf2, "%s/%s/mod", RealDir, ActionUser); - } else if(mod == 2 ) { - sprintf(TmpBuf2, "%s/%s/digest", RealDir, ActionUser); + sprintf(TmpBuf2, "%s/%s", RealDir, ActionUser); + if(mod == GROUP_MODERATOR) { + execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, "mod", Newu, (char *)NULL); + } else if(mod == GROUP_DIGEST ) { + execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, "digest", Newu, (char *)NULL); } else { - sprintf(TmpBuf2, "%s/%s/", RealDir, ActionUser); + execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, Newu, (char *)NULL); } - execl(TmpBuf1, "ezmlm-unsub", TmpBuf2, Newu, NULL); exit(127); } else wait(&pid); - if(mod == 1) { + if(mod == GROUP_MODERATOR) { snprinth (StatusMessage, sizeof(StatusMessage), "%H %s %H@%H\n", Newu, html_text[197], ActionUser, Domain); - } else if(mod == 2) { + } else if(mod == GROUP_DIGEST) { snprinth (StatusMessage, sizeof(StatusMessage), "%H %s %H@%H\n", Newu, html_text[242], ActionUser, Domain); } else { @@ -921,7 +906,7 @@ FILE *fs; if ( (mydir = opendir(".")) == NULL ) { - printf ("%s %d
    \n", html_text[143], 1); + printf ("%s %d
    \n", html_text[143], 1); printf (""); return; } @@ -1092,42 +1077,96 @@ // default to false for lowercase letters for (c = 'a'; c <= 'z'; checkopt[(int) c++] = 0); - // figure out some options in the -default file + // ------ newer configuration reads + + // -s: Subscription moderation. touching dir/modsub + sprintf(TmpBuf, "%s/modsub", ActionUser); + checkopt['s'] = file_exists(TmpBuf); + // -h: Help subscription. Don't require confirmation. Not recommented! + sprintf(TmpBuf, "%s/nosubconfirm", ActionUser); + checkopt['h'] = file_exists(TmpBuf); + // -j Jump off. Unsubscribe does not require confirmation. + sprintf(TmpBuf, "%s/nounsubconfirm", ActionUser); + checkopt['j'] = file_exists(TmpBuf); + + // -m: Message moderation. touch dir/modpost + sprintf(TmpBuf, "%s/modpost", ActionUser); // valid for newer ezmlm-versions + checkopt['m'] = file_exists(TmpBuf); + // -o: Reject others than; applicable to message moderated lists only + sprintf(TmpBuf, "%s/modpostonly", ActionUser); + checkopt['o'] = file_exists(TmpBuf); + // -u: User posts only. subscribers, digest-subscribers and dir/allow + sprintf(TmpBuf, "%s/subpostonly", ActionUser); + checkopt['u'] = file_exists(TmpBuf); + + // -f: Subject Prefix. outgoing subject will be pre-fixed with the list name + sprintf(TmpBuf, "%s/prefix", ActionUser); + checkopt['f'] = file_exists(TmpBuf); + // -t: Message Trailer. create dir/text/trailer + sprintf(TmpBuf, "%s/addtrailer", ActionUser); + checkopt['t'] = file_exists(TmpBuf); + + // -a: Archived: touch dir/archived and dir/indexed + sprintf(TmpBuf, "%s/archived", ActionUser); + checkopt['a'] = file_exists(TmpBuf); + // -i: indexed for WWW archive access + sprintf(TmpBuf, "%s/threaded", ActionUser); + checkopt['i'] = file_exists(TmpBuf); + // -p: Public archive. touch dir/public + sprintf(TmpBuf, "%s/public", ActionUser); + checkopt['p'] = file_exists(TmpBuf); + // -g: Guard archive. Access requests from unrecognized SENDERs will be rejected. + sprintf(TmpBuf, "%s/subgetonly", ActionUser); + checkopt['g'] = file_exists(TmpBuf); + // -b: Block archive. Only moderators are allowed to access the archive. + sprintf(TmpBuf, "%s/modgetonly", ActionUser); + checkopt['b'] = file_exists(TmpBuf); + + // -d: Digest + sprintf(TmpBuf, "%s/digested", ActionUser); + checkopt['d'] = file_exists(TmpBuf); + + // -r: Remote admin. touching dir/remote + sprintf(TmpBuf, "%s/remote", ActionUser); + checkopt['r'] = file_exists(TmpBuf); + // -l List subscribers. administrators can request a subscriber + sprintf(TmpBuf, "%s/modcanlist", ActionUser); + checkopt['l'] = file_exists(TmpBuf); + // -n New text file. administrators may edit texts + sprintf(TmpBuf, "%s/modcanedit", ActionUser); + checkopt['n'] = file_exists(TmpBuf); + + // ------ end of newer configuration reads + + // ------ read in old ezmlm's values + // 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)) { + // -b: Block archive. Only moderators are allowed to access the archive. if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 'P')) > 0) { checkopt['b'] = 1; } + // -g: Guard archive. Access requests from unrecognized SENDERs will be rejected. if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-get", 's')) > 0) { checkopt['g'] = 1; } - if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'S')) > 0) { + // -h: Help subscription. Don't require confirmation. Not recommented! + if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'S')) > 0){ checkopt['h'] = 1; } + // -j Jump off. Unsubscribe does not require confirmation. if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'U')) > 0) { checkopt['j'] = 1; } + // -l List subscribers. administrators can request a subscriber if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'l')) > 0) { checkopt['l'] = 1; } + // -n New text file. administrators may edit texts if((get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-manage", 'e')) > 0) { checkopt['n'] = 1; } - if((strstr(TmpBuf2, "ezmlm-request")) != 0) { - checkopt['q'] = 1; - } - } - fclose(fs); - } - - // 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) { - checkopt['i'] = 1; - } } fclose(fs); } @@ -1136,43 +1175,21 @@ 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) { + // -o: Reject others than; applicable to message moderated lists only + if( ( (get_ezmlmidx_line_arguments(TmpBuf2, "ezmlm-store", 'P')) > 0)){ checkopt['o'] = 1; } - if((strstr(TmpBuf2, "ezmlm-gate")) != 0 || (strstr(TmpBuf2, "ezmlm-issubn")) != 0) { - checkopt['u'] = 1; - } - if(strstr(TmpBuf2, "ezmlm-archive") !=0) { - checkopt['i'] = 1; - } } fclose(fs); } - sprintf(TmpBuf, ".qmail-%s-accept-default", dotqmail_name); - checkopt['m'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/archived", ActionUser); - checkopt['a'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/digest/bouncer", ActionUser); - checkopt['d'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/prefix", ActionUser); - checkopt['f'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/public", ActionUser); - checkopt['p'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/remote", ActionUser); - checkopt['r'] = file_exists(TmpBuf); - - sprintf(TmpBuf, "%s/modsub", ActionUser); - checkopt['s'] = file_exists(TmpBuf); - + // -t: Message Trailer. create dir/text/trailer sprintf(TmpBuf, "%s/text/trailer", ActionUser); - checkopt['t'] = file_exists(TmpBuf); - + if (file_exists(TmpBuf)) { + checkopt['t'] = 1; + } + // ------ end of read in old ezmlm's values + /* update the uppercase option letters (just the opposite of the lowercase) */ for (c = 'A'; c <= 'Z'; c++) { @@ -1208,7 +1225,7 @@ checkopt['n'] = 0; /* Remote admins can edit text files */ checkopt['o'] = 0; /* Others rejected (for Moderated lists only */ checkopt['p'] = 1; /* Public */ - checkopt['q'] = 1; /* Service listname-request */ + checkopt['q'] = 1; /* Service listname-request, no longer supported */ checkopt['r'] = 0; /* Remote Administration */ checkopt['s'] = 0; /* Subscriptions are moderated */ checkopt['t'] = 0; /* Add Trailer to outgoing messages */ @@ -1253,93 +1270,88 @@ snprinth (listname, sizeof(listname), "%H", dotqmail_name); str_replace (listname, ':', '.'); } else { - sprintf (listname, "%s", html_text[261]); + sprintf (listname, "%s", html_text[261]); } /* Posting Messages */ - printf ("

    %s
    \n", html_text[262]); - build_option_str ("RADIO", "opt1", "MU", html_text[263]); - printf ("
    \n"); - build_option_str ("RADIO", "opt1", "Mu", html_text[264]); - printf ("
    \n"); - build_option_str ("RADIO", "opt1", "mu", html_text[265]); - printf ("
    \n"); - build_option_str ("RADIO", "opt1", "mUo", html_text[266]); - printf ("
    \n"); - build_option_str ("RADIO", "opt1", "mUO", html_text[267]); - printf ("

    \n"); + printf ("

    %s

    \n

    \n", html_text[262]); + build_option_str ("radio", "opt1", "MU", html_text[263]); + printf ("
    \n"); + build_option_str ("radio", "opt1", "Mu", html_text[264]); + printf ("
    \n"); + build_option_str ("radio", "opt1", "mu", html_text[265]); + printf ("
    \n"); + build_option_str ("radio", "opt1", "mUo", html_text[266]); + printf ("
    \n"); + build_option_str ("radio", "opt1", "mUO", html_text[267]); + printf ("

    \n"); /* List Options */ - printf ("

    %s
    \n", html_text[268]); + printf ("

    %s

    \n

    \n", html_text[268]); /* this next option isn't necessary since we use the edit box to * set/delete the prefix sprintf (TmpBuf, html_text[269], listname); - build_option_str ("CHECKBOX", "opt3", "f", TmpBuf); - printf ("
    \n"); + build_option_str ("checkbox", "opt3", "f", TmpBuf); + printf ("

    \n"); */ - printf ("", + printf ("
    %s
    ", html_text[310]); - printf ("\n", - REPLYTO_SENDER, (replyto == REPLYTO_SENDER) ? " CHECKED" : "", html_text[311]); - printf ("\n", - REPLYTO_LIST, (replyto == REPLYTO_LIST) ? " CHECKED" : "", html_text[312]); - printf ("\n", + printf ("\n", + REPLYTO_SENDER, (replyto == REPLYTO_SENDER) ? " checked" : "", html_text[311]); + printf ("\n", + REPLYTO_LIST, (replyto == REPLYTO_LIST) ? " checked" : "", html_text[312]); + printf ("\n", replyto_addr); - printf ("
    %s%s
    %s
    %s ", - REPLYTO_ADDRESS, (replyto == REPLYTO_ADDRESS) ? " CHECKED" : "", html_text[313]); - printh ("
    %s
    %s
    %s ", + REPLYTO_ADDRESS, (replyto == REPLYTO_ADDRESS) ? " checked" : "", html_text[313]); + printh ("

    \n"); - build_option_str ("CHECKBOX", "opt4", "t", html_text[270]); - printf ("
    \n"); - build_option_str ("CHECKBOX", "opt5", "d", html_text[271]); + printf ("
    \n"); + build_option_str ("checkbox", "opt4", "t", html_text[270]); + printf ("
    \n"); + build_option_str ("checkbox", "opt5", "d", html_text[271]); sprintf (TmpBuf, html_text[272], listname); - printf ("(%s)", TmpBuf); - printf ("
    \n"); - sprintf (TmpBuf, html_text[273], listname); - build_option_str ("CHECKBOX", "opt6", "q", TmpBuf); - printf ("
    \n"); - sprintf (TmpBuf, html_text[274], listname, listname, listname); - printf ("    (%s)

    ", TmpBuf); + printf ("(%s)", TmpBuf); + printf ("

    ", TmpBuf); /* Remote Administration */ - printf ("

    %s
    \n", html_text[275]); - build_option_str ("CHECKBOX", "opt7", "r", html_text[276]); - printf ("
    \n"); - build_option_str ("CHECKBOX", "opt8", "P", html_text[277]); - printf ("(%s)
    ", html_text[278]); - printf ("", + printf ("

    %s

    \n

    \n", html_text[275]); + build_option_str ("checkbox", "opt7", "r", html_text[276]); + printf ("
    \n"); + build_option_str ("checkbox", "opt8", "P", html_text[277]); + printf ("(%s)
    ", html_text[278]); + printf ("

    %s
    ", html_text[279]); - printf ("\n\n\n", html_text[282]); - printf ("
    %s"); - build_option_str ("CHECKBOX", "opt9", "l", html_text[280]); - printf ("
    "); - build_option_str ("CHECKBOX", "opt10", "n", html_text[281]); - printf ("(%s).
    \n

    \n"); - - printf ("

    %s
    \n", html_text[283]); - printf ("%s
    \n    ", html_text[284]); - build_option_str ("CHECKBOX", "opt11", "H", html_text[285]); - printf ("
    \n    "); - build_option_str ("CHECKBOX", "opt12", "s", html_text[286]); - printf ("
    \n%s
    \n    ", html_text[287]); - build_option_str ("CHECKBOX", "opt13", "J", html_text[285]); - printf ("
    \n"); - printf ("%s\n

    \n", html_text[288]); - - printf ("

    %s
    \n", html_text[289]); - build_option_str ("CHECKBOX", "opt14", "a", html_text[290]); - printf ("   %s\n."); - printf ("
    \n"); + printf (""); + build_option_str ("checkbox", "opt9", "l", html_text[280]); + printf ("\n\n"); + build_option_str ("checkbox", "opt10", "n", html_text[281]); + printf ("(%s).\n", html_text[282]); + printf ("\n

    \n"); + + printf ("

    %s

    \n

    \n", html_text[283]); + printf ("%s
    \n    ", html_text[284]); + build_option_str ("checkbox", "opt11", "H", html_text[285]); + printf ("
    \n    "); + build_option_str ("checkbox", "opt12", "s", html_text[286]); + printf ("
    \n%s
    \n    ", html_text[287]); + build_option_str ("checkbox", "opt13", "J", html_text[285]); + printf ("
    \n"); + printf ("%s\n

    \n", html_text[288]); + + printf ("

    %s

    \n

    \n", html_text[289]); + build_option_str ("checkbox", "opt14", "a", html_text[290]); + printf ("   %s\n."); + printf ("
    \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", "opt16", "i", html_text[291]); - printf ("

    \n"); + build_option_str ("checkbox", "opt16", "i", html_text[291]); + printf ("

    \n"); /***********************/ /* begin MySQL options */ @@ -1361,15 +1373,15 @@ fclose(fs); } #ifdef ENABLE_MYSQL - printf ("

    %s
    \n", html_text[99]); + printf ("

    %s

    \n

    \n", html_text[99]); printf (" %s", - checked ? " CHECKED" : "", html_text[53]); + checked ? " checked" : "", html_text[53]); /* parse dir/sql file for SQL settings */ - printf (" \n"); + printf ("
    \n"); #else if (checked) - printf ("\n"); + printf ("\n"); #endif /* get hostname */ @@ -1383,12 +1395,12 @@ } #ifdef ENABLE_MYSQL - printf (" \n"); - printf (" \n", checked1); + printf ("\n"); + printf ("\n", checked1); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif /* get port */ @@ -1401,12 +1413,12 @@ } } #ifdef ENABLE_MYSQL - printf (" \n", checked1); - printf (" \n"); + printf ("\n", checked1); + printf ("\n"); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif /* get user */ @@ -1419,12 +1431,12 @@ } } #ifdef ENABLE_MYSQL - printf (" \n"); - printf (" \n", checked1); + printf ("\n"); + printf ("\n", checked1); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif /* get password */ @@ -1437,12 +1449,12 @@ } } #ifdef ENABLE_MYSQL - printf (" \n", checked1); - printf (" \n"); + printf ("\n", checked1); + printf ("\n"); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif /* get database name */ @@ -1455,12 +1467,12 @@ } } #ifdef ENABLE_MYSQL - printf (" \n"); - printf (" \n", checked1); + printf ("\n"); + printf ("\n", checked1); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif /* get table name */ @@ -1473,13 +1485,13 @@ } } #ifdef ENABLE_MYSQL - printf (" \n", checked1); - printf (" \n"); - printf ("
    %s:\n", html_text[54]); - printf (" \n"); - printh ("
    %s:\n", html_text[54]); + printf ("\n"); + printh ("%s:\n", html_text[55]); - printf (" \n"); - printh ("
    %s:\n", html_text[55]); + printf ("\n"); + printh ("
    %s:\n", html_text[56]); - printf (" \n"); - printh ("
    %s:\n", html_text[56]); + printf ("\n"); + printh ("%s:\n", html_text[57]); - printf (" \n"); - printh ("
    %s:\n", html_text[57]); + printf ("\n"); + printh ("
    %s:\n", html_text[58]); - printf (" \n"); - printh ("
    %s:\n", html_text[58]); + printf ("\n"); + printh ("%s:\n", html_text[59]); - printf (" \n"); - printh ("
    \n"); + printf ("%s:\n", html_text[59]); + printf ("\n"); + printh ("\n", checked1); + printf ("\n"); + printf ("\n"); #else - printh ("\n", checked1); + printh ("\n", checked1); #endif } diff -ruN ../qmailadmin-1.2.16-original/mailinglist.h qmailadmin-1.2.16/mailinglist.h --- ../qmailadmin-1.2.16-original/mailinglist.h 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/mailinglist.h 2020-05-04 11:17:54.219516892 +0200 @@ -13,7 +13,7 @@ void dellistgroupnow(int mod); void delmailinglist(); void delmailinglistnow(); -int ezmlm_sub (char *dir, char *email); +int ezmlm_sub (int mod, char *email); void modmailinglist(); void modmailinglistnow(); void show_list_group(char *template); diff -ruN ../qmailadmin-1.2.16-original/qmailadmin.c qmailadmin-1.2.16/qmailadmin.c --- ../qmailadmin-1.2.16-original/qmailadmin.c 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/qmailadmin.c 2022-04-01 21:40:23.487227663 +0200 @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -50,6 +51,13 @@ #include "template.h" #include "user.h" #include "util.h" +/* cracklib patch */ +#ifdef CRACKLIB +# include +#endif +/* end cracklib */ + +char *Qmalog = "/var/log/qma-auth.log"; char Username[MAX_BUFF]; char Domain[MAX_BUFF]; @@ -109,6 +117,34 @@ char RealDir[156]; char Lang[40]; +static void +log_auth(char *msg) +{ + FILE *fp = NULL; + if ((fp = fopen(Qmalog, "a")) == NULL) { + fprintf(stderr, "Unable to open file %s (privilege problems?)\n", Qmalog); + exit(-1); + } + + const char *ip_addr = getenv("REMOTE_ADDR"); + if (!ip_addr) + ip_addr = "127.0.0.1"; + + time_t tv; + struct tm tm; + char time_buf[64]; + + time(&tv); + localtime_r(&tv, &tm); + strftime(time_buf, sizeof(time_buf) - 2, "%Y/%m/%d %H:%M:%S", &tm); + + fprintf(fp, "%s user:%s@%s ip:%s auth:%s\n", time_buf, Username, Domain, ip_addr, msg); + + if (fclose(fp) != 0) { + exit(-1); + } +} + void qmailadmin_suid (gid_t Gid, uid_t Uid) { if ( geteuid() == 0 ) { @@ -131,6 +167,7 @@ int argc; char *argv[]; { + char *tmpstr; const char *ip_addr=getenv("REMOTE_ADDR"); const char *x_forward=getenv("HTTP_X_FORWARDED_FOR"); char *pi; @@ -195,6 +232,11 @@ if (*Username && (*Password == '\0') && (*Password1 || *Password2)) { /* username entered, but no password */ snprintf (StatusMessage, sizeof(StatusMessage), "%s", html_text[198]); + + char log_buf[3 * MAX_BUFF]; + memset(log_buf, 0x0, sizeof(log_buf)); + snprintf(log_buf, sizeof(log_buf) - 2, "failed [%s@%s]", Newu, Domain); + log_auth(log_buf); } else if (*Username && *Password) { /* attempt to authenticate user */ vget_assign (Domain, RealDir, sizeof(RealDir), &Uid, &Gid); @@ -208,6 +250,11 @@ if ( *Domain == '\0' ) { snprintf (StatusMessage, sizeof(StatusMessage), "%s", html_text[198]); + + char log_buf[3 * MAX_BUFF]; + memset(log_buf, 0x0, sizeof(log_buf)); + snprintf(log_buf, sizeof(log_buf) - 2, "failed [%s@%s]", Newu, Domain); + log_auth(log_buf); } else { chdir(RealDir); load_limits(); @@ -215,6 +262,11 @@ pw = vauth_user( User, Domain, Password, "" ); if ( pw == NULL ) { snprintf (StatusMessage, sizeof(StatusMessage), "%s", html_text[198]); + + char log_buf[3 * MAX_BUFF]; + memset(log_buf, 0x0, sizeof(log_buf)); + snprintf(log_buf, sizeof(log_buf) - 2, "failed [%s@%s]", Newu, Domain); + log_auth(log_buf); } else if (pw->pw_flags & NO_PASSWD_CHNG) { strcpy (StatusMessage, "You don't have permission to change your password."); } else if (strcmp (Password1, Password2) != 0) { @@ -227,6 +279,12 @@ } else if ( strstr(User,Password1)!=NULL) { snprintf (StatusMessage, sizeof(StatusMessage), "%s\n", html_text[320]); #endif +/* cracklib patch */ +#ifdef CRACKLIB + } else if ((tmpstr = FascistCheck(Password1, CRACKLIB)) != NULL ) { + sprintf (StatusMessage, "Bad password - %s\n", tmpstr); +#endif +/* end cracklib */ } else { /* success */ snprintf (StatusMessage, sizeof(StatusMessage), "%s", html_text[139]); @@ -264,6 +322,12 @@ pw = vauth_user( Username, Domain, Password, "" ); if ( pw == NULL ) { snprintf (StatusMessage, sizeof(StatusMessage), "%s\n", html_text[198]); + + char log_buf[3 * MAX_BUFF]; + memset(log_buf, 0x0, sizeof(log_buf)); + snprintf(log_buf, sizeof(log_buf) - 2, "failed [%s@%s]", Newu, Domain); + log_auth(log_buf); + show_login(); vclose(); exit(0); diff -ruN ../qmailadmin-1.2.16-original/qmailadmin.h qmailadmin-1.2.16/qmailadmin.h --- ../qmailadmin-1.2.16-original/qmailadmin.h 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/qmailadmin.h 2021-01-30 22:09:58.246656353 +0100 @@ -41,7 +41,7 @@ #ifdef MAX_BUFF #undef MAX_BUFF #endif -#define MAX_BUFF 500 +#define MAX_BUFF 5000 #define MAX_BIG_BUFF 5000 #define MAX_LANG_STR 500 diff -ruN ../qmailadmin-1.2.16-original/template.c qmailadmin-1.2.16/template.c --- ../qmailadmin-1.2.16-original/template.c 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/template.c 2020-05-03 16:14:53.000000000 +0200 @@ -92,11 +92,11 @@ snprintf(TmpBuf2, (sizeof(TmpBuf2) - 1), "%s/html/%s", tmpstr, filename); if (lstat(TmpBuf2, &mystat) == -1) { - printf("Warning: cannot lstat '%s', check permissions.
    \n", TmpBuf2); + printf("Warning: cannot lstat '%s', check permissions.
    \n", TmpBuf2); return(-1); } if (S_ISLNK(mystat.st_mode)) { - printf("Warning: '%s' is a symbolic link.
    \n", TmpBuf2); + printf("Warning: '%s' is a symbolic link.
    \n", TmpBuf2); return(-1); } @@ -217,9 +217,10 @@ TmpBuf3[j] = TmpBuf2[i]; } TmpBuf3[j] = '\0'; - printh ("value=\"%H@%H\">\n", TmpBuf3, Domain); + /* mod_autorespond.html */ + printh ("value=\"%H@%H\">\n", TmpBuf3, Domain); } else { - printh ("value=\"%H\">\n", &TmpBuf2[1]); + printh ("value=\"%H\">\n", &TmpBuf2[1]); } } upperit(ActionUser); @@ -229,19 +230,16 @@ fgets( TmpBuf2, sizeof(TmpBuf2), fs); fgets( TmpBuf2, sizeof(TmpBuf2), fs); - printf ("  \n"); - printf (" \n"); - printf (" \n"); - printf (" %s\n", html_text[6]); + printf("

    "); + printf("\n", html_text[6]); /* take off newline */ i = strlen(TmpBuf2); --i; TmpBuf2[i] = 0; - printh (" \n", + printh ("\n", &TmpBuf2[9]); - printf ("  \n"); - printf (" \n"); - printf (" \n"); - printf (" "); + printf ("\n
    \n"); fclose(fs); } break; @@ -469,7 +467,7 @@ GetValue (TmpCGI, value, "returntext=", sizeof(value)); GetValue (TmpCGI, value2, "returnhttp=", sizeof(value2)); if (*value != '\0') { - printh ("%H", value2, value); + printh ("%H", value2, value); } break; @@ -512,49 +510,52 @@ /* show version number */ case 'V': - printf("%s %s
    ", + printf("%s %s ~ ", QA_PACKAGE, QA_VERSION); - printf("%s %s
    ", + printf("%s %s", PACKAGE, VERSION); break; /* display the main menu */ /* move this to a function... */ case 'v': - printh ("%H

    ", + printh ("

    %H

    ", Domain); printf ( - "%s
    ", + "
    %s
    ", html_text[1]); + printf (""); } else { /* the quota code in here is kinda screwy and could use review * then again, with recent changes, the non-admin shouldn't @@ -565,53 +566,58 @@ char path[256]; vpw = vauth_getpw(Username, Domain); - printh ("", cgiurl("moduser"), Username); + printf("
      "); + + printh ("
    • ", cgiurl("moduser"), Username); printh ( - "%s %H

      ", + "%s %H
    • ", html_text[111], Username); if (strncmp(vpw->pw_shell, "NOQUOTA", 2) != 0) { quota_to_megabytes(qconvert, vpw->pw_shell); } else { sprintf(qconvert, "%s", html_text[229]); qnote = ""; } - printf ("%s:
      %s %s %s", + printf ("
    • %s:
      %s %s %s", html_text[249], html_text[253], qconvert, qnote); printf ("
      %s ", html_text[254]); snprintf(path, sizeof(path), "%s/" MAILDIR, vpw->pw_dir); readuserquota(path, &diskquota, &maxmsg); - printf ("%-2.2lf MB

      ", ((double)diskquota)/1048576.0); /* Convert to MB */ + printf ("%-2.2lf MB
    • ", ((double)diskquota)/1048576.0); /* Convert to MB */ + + printf("
    "); } if (AdminType == DOMAIN_ADMIN) { - printf ("
    "); + printf (""); } break; @@ -633,9 +639,9 @@ case 'x': strcpy (value, get_session_val("returntext=")); if(strlen(value) > 0) { - printh("%H", get_session_val("returnhttp="), value); + printh("%H", get_session_val("returnhttp="), value); } else { - printh("%s", cgiurl("logout"), html_text[218]); + printh("%s", cgiurl("logout"), html_text[218]); } printf("\n"); break; diff -ruN ../qmailadmin-1.2.16-original/user.c qmailadmin-1.2.16/user.c --- ../qmailadmin-1.2.16-original/user.c 2011-02-22 15:45:48.000000000 +0100 +++ qmailadmin-1.2.16/user.c 2020-05-05 18:08:40.250213748 +0200 @@ -47,7 +47,11 @@ #include "user.h" #include "util.h" #include "vauth.h" - +/* cracklib patch */ +#ifdef CRACKLIB +# include +#endif +/* end cracklib patch */ #define HOOKS 1 @@ -88,7 +92,7 @@ /* Get the default catchall box name */ if ((fs=fopen(".qmail-default","r")) == NULL) { /* report error opening .qmail-default and exit */ - printf ("%s .qmail-default", + printf ("%s .qmail-default\n", colspan, html_text[144]); vclose(); exit(0); @@ -160,8 +164,8 @@ } if (pw == NULL) { - printf ("%s\n", - colspan, get_color_text("000"), html_text[131]); + printf ("%s\n", + colspan, html_text[131]); moreusers = 0; } else { char path[256]; @@ -174,28 +178,28 @@ storage_t maxmsg = 0; /* display account name and user name */ - printf ("", get_color_text("000")); - printh ("%H", pw->pw_name); - printh ("%H", pw->pw_gecos); + printf ("\n"); + printh ("%H\n", pw->pw_name); + printh ("%H\n", pw->pw_gecos); /* display user's quota */ snprintf(path, sizeof(path), "%s/" MAILDIR, pw->pw_dir); readuserquota(path, &diskquota, &maxmsg); - printf ("%-2.2lf / ", ((double)diskquota)/1048576.0); /* Convert to MB */ + printf ("%-2.2lf / \n", ((double)diskquota)/1048576.0); /* Convert to MB */ if (strncmp(pw->pw_shell, "NOQUOTA", 2) != 0) { if(quota_to_megabytes(qconvert, pw->pw_shell)) { - printf ("(BAD)"); + printf ("(BAD)\n"); } - else { printf ("%s", qconvert); } + else { printf ("%s\n", qconvert); } } - else { printf ("%s", html_text[229]); } + else { printf ("%s", html_text[229]); } /* display button to modify user */ - printf (""); + printf (""); printh ("", cgiurl("moduser"), pw->pw_name); - printf ("", IMAGEURL); - printf (""); - + printf ("create"); + printf ("\n"); + /* if the user has admin privileges and pw->pw_name is not * the user or postmaster, allow deleting */ @@ -210,32 +214,29 @@ } /* display trashcan for delete, or nothing if delete not allowed */ - printf (""); + printf (""); if (allowdelete) { printh ("", cgiurl("deluser"), pw->pw_name); - printf ("", IMAGEURL); + printf ("delete_forever"); } else { - /* printf ("", IMAGEURL); */ + /* printf ("flash_off"); */ } - printf (""); + printf ("\n"); /* display button in the 'set catchall' column */ - printf (""); + printf (""); if (bounced==0 && strncmp(pw->pw_name,TmpBuf3,sizeof(TmpBuf3)) == 0) { - printf ("", - IMAGEURL); + printf ("radio_button_checked"); #ifdef CATCHALL_ENABLED } else if (AdminType==DOMAIN_ADMIN) { printh ("", cgiurl("setdefault"), pw->pw_name, Pagenumber); - printf ("", - IMAGEURL); + printf ("radio_button_unchecked"); #endif } else { - printf ("", - IMAGEURL); + printf ("flash_off"); } - printf (""); + printf ("\n"); printf ("\n"); } pw = vauth_getall(dom,0,0); @@ -246,9 +247,8 @@ if (AdminType == DOMAIN_ADMIN) { print_user_index ("showusers", colspan, user, dom, mytime); - printf ("", get_color_text("000")); - printf ("", colspan); - printf (""); + printf ("\n"); + printf ("", colspan); printf ("[ "); bars = 0; #ifdef USER_INDEX @@ -276,8 +276,7 @@ printh ("%s", cgiurl("setremotecatchall"), html_text[206]); #endif printf (" ]"); - printf (""); - printf ("\n"); + printf ("\n\n"); } return 0; } @@ -318,6 +317,7 @@ void addusernow() { + char *tmpstr; int cnt=0, num; char *c_num; char **mailingListNames; @@ -394,6 +394,16 @@ exit(0); } #endif +/* cracklib patch */ +#ifdef CRACKLIB + if ((tmpstr = FascistCheck(Password1, CRACKLIB)) != NULL ) { + sprintf(StatusMessage, "Bad password - %s\n", tmpstr); + adduser(); + vclose(); + exit(0); + } +#endif +/* end cracklib */ #ifndef ENABLE_LEARN_PASSWORDS if ( strlen(Password1) <= 0 ) { @@ -491,7 +501,7 @@ } else { /* otherwise, report error */ - snprinth (StatusMessage, sizeof(StatusMessage), "%s %H@%H (%H) %s", + snprinth (StatusMessage, sizeof(StatusMessage), "%s %H@%H (%H) %s", html_text[2], Newu, Domain, Gecos, html_text[120]); } @@ -673,7 +683,7 @@ /* Get the default catchall box name */ if ((fs=fopen(".qmail-default","r")) == NULL) { - printf ("%s %s\n", + printf ("%s %s\n", html_text[144], ".qmail-default"); vclose(); exit(0); @@ -682,19 +692,19 @@ fclose(fs); if (strstr(TmpBuf, " bounce-no-mailbox\n") != NULL) { - printf ("%s", html_text[130]); + printf ("%s", html_text[130]); } else if (strstr(TmpBuf, " delete\n") != NULL) { - printf ("%s", html_text[236]); + printf ("%s", html_text[236]); } else if ( strstr(TmpBuf, "@") != NULL ) { i=strlen(TmpBuf); for(;TmpBuf[i-1]!=' ';--i); if (strncmp (&TmpBuf[i], "$EXT@", 5) == 0) { /* forward to an entire domain */ - printh ("%s user%H", html_text[62], &TmpBuf[i+4]); + printh ("%s user%H", html_text[62], &TmpBuf[i+4]); } else { - printh ("%s %H", html_text[62], &TmpBuf[i]); + printh ("%s %H", html_text[62], &TmpBuf[i]); } } else { i = strlen(TmpBuf) - 1; @@ -704,7 +714,7 @@ /* take off newline */ i = strlen(TmpBuf2); --i; TmpBuf2[i] = 0;/* take off newline */ - printh ("%s %H", html_text[62], TmpBuf2); + printh ("%s %H", html_text[62], TmpBuf2); } return 0; } @@ -796,6 +806,16 @@ exit(0); } #endif +/* cracklib patch */ +#ifdef CRACKLIB + if ((tmpstr = FascistCheck(Password1, CRACKLIB)) != NULL ) { + sprintf(StatusMessage, "Bad password - %s\n", tmpstr); + moduser(); + vclose(); + exit(0); + } +#endif +/* end cracklib */ ret_code = vpasswd( ActionUser, Domain, Password1, USE_POP); if ( ret_code != VA_SUCCESS ) { snprintf (StatusMessage, sizeof(StatusMessage), "%s (%s)", html_text[140], diff -ruN ../qmailadmin-1.2.16-original/util.c qmailadmin-1.2.16/util.c --- ../qmailadmin-1.2.16-original/util.c 2011-02-22 15:45:47.000000000 +0100 +++ qmailadmin-1.2.16/util.c 2020-05-03 12:36:59.000000000 +0200 @@ -123,9 +123,10 @@ void qmail_button(char *modu, char *command, char *user, char *dom, time_t mytime, char *png) { - printf (""); + printf (""); printh ("", cgiurl(command), modu); - printf ("", IMAGEURL, png); +/* printf ("", IMAGEURL, png); */ + printf ("%s", png); printf ("\n"); } @@ -160,10 +161,10 @@ count_autoresponders(); count_mailinglists(); - printf ("%s = %d
    \n", html_text[61], CurPopAccounts); - printf ("%s = %d
    \n", html_text[74], CurForwards); - printf ("%s = %d
    \n", html_text[77], CurAutoResponders); - printf ("%s = %d
    \n", html_text[80], CurMailingLists); + printf ("%s = %d
    \n", html_text[61], CurPopAccounts); + printf ("%s = %d
    \n", html_text[74], CurForwards); + printf ("%s = %d
    \n", html_text[77], CurAutoResponders); + printf ("%s = %d
    \n", html_text[80], CurMailingLists); } /* check_email_addr( char *addr ) @@ -232,7 +233,7 @@ char *extra; { printf ("%s %s\n", get_html_text(msg), extra); - printf ("\n"); + printf ("\n"); vclose(); exit(0); } @@ -399,10 +400,10 @@ #ifdef USER_INDEX int k; - printf ("", get_color_text("000")); - printf ("", colspan); + printf (""); + printf ("", colspan); printf ("
    "); - printf ("%s   ", html_text[133]); + printf ("%s ", html_text[133]); for (k = 0; k < 10; k++) { printh ("%d\n", cgiurl(action), k, k); } @@ -412,17 +413,15 @@ printf (""); printf ("\n"); - printf ("", get_color_text("000")); - printf ("", colspan); - printf (""); + printf ("

    "); + printf ("
    ", colspan); printf ("
    ", CGIPATH, action); printh ("", user); printh ("", dom); printf ("", (unsigned int) mytime); - printh (" ", SearchUser); - printf ("", html_text[204]); + printh (" ", SearchUser); + printf ("", html_text[204]); printf ("
    "); - printf ("
    "); printf ("
    "); printf ("\n");