From: Matthias A. <mat...@gm...> - 2005-12-13 01:44:46
|
Matthias Andree <mat...@gm...> writes: > Greetings, > > Joachim Feise reported that his smtphost setting is lost/ignored since > 6.3.0. I could reproduce this. > <http://developer.berlios.de/bugs/?func=detailbug&bug_id=5849&group_id=1824> > > However, I use neither LMTP nor multidrop, so I need help determining if > the attached patch that I made is safe. Hm. This is the same sink.c patch but without space changes and should thus be easier to review. Please comment: Index: sink.c =================================================================== --- sink.c (Revision 4524) +++ sink.c (Arbeitskopie) @@ -121,11 +121,9 @@ ctl->smtphost = idp->id; /* remember last host tried. */ if(ctl->smtphost[0]=='/') - ctl->listener = LMTP_MODE; - - if (ctl->smtphost[0]=='/') { - parsed_host = NULL; + ctl->listener = LMTP_MODE; + xfree(parsed_host); if ((ctl->smtp_socket = UnixOpen(ctl->smtphost))==-1) continue; } @@ -195,7 +193,6 @@ } set_timeout(0); phase = oldphase; - } /* * RFC 1123 requires that the domain name part of the @@ -214,11 +211,13 @@ localhost as a domain part. */ else ctl->destaddr = xstrdup("localhost"); + xfree(parsed_host); + } + /* end if (ctl->smtp_socket == -1) */ if (outlevel >= O_DEBUG && ctl->smtp_socket != -1) report(stdout, GT_("forwarding to %s\n"), ctl->smtphost); - xfree(parsed_host); return(ctl->smtp_socket); } -- Matthias Andree |