Commit b06125ae authored by rswindell's avatar rswindell
Browse files

Bug-fix: if the forward-path is in "<address>" notation, don't include the

angle brackets in the "RCPT TO" command sent to the SMTP server. This is an old
bug but now appears because we are now (recently) actually storing the SMTP
forward-path in the message header.
parent 1cc0e6f4
......@@ -5571,7 +5571,10 @@ static void sendmail_thread(void* arg)
&& tp > p)
*tp=0; /* Remove ":port" designation from envelope */
}
sockprintf(sock,prot,session,"RCPT TO: <%s>", toaddr);
if(*toaddr == '<')
sockprintf(sock,prot,session,"RCPT TO: %s", toaddr);
else
sockprintf(sock,prot,session,"RCPT TO: <%s>", toaddr);
if(!sockgetrsp(sock,prot,session,"25", buf, sizeof(buf))) {
remove_msg_intransit(&smb,&msg);
SAFEPRINTF3(err,badrsp_err,server,buf,"25*");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment