On 06 Dec 07, Hartmut Wernisch wrote:
> On 06 Dec 07, Hartmut Wernisch wrote:
> > On 05 Dec 07, Tom Collins wrote:
> > > On Dec 5, 2007, at 12:52 AM, Hartmut Wernisch wrote:
>
>
> 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 delivered to the mailbox of "hw" instead of "hw-de"!
sry test output for 2) was:
- Mail is delivered to the mailbox of "hw" instead of "hw-foo"!
>
>
> 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 delivered to the mailbox of "hw" instead of "hw-de"!
sry test outpu for test 4) was:
- Mail is delivered to the mailbox of "hw" instead of "hw-foo"!
I think the problem is in here?!:
217
218 #ifdef QMAIL_EXT
219 /* !! Shouldn't this work its way backwards, and try all
possibilities?
220 * e.g., a-b-c-d should try a-b-c then a-b then a, instead of just
a?
221 */
222 /* delete the '-' and following chars if any and store in
TheUserExt */
223 for(i = 0; (TheUser[i] != 0) && (TheUser[i] != '-' ); i++) {
224 TheUserExt[i] = TheUser[i];
225 }
226 TheUserExt[i] = 0;
227
228 if ( is_username_valid(TheUserExt) != 0 ) {
229 vexit(EXIT_BOUNCE);
230 }
231
232 strncpy(TheExt, &TheUser[i+1], AUTH_SIZE);
233 for (i = 0; (TheExt[i] != 0); i++) {
234 if (TheExt[i] == '.') TheExt[i] = ':';
235 }
236
237 #endif
Best,
Hartmut
!DSPAM:47610e0f32003535473722!