Commit 0d652e7e authored by Sam Varshavchik's avatar Sam Varshavchik

courier: Downgrade to ACE, for sending ORCPT to non-SMTPUTF8 mail servers.

parent 62dbdd25
......@@ -211,6 +211,13 @@ static void do_verify(struct verify_info *my_info,
memset(&mfi, 0, sizeof(mfi));
mfi.sender="";
/*
** mail_from_cmd should be called only after esmtp_connect(), so that
** it factors in the server's advertised capabilities.
**
** This is ok, because we don't need any capabilities.
*/
mail_from_cmd=esmtp_mailfrom_cmd(info, &mfi, &errmsg);
if (!mail_from_cmd)
......
......@@ -2084,8 +2084,19 @@ static void mk_one_receip_idna_or_utf8(struct esmtp_info *info,
if (utf8_or_idna_orig_receip)
{
char *encoded=rfc6533_encode(utf8_or_idna_orig_receip,
!info->hassmtputf8);
char *encoded;
if (info->hassmtputf8)
{
encoded=rfc6533_encode(utf8_or_idna_orig_receip, 0);
}
else
{
char *p=udomainace(utf8_or_idna_orig_receip);
encoded=rfc6533_encode(p, 1);
free(p);
}
(*builder)(" ORCPT=", arg);
(*builder)(encoded, arg);
free(encoded);
......
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