[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fwd: Mail delivery failed: returning message to sender



On 28 December 2016 at 17:14, Niels Thykier <niels@thykier.net> wrote:
> Niels Thykier:
>> Andreas Metzler:
>>> [...]
>>>
>>> Hello,
>>>
>>> No, the encoding was not correct. Compare how you (your MUA) just did it in
>>> this message with the rejected one.
>>>
>>>   From: =?UTF-8?Q?TOMAS_MARTI=c5=a0IUS?= <tomas@puga.vdu.lt>
>>>
>>>   From: =?utf-8?b?VG9tYXMgTWFydGnFoWl1cyA8dG9tYXNAcHVnYS52ZHUubHQ+?=
>>>
>>
>>
>>[...]
>
> >From a quick glance, it looks to be specified in RFC1342, which also
> specified the ?Q? variant that was used in the accepted mail.
>
>
> RFC1342:
> """
> [...]
>
>    An "encoded-word" is more precisely defined by the following EBNF
>    grammar, using the notation of RFC 822:
>
>    encoded-word = "=" "?" charset "?" encoding "?" encoded-text "?" "="
>
>    charset = token    ; legal charsets defined by RFC 1341
>
>    encoding = token   ; Either "B" or "Q"
>
>    token = 1*<Any CHAR except SPACE, CTLs, and tspecials>
>
>    tspecials = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
>                <"> / "/" / "[" / "]" / "?" / "." / "="
>
>    encoded-text = 1*<Any printable ASCII character other than "?" or
>                   ; SPACE> (but see "Use of encoded-words in message
>                   ; headers", below)
> [...]
>
>
> The "B" encoding
>
>    The "B" encoding is identical to the "BASE64" encoding defined by RFC
>    1341.
> """
>
> This is not a comment on whether RFC1342 encoded "From:" headers is
> something we is supporting/should support.

Clint is being slightly unhelpful. BTS does accept base64, see #849535 with:

From: =?utf-8?b?w4HFiMSPxZnDqMW1IMWgxKfDpMSPxa3FlcOl?= <andrewsh@debian.org>
Subject: =?utf-8?b?dG5hdDY0OiDFpWXFocWlIGLDvMSdIMWZw6nhuZXDs8WVxaU=?=

What Clint is saying, and what Andreas has pointed out before, is that
display name and address have to be separately encoded, i.e. they
can't be a single encoded string, otherwise they decode into "Name
<address>" not "Name" <address>

-- 
Cheers,
  Andrew


Reply to: