From: Tom C. <tom...@us...> - 2006-05-08 05:22:37
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22589 Modified Files: Tag: stable-1_2 ChangeLog config.h.in configure configure.in user.c Log Message: Add --enable-spamcmd-needs-email option to configure to have QmailAdmin include the user's email address as the last parameter to --enable-spam-command. (Dave Steinberg) Index: config.h.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/config.h.in,v retrieving revision 1.5.2.1 retrieving revision 1.5.2.2 diff -u -d -r1.5.2.1 -r1.5.2.2 --- config.h.in 12 Aug 2004 05:08:16 -0000 1.5.2.1 +++ config.h.in 8 May 2006 05:22:34 -0000 1.5.2.2 @@ -121,6 +121,9 @@ #undef MODIFY_SPAM /* "" */ +#undef MODIFY_SPAM_NEED_EMAIL + +/* "" */ #undef NO_CACHE /* Define to the address where bug reports for this package should be sent. */ Index: configure =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure,v retrieving revision 1.14.2.15 retrieving revision 1.14.2.16 diff -u -d -r1.14.2.15 -r1.14.2.16 --- configure 21 Feb 2006 18:54:34 -0000 1.14.2.15 +++ configure 8 May 2006 05:22:34 -0000 1.14.2.16 @@ -853,6 +853,7 @@ --disable-user-index Don't display user index on show users page. --enable-modify-quota Allow domain admin (postmaster) to modify user quotas. --enable-domain-autofill Autofill the domain on login page based on the hostname that accesses qmailadmin. + --enable-spamcmd-needs-email Append the user's email to the end of the spam command. --enable-modify-spam Allow users to enable/disable spam checking. --enable-spam-command=CMD Remember to use '|preline' at the beginning, |preline /usr/local/bin/maildrop /etc/mailfilter. --enable-help Display help links on login page. @@ -4502,6 +4503,28 @@ ;; esac +# Check whether --enable-spamcmd-needs-email or --disable-spamcmd-needs-email was given. +if test "${enable_spamcmd_needs_email+set}" = set; then + enableval="$enable_spamcmd_needs_email" + SPAM_NEED_EMAIL="$enableval" +fi; + +case $SPAM_NEED_EMAIL in +1*|y*|Y*) + SPAM_NEED_EMAIL=yes + +cat >>confdefs.h <<_ACEOF +#define MODIFY_SPAM_NEED_EMAIL 1 +_ACEOF + + echo "checking whether to append the email to the end of the spam command... yes" + ;; +*) + SPAM_NEED_EMAIL=no + echo "checking whether to append the email to the end of the spam command... no" + ;; +esac + # Check whether --enable-modify-spam or --disable-modify-spam was given. if test "${enable_modify_spam+set}" = set; then enableval="$enable_modify_spam" Index: configure.in =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/configure.in,v retrieving revision 1.15.2.15 retrieving revision 1.15.2.16 diff -u -d -r1.15.2.15 -r1.15.2.16 --- configure.in 21 Feb 2006 18:54:34 -0000 1.15.2.15 +++ configure.in 8 May 2006 05:22:34 -0000 1.15.2.16 @@ -350,6 +350,21 @@ ;; esac +AC_ARG_ENABLE(spamcmd-needs-email, [ --enable-spamcmd-needs-email Append the user's email to the end of the spam command.], + SPAM_NEED_EMAIL="$enableval",) + +case $SPAM_NEED_EMAIL in +1*|y*|Y*) + SPAM_NEED_EMAIL=yes + AC_DEFINE_UNQUOTED(MODIFY_SPAM_NEED_EMAIL,1,"") + echo "checking whether to append the email to the end of the spam command... yes" + ;; +*) + SPAM_NEED_EMAIL=no + echo "checking whether to append the email to the end of the spam command... no" + ;; +esac + AC_ARG_ENABLE(modify-spam, [ --enable-modify-spam Allow users to enable/disable spam checking.], MODIFY_SPAM="$enableval",) Index: ChangeLog =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/ChangeLog,v retrieving revision 1.15.2.89 retrieving revision 1.15.2.90 diff -u -d -r1.15.2.89 -r1.15.2.90 --- ChangeLog 8 May 2006 05:14:30 -0000 1.15.2.89 +++ ChangeLog 8 May 2006 05:22:34 -0000 1.15.2.90 @@ -16,6 +16,11 @@ Oden Eriksson - Add string 316 to Swedish translation. + Dave Steinberg + - Add --enable-spamcmd-needs-email option to configure to have + QmailAdmin include the user's email address as the last + parameter to --enable-spam-command. + 1.2.10 - released 20-Feb-06 Peter Pentchev Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.11.2.13 retrieving revision 1.11.2.14 diff -u -d -r1.11.2.13 -r1.11.2.14 --- user.c 9 Feb 2006 05:09:53 -0000 1.11.2.13 +++ user.c 8 May 2006 05:22:34 -0000 1.11.2.14 @@ -466,7 +466,11 @@ if(strcmp(spamvalue, "on") == 0) { snprintf(NewBuf, sizeof(NewBuf), "%s/.qmail", mypw->pw_dir); fs = fopen(NewBuf, "w+"); +#ifdef MODIFY_SPAM_NEED_EMAIL + fprintf(fs, "%s %s\n", SPAM_COMMAND, email); +#else fprintf(fs, "%s\n", SPAM_COMMAND); +#endif fclose(fs); } #endif @@ -940,7 +944,11 @@ fprintf (fs, "# delete\n"); emptydotqmail = 0; } else if (spam_check == 1) { +#ifdef MODIFY_SPAM_NEED_EMAIL + fprintf(fs, "%s %s@%s\n", SPAM_COMMAND, ActionUser, Domain); +#else fprintf (fs, "%s\n", SPAM_COMMAND); +#endif emptydotqmail = 0; } else { fprintf (fs, "%s/" MAILDIR "/\n", vpw->pw_dir); |