On 05 Dec 07, Tom Collins wrote: > On Dec 5, 2007, at 12:52 AM, Hartmut Wernisch wrote: > > 823 #ifdef QMAIL_EXT > > 824 /* format the file name */ > > 825 if (strlen(TheExt)) { > > 826 strcpy(tmpbuf,".qmail-"); > > 827 strcat(tmpbuf,TheExt); > > 828 if ( (fs = fopen(tmpbuf,"r")) == NULL ) { > > 829 for (i=strlen(TheExt);i>=0;--i) { > > 830 if (!i || TheExt[i-1]=='-') { > > 831 strcpy(tmpbuf,".qmail-"); > > 832 strncat(tmpbuf,TheExt,i); > > 833 strcat(tmpbuf,"default"); > > 834 if ( (fs = fopen(tmpbuf,"r")) != NULL) { > > 835 break; > > 836 } > > 837 } > > 838 } > > 839 } > > 840 } else { > > 841 fs = fopen(".qmail","r"); > > 842 } > > 843 #else > > 844 fs = fopen(".qmail","r"); > > 845 #endif > > > I think I know what the problem is, and it should be a simple fix. > > Before line 823, add: > > fs = NULL; > > Remove lines 840 - 845 and replace with the following:
I removed the lines 840,841 and 843 - 845. > > 840 #endif > 841 if (fs == NULL) fs = fopen (".qmail", "r"); > > Hartmut, can you test this fix? Rick, can you get this into the next > vpopmail release if Hartmut reports it as good? OK, this fix works at the first glance but I had a strange feeling about it, so I tested following: (I think in general there should be no ".qmail-something" files in mailboxes, only .qmail files?!) So if we have following example: -------------------------------- - A mailbox called "hw" - A mailbox called "hw-foo" with following file in it: .qmail (It should be forwarded to an external address and delivered locally) Tests: 1) Mail to "hw-foo": -> works 2) Mail to "hw-foo-bar": -> wrong! - Mail is forwared correctly to the external address in .qmail - Mail is delivered to the mailbox of "hw" instead of "hw-de"! Creating a ".qmail-bar" file in the mailbox of "hw-foo": (It should be forwarded to an external address and delivered locally) 3) Mail to "hw-foo": -> works 4) Mail to "hw-foo-bar": -> wrong! - Mail is forwarded to the external address of .qmail file in the Mailbox of "hw-de" - Mail is delivered to the mailbox of "hw" instead of "hw-de"! Btw, I have tripple-checked the content of the .qmail and .qmail-test files ;) So the results are not consistent to me. Even if there is only the .qmail file (no .qmail-something) in the mailbox directory the reverse resolution of qmail extension seems to be wrong ( see test 2). It seems that .qmail files and corresponding mailboxes are getting out of sync :-/ Regards, -Hartmut > > -- > Tom Collins - [EMAIL PROTECTED] > Vpopmail - virtual domains for qmail: http://vpopmail.sf.net/ > QmailAdmin - web interface for Vpopmail: http://qmailadmin.sf.net/ > > > > > !DSPAM:4757d23532007720715136!