Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
qmailadmin
> qmailadmin-1.2.12-nospam_cmd.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File qmailadmin-1.2.12-nospam_cmd.patch of Package qmailadmin
--- config.h.in.orig 2009-02-21 13:42:16.000000000 +0100 +++ config.h.in 2009-02-21 13:40:40.000000000 +0100 @@ -153,6 +153,9 @@ /* "" */ #undef SPAM_COMMAND +/* "" */ +#undef NOSPAM_COMMAND + /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS --- Makefile.in.orig 2008-04-28 23:17:06.000000000 +0200 +++ Makefile.in 2009-02-21 13:36:11.000000000 +0100 @@ -82,6 +82,7 @@ QA_VERSION = @QA_VERSION@ RANLIB = @RANLIB@ SPAM_COMMAND = @SPAM_COMMAND@ +NOSPAM_COMMAND = @NOSPAM_COMMAND@ STRIP = @STRIP@ VERSION = @QA_VERSION@ am__include = @am__include@ --- configure.in.orig 2009-02-21 13:36:52.000000000 +0100 +++ configure.in 2009-02-21 14:08:11.000000000 +0100 @@ -387,6 +387,13 @@ AC_DEFINE_UNQUOTED(SPAM_COMMAND, "$spam_command","") AC_SUBST(SPAM_COMMAND) +nospam_command="|preline /usr/local/bin/maildrop /etc/mailfilter.default" +AC_ARG_ENABLE(nospam_command, [ --enable-nospam-command=CMD Remember to use '|preline' at the beginning, [|preline /usr/local/bin/maildrop /etc/mailfilter.default].], + nospam_command="$enableval", +) +AC_DEFINE_UNQUOTED(NOSPAM_COMMAND, "$nospam_command","") +AC_SUBST(NOSPAM_COMMAND) + HELP=no AC_ARG_ENABLE(help, [ --enable-help Display help links on login page.], HELP="$enableval",) @@ -448,5 +455,6 @@ if test "$MODIFY_SPAM" = "yes" then echo " spam command = "$spam_command"" + echo " nospam command = "$nospam_command"" fi --- user.c.orig 2009-02-21 13:31:24.000000000 +0100 +++ user.c 2009-02-21 18:43:20.000000000 +0100 @@ -467,6 +467,16 @@ #endif fclose(fs); } + 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", NOSPAM_COMMAND, email); +#else + fprintf(fs, "%s\n", NOSPAM_COMMAND); +#endif + fclose(fs); + } #endif /* report success */ @@ -884,7 +894,8 @@ if ( (*dotqmailline == '|') && (strstr (dotqmailline, "/true delete") == NULL) && (strstr (dotqmailline, "/autorespond ") == NULL) && - (strstr (dotqmailline, SPAM_COMMAND) == NULL) ) { + (strstr (dotqmailline, SPAM_COMMAND) == NULL) && + (strstr (dotqmailline, NOSPAM_COMMAND) == NULL) ) { fprintf (fs, "%s\n", dotqmailline); emptydotqmail = 0; } @@ -948,6 +959,13 @@ fprintf (fs, "%s\n", SPAM_COMMAND); #endif emptydotqmail = 0; + } else if (spam_check == 0) { +#ifdef MODIFY_SPAM_NEED_EMAIL + fprintf(fs, "%s %s@%s\n", NOSPAM_COMMAND, ActionUser, Domain); +#else + fprintf (fs, "%s\n", NOSPAM_COMMAND); +#endif + emptydotqmail = 0; } else { fprintf (fs, "%s/" MAILDIR "/\n", vpw->pw_dir); /* this isn't enough to consider the .qmail file non-empty */