6 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Could "550 User u...
FromSent OnAttachments
Jay LeeSep 14, 2007 1:17 pm 
Sam VarshavchikSep 14, 2007 3:18 pm 
Jay LeeSep 18, 2007 10:47 am 
Jay LeeSep 20, 2007 7:10 am 
Jay LeeSep 20, 2007 1:36 pm 
Sam VarshavchikSep 20, 2007 8:40 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Could "550 User unknown." be more verbose?Actions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Sep 20, 2007 8:40:02 pm
List:net.sourceforge.lists.courier-users

Jay Lee writes:

Jay Lee wrote:

OK, I've contacted the Thunderbird developers and they are fixing the issue in their trunk, 3.0 code but not in 2.0.x. I need something in place sooner than that though and changing Courier's error response seems to be the easier quick fix. Any hints on how to include the recipient address in the error? I've found the relevant error message in courier/module.local/local.c line 412, but I'm not sure which variable would carry the recipient address. Could anybody help with that?

bump. Can anyone help me with this? My C isn't all that great. I'm not looking for an official patch to Courier, just a workaround that I can use on my system until TB get 3.0 out the door.

It's not that straightforward. That part of code is fairly tight C. By the time you end up here, the buffer that holds the original recipient address has been destroyed -- line 395.

Furthermore, this is fairly low level, “bare bones”, C. Changing it is painful. This is my best shot -- untested -- caveat emptor:

diff -U3 -r1.25 local.c --- local.c 12 Aug 2006 02:06:35 -0000 1.25 +++ local.c 21 Sep 2007 03:39:02 -0000 @@ -392,7 +392,6 @@

not_found: if (hostdomain) free(hostdomain); - free(addr);

/* ** When submit is being called by the sendmail command line, @@ -406,10 +405,21 @@ (strcmp(rwi->smodule, "local") == 0 || strcmp(rwi->smodule, "uucp") == 0)) { + free(addr); (*delfunc)(rwi, rwi->ptr, rwi->ptr); return; } - (*rwi->err_func)(550, "User unknown.", rwi); + + { + char buf[256]; + + buf[255]=0; + + snprintf(buf, 255, "User <%s> unknown", addr); + free(addr); + + (*rwi->err_func)(550, buf, rwi); + } return; }