Seems like a reasonable change.
I put it in. Needs testing!

Looks like we will start a series of devel releases to test
these changes. I'll package one up end of day tomorrow.

Ken Jones

On Wednesday 04 June 2003 9:37 am, Moshe Jacobson wrote:
> On Tue, 3 Jun 2003, Ken Jones wrote:
> > Does anyone have any code changes they would like to get into the
> > next release? I want to put together a new stable version 5.4.
> > Hopefully release it in the next few weeks.
>
> There seems to be a problem in th maildir_to_email() function in
> vdelivermail.c.  If the domain dir is not directly under the
> DOMAINS_DIR, e.g. /home/vpopmail/domains/1/example.com, then a user
> [EMAIL PROTECTED] will have a maildir of:
>
>     /home/vpopmail/domains/1/example.com/joe/Maildir/
>
> and maildir_to_email() returns an email address of [EMAIL PROTECTED] instead of
> [EMAIL PROTECTED]
>
> This should definitely be fixed as it is a simple and obvious bug.
>
> My (untested) fix is as follows.  Change the following block located
> near the bottom of maildir_to_email():
>
> ----
> for( pnt = last + (strlen(DOMAINS_DIR)+2); (*pnt && *pnt != '/' && j <
> 255); ++pnt, ++j ) { email[j] = *pnt;
> }
> ----
>
> to:
>
> ----
> pnt = last + strlen(DOMAINS_DIR) + 2;
> while( *(pnt+1) == '/' ) pnt+=2;
> for( ; (*pnt && *pnt != '/' && j < 255); ++pnt, ++j ) {
>   email[j] = *pnt;
> }
> ----
>
> Moshe


Reply via email to