diff -Naur old/user.c new/user.c
--- old/user.c 2008-05-17 22:08:52.000000000 -0700
+++ new/user.c 2008-05-17 22:09:12.000000000 -0700
@@ -86,15 +86,18 @@
/* Get the default catchall box name */
if ((fs=fopen(".qmail-default","r")) == NULL) {
- /* report error opening .qmail-default and exit */
+ /* USED TO report error opening .qmail-default and exit. Now it simply fails, reports bounce-no-mailbox, and goes on. This is because of anti-backscatter stuff which requires no .qmail-default.
printf ("
| %s .qmail-default |
",
colspan, html_text[144]);
vclose();
- exit(0);
+ exit(0); */
+ strcpy(TmpBuf, " bounce-no-mailbox\n");
+ bounced=1;
+ }
+ else {
+ fgets(TmpBuf, sizeof(TmpBuf), fs);
+ fclose(fs);
}
-
- fgets(TmpBuf, sizeof(TmpBuf), fs);
- fclose(fs);
if (*SearchUser) {
pw = vauth_getall(dom,1,1);
@@ -611,13 +614,19 @@
void set_qmaildefault(char *opt)
{
FILE *fs;
-
- if ( (fs = fopen(".qmail-default", "w")) == NULL ) {
- printf ("%s %s
\n", html_text[144], ".qmail-default");
- } else {
- fprintf(fs,"| %s/bin/vdelivermail '' %s\n", VPOPMAILDIR, opt);
- fclose(fs);
- }
+ if(!strcmp(opt, "bounce-no-mailbox"))
+ {
+ unlink(".qmail-default");
+ }
+ else
+ {
+ if ( (fs = fopen(".qmail-default", "w")) == NULL ) {
+ printf ("%s %s
\n", html_text[144], ".qmail-default");
+ } else {
+ fprintf(fs,"| %s/bin/vdelivermail '' %s\n", VPOPMAILDIR, opt);
+ fclose(fs);
+ }
+ }
show_users(Username, Domain, Mytime);
vclose();
exit(0);
@@ -664,13 +673,17 @@
/* Get the default catchall box name */
if ((fs=fopen(".qmail-default","r")) == NULL) {
- printf ("| %s %s |
\n",
+ /* USED TO report error opening .qmail-default and exit. Now it simply fails, reports bounce-no-mailbox, and goes on. This is because of anti-backscatter stuff which requires no .qmail-default.
+ printf ("
| %s %s |
\n",
html_text[144], ".qmail-default");
vclose();
- exit(0);
+ exit(0); */
+ strcpy(TmpBuf, " bounce-no-mailbox\n");
+ }
+ else {
+ fgets(TmpBuf, sizeof(TmpBuf), fs);
+ fclose(fs);
}
- fgets( TmpBuf, sizeof(TmpBuf), fs);
- fclose(fs);
if (strstr(TmpBuf, " bounce-no-mailbox\n") != NULL) {
printf ("%s", html_text[130]);