I have opened a tracker [826231] on sourceforge for this bug
Can someone try this out on a development machine before I post it to CVS. It seems to make sense to me and it compiles. vdelivermail could definitely use a rewrite in the next development cycle. I think that the looping code could be simplified greatly.
Index: vdelivermail.c =================================================================== RCS file: /cvsroot/vpopmail/vpopmail/vdelivermail.c,v retrieving revision 1.4 diff -u -r1.4 vdelivermail.c --- vdelivermail.c 2 Oct 2003 16:12:20 -0000 1.4 +++ vdelivermail.c 19 Oct 2003 05:44:04 -0000 @@ -877,7 +877,7 @@ while(fgets(loop_buf,sizeof(loop_buf),stdin)!=NULL){
/* if we find the line, return error (looping) */ - if (strstr(loop_buf, "Delivered-To")!= 0 && + if (strncmp(loop_buf, "Delivered-To: ", 14) == 0 && is_loop_match(loop_buf, address)==1 ) {
/* return the loop found */ @@ -1313,6 +1313,7 @@
/* walk forward in dt line for @ character */ while ( *dt != '@' && *dt != 0 ) ++dt; + if (*dt == 0) return 0; /* no @ character found */
/* now walk back to first space */ while ( *dt != ' ' && dt != startdt) --dt; ===================================================================
The first change makes sure the line STARTS with 'Delivered-To: ' instead of just containing the words.
The second change aborts the loop checker if the line doesn't contain an @.
-- Tom Collins - [EMAIL PROTECTED] Note: The Tom Logic offices will be closed October 23 to November 18. QmailAdmin: http://qmailadmin.sf.net/ Vpopmail: http://vpopmail.sf.net/ Info on the Sniffter hand-held Network Tester: http://sniffter.com/