Tom Collins wrote:

On Wednesday, October 1, 2003, at 03:20 PM, Jochen Schug wrote:

I tried adding the trailing slash, there's the result:

Please remove the trailing slash and try this patch. The changes in vdelivermail resulted in a double-slash (adding a / and the /Maildir/). The result is that mail is delivered fine, but domain quotas won't work.

diff -u -r1.3 vdelivermail.c
--- vdelivermail.c      14 Sep 2003 21:51:59 -0000      1.3
+++ vdelivermail.c      1 Oct 2003 22:39:53 -0000
@@ -1089,12 +1089,12 @@

/* check if it is a path add the /Maildir/ for delivery */
if ( bounce[0] == '/' ) {
- strcat( bounce, "/");
+ if (bounce[strlen(bounce)-1] != '/') strcat( bounce, "/");
printf ("user does not exist, but will deliver to %s\n", bounce);
if( check_forward_deliver(bounce) == 1 )
- strcat( bounce, "/Maildir/");
+ strcat( bounce, "Maildir/");

     ret = deliver_mail(bounce, "NOQUOTA" );

If it's a good fix, I'll include it in the 5.3.28 release (which is planned for later today).

This should fix a few things. It only adds a trailing slash if one isn't there, and it doesn't double-up the slash when adding /Maildir/.


This fix works pretty good - mail is delivered fine, and the error message doesn't appear in the logs anymore. But still, the log message differs slightly from the one that vpopmail 5.3.20 writes.

"success: user_does_not_exist,_but_will_deliver_to_/home/vpopmail/domains/*domainname*/postmaster//did_0+0+1/" is now written, whereas the old version had the "Maildir/" after the user name as well. Which is more correct, I think; the maildir where the mail is delivered is not the one with the username, but the actual Maildir one level deeper.

But that's just a matter of when the bounce message is printed - before or after the last strcat (if I get this right - my C skills are almost not existant ;-)).


Reply via email to