...
 
Commits (1)
  • Rob Swindell's avatar
    Fix sendmail bug introduced in 6851910b. · 3aacaa64
    Rob Swindell authored
    The "MAIL FROM" command argument must always be enclosed in angle-brackets. Some mail servers (e.g. gmail, aol) would reject messages not delivered in this manner, e.g.:
    mx-aol.mail.gm0.yahoodns.net replied with:
    "501 Syntax error in parameters or arguments tnmpmscs"
    instead of the expected reply:
    "250 ..."
    gmail-smtp-in.l.google.com replied with:
    "555 5.5.2 Syntax error. o6si11103060plk.317 - gsmtp"
    instead of the expected reply:
    "250 ..."
    3aacaa64
......@@ -5620,9 +5620,9 @@ static void sendmail_thread(void* arg)
continue;
}
if(msg.from_net.type==NET_INTERNET && msg.reverse_path!=NULL)
SAFECOPY(fromaddr, msg.reverse_path);
angle_bracket(fromaddr, sizeof(fromaddr), msg.reverse_path);
else
SAFEPRINTF(fromaddr, "<%s>", usermailaddr(&scfg, str, msg.from));
angle_bracket(fromaddr, sizeof(fromaddr), usermailaddr(&scfg, str, msg.from));
char sender_info[512];
if(msg.from_ext != NULL)
......