I have an application that submits email through the Postfix sendmail utility using the -t option.
We're looking to accommodate utf-8 subject lines and addresses. My understanding is the fields should be encoded as MIME-Header (RFC 2047)?
It appears, however, that sendmail does not recognize that encoding. Mail bounces with e.g.,:
Jan 1 12:23:19 lando postfix/local[3173514]: 3659C1182E4C: to==?UTF-8?B?TWF1cmljZSDDocK8wojDj8KBw4/Ch8OOwrnDjsK8w6HCvcK1w47CtMOOwrc=?=@lando, orig_to=<=?UTF-8?B?TWF1cmljZSDDocK8wojDj8KBw4/Ch8OOwrnDjsK8w6HCvcK1w47CtMOOwrc=?=>, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (unknown user: "=?utf-8?b?twf1cmljzsddock8wojdj8kbw4/ch8oowrndjsk8w6hcvck1w47ctmoowrc=?=")
So it seems to be interpreting the recipient address as a local address.
Is there a way to have sendmail interpret that encoding or is there something else I'm missing?
You can't MIME-encode email address. Support for "Internationalized Email Headers" is described in RFC 6532. You need to make sure that all SMTP servers your emails are going through support SMTP Extension for Internationalized Email. See also Overview and Framework for Internationalized Email