From: Tom C. <to...@to...> - 2005-01-03 20:29:58
|
On Jan 3, 2005, at 12:04 PM, John Peacock wrote: > but if I resubmit exactly the same page, it works. What I've > discovered is that if I check the virtual user directory after the > failure but before the second submit, the .qmail file has been > created, but it is empty. After the second submit, the .qmail file is > populated and the vacation directory exists. > > This is 100% repeatable. > > Any clues? Yes. I was so focused on making sure I was copying unrecognized lines from the old .qmail file, that I didn't fully test the code on accounts without a .qmail file! Here's the patch. The block of 8 lines removed in the second section are actually just indented. This will go into CVS shortly, and will be in the next release. Thanks for catching it. --- user.c 23 Dec 2004 18:39:48 -0000 1.11.2.9 +++ user.c 3 Jan 2005 20:25:33 -0000 @@ -904,9 +904,6 @@ } } } - if (olddotqmail == NULL) { - olddotqmail = ""; - } fs = fopen (dotqmailfn, "w"); @@ -914,18 +911,20 @@ * lines to the new .qmail file. */ emptydotqmail = 1; - dotqmailline = strtok (olddotqmail, "\n"); - while (dotqmailline) { - if ( (*dotqmailline == '|') && - (strstr (dotqmailline, "/true delete") == NULL) && - (strstr (dotqmailline, "/autorespond ") == NULL) && - (strstr (dotqmailline, SPAM_COMMAND) == NULL) ) { - fprintf (fs, "%s\n", dotqmailline); - emptydotqmail = 0; + if (olddotqmail != NULL) { + dotqmailline = strtok (olddotqmail, "\n"); + while (dotqmailline) { + if ( (*dotqmailline == '|') && + (strstr (dotqmailline, "/true delete") == NULL) && + (strstr (dotqmailline, "/autorespond ") == NULL) && + (strstr (dotqmailline, SPAM_COMMAND) == NULL) ) { + fprintf (fs, "%s\n", dotqmailline); + emptydotqmail = 0; + } + dotqmailline = strtok (NULL, "\n"); } - dotqmailline = strtok (NULL, "\n"); + free (olddotqmail); } - if (olddotqmail != NULL) free (olddotqmail); /* Decide on what to write to the new .qmail file after any old program * delivery lines are written. > p.s. anyone want a couple of my local patches: > > 1) suppress Forward/Deleted status for non-admin users Others are interested in having this, and if you've built it as a compile-time option, I'd love to see it. Does it preserve the fields as hidden for non-admins? > 2) enable to use of CRACKLIB for strong password support Yes, I'd be interested in that as well. -- Tom Collins - to...@to... QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/ |