Convert quoted-printable headers

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Convert quoted-printable headers

André Rodier
Hello,

I have a program (SOGo), installed on my mail server, that send emails
using the quoted-printable encoding for From/To headers.

Unfortunately, none of the email clients I use seems to display them
correctly:

-------------------------------------------------------
 From =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
To =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
-------------------------------------------------------

Is there any reason for that ?
is a header missing:

Source of the message:
-------------------------------------------------------
Return-Path: <[hidden email]>
Received: from osaka.rodier.me
        by osaka.office.pmc with LMTP id SHdiLkFM+VtsSAAAnYgw/w
        ; Sat, 24 Nov 2018 13:04:01 +0000
Received: from osaka.rodier.me (localhost [127.0.0.1])
        by osaka.rodier.me (Postfix) with ESMTP id A8A2620664
        for <[hidden email]>; Sat, 24 Nov 2018 13:04:01 +0000 (GMT)
Received: from localhost (localhost [127.0.0.1])
        by osaka.rodier.me (Postfix) with ESMTP id 89AFC20661
        for <[hidden email]>; Sat, 24 Nov 2018 13:04:01 +0000 (GMT)
To: =?utf-8?q?=3D=3Futf-8=3Fq=3FAndr=3DC3=3DA9=3F=3D_Rodier?=
<[hidden email]>
X-Priority: 1
Subject: Test
Importance: high
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Message-Id: <4a80-5bf94c41-1-3b22dab3@165787061>
Content-Type: text/plain; charset="utf-8"
 From: =?utf-8?q?=3D=3Futf-8=3Fq=3FAndr=3DC3=3DA9=3F=3D_Rodier?=
<[hidden email]>
Date: Sat, 24 Nov 2018 13:04:01 +0000
User-Agent: SOGo Alarms Notifier/1.0
X-AV-Checked: ClamSMTP (Client IP: 127.0.0.1)

Checking email alerts
-------------------------------------------------------

Can I tune postfix to alter / convert this header, to base64 or even
utf8 ?

Thanks for your help

André Rodier

--
https://github.com/progmaticltd/homebox
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

Richard Damon
On 11/24/18 9:41 AM, André Rodier wrote:

> Hello,
>
> I have a program (SOGo), installed on my mail server, that send emails
> using the quoted-printable encoding for From/To headers.
>
> Unfortunately, none of the email clients I use seems to display them
> correctly:
>
> -------------------------------------------------------
> From     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
> To     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
> -------------------------------------------------------
>
> Is there any reason for that ?
> is a header missing:
>
> Thanks for your help
>
> André Rodier
>
First, are your clients compliant with the RFC that define encoding of
headers (which are later/less supported than those that define the
encoding of the body)?

For example, RFC 2047  (I think the latest RFC that defines this
encoding). I don't think you need any header to enable this support,
just a compliant MUA.

--
Richard Damon

Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

André Rodier
On 2018-11-24 15:16, Richard Damon wrote:

> On 11/24/18 9:41 AM, André Rodier wrote:
>> Hello,
>>
>> I have a program (SOGo), installed on my mail server, that send emails
>> using the quoted-printable encoding for From/To headers.
>>
>> Unfortunately, none of the email clients I use seems to display them
>> correctly:
>>
>> -------------------------------------------------------
>> From     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> To     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> -------------------------------------------------------
>>
>> Is there any reason for that ?
>> is a header missing:
>>
>> Thanks for your help
>>
>> André Rodier
>>
> First, are your clients compliant with the RFC that define encoding of
> headers (which are later/less supported than those that define the
> encoding of the body)?
>
> For example, RFC 2047  (I think the latest RFC that defines this
> encoding). I don't think you need any header to enable this support,
> just a compliant MUA.

Thanks for your answer.

I would think it is a bug in the SOGo software, because other emails are
using quoted-printable too, but are displayed correctly, for instance
this one:

------------------------------------------------------------------------
Return-Path: <[hidden email]>
Received: from osaka.rodier.me
        by osaka.office.pmc with LMTP id 0P2UH/1p+VvAFAAAnYgw/w
        ; Sat, 24 Nov 2018 15:10:53 +0000
Received: from osaka.rodier.me (localhost [127.0.0.1])
        by osaka.rodier.me (Postfix) with ESMTP id 6406A2063B
        for <[hidden email]>; Sat, 24 Nov 2018 15:10:53 +0000 (GMT)
Received: by osaka.rodier.me (Postfix, from userid 132)
        id 431B720662; Sat, 24 Nov 2018 15:10:53 +0000 (GMT)
Content-Type: text/html; charset="utf-8"
To: =?utf-8?q?Andr=C3=A9_Rodier?= <[hidden email]>
MIME-Version: 1.0
Date: Sat, 24 Nov 2018 15:10:53 +0000
Subject: The event =?utf-8?q?=22Hello=22?= was created
Message-ID: <1403-5bf96a00-5-79d0b280@98295310>
 From: =?utf-8?q?Andr=C3=A9_Rodier?= <[hidden email]>
X-AV-Checked: ClamSMTP (Client IP: 127.0.0.1)
------------------------------------------------------------------------

Fortunately, Thunderbird, Evolution and Roundcube are behaving the same.


--
https://github.com/progmaticltd/homebox
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

Matus UHLAR - fantomas
In reply to this post by André Rodier
On 24.11.18 14:41, André Rodier wrote:
>I have a program (SOGo), installed on my mail server, that send emails
>using the quoted-printable encoding for From/To headers.

this is not a postfix issue, it belongs to the sogo support, not postfix.

>Unfortunately, none of the email clients I use seems to display them
>correctly:
>
>-------------------------------------------------------
>From =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>To =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>-------------------------------------------------------
>
>Is there any reason for that ?

>To: =?utf-8?q?=3D=3Futf-8=3Fq=3FAndr=3DC3=3DA9=3F=3D_Rodier?=

this looks to me like encoded twice, so all clients that decode it once will
show once encoded string.

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I intend to live forever - so far so good.
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

André Rodier
On 2018-11-24 15:26, Matus UHLAR - fantomas wrote:

> On 24.11.18 14:41, André Rodier wrote:
>> I have a program (SOGo), installed on my mail server, that send emails
>> using the quoted-printable encoding for From/To headers.
>
> this is not a postfix issue, it belongs to the sogo support, not
> postfix.
>
>> Unfortunately, none of the email clients I use seems to display them
>> correctly:
>>
>> -------------------------------------------------------
>> From =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> To =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> -------------------------------------------------------
>>
>> Is there any reason for that ?
>
>> To: =?utf-8?q?=3D=3Futf-8=3Fq=3FAndr=3DC3=3DA9=3F=3D_Rodier?=
>
> this looks to me like encoded twice, so all clients that decode it once
> will
> show once encoded string.

Thank you, I reached the same conclusion.

Yes, I realise this is a bug in SOGo, I will continue the thread on this
mailing list.

André

--
https://github.com/progmaticltd/homebox
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

Richard Damon
In reply to this post by André Rodier
On 11/24/18 10:24 AM, André Rodier wrote:

> On 2018-11-24 15:16, Richard Damon wrote:
>> On 11/24/18 9:41 AM, André Rodier wrote:
>>> Hello,
>>>
>>> I have a program (SOGo), installed on my mail server, that send emails
>>> using the quoted-printable encoding for From/To headers.
>>>
>>> Unfortunately, none of the email clients I use seems to display them
>>> correctly:
>>>
>>> -------------------------------------------------------
>>> From     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>>> To     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>>> -------------------------------------------------------
>>>
>>> Is there any reason for that ?
>>> is a header missing:
>>>
>>> Thanks for your help
>>>
>>> André Rodier
>>>
>> First, are your clients compliant with the RFC that define encoding of
>> headers (which are later/less supported than those that define the
>> encoding of the body)?
>>
>> For example, RFC 2047  (I think the latest RFC that defines this
>> encoding). I don't think you need any header to enable this support,
>> just a compliant MUA.
>
> Thanks for your answer.
>
> I would think it is a bug in the SOGo software, because other emails
> are using quoted-printable too, but are displayed correctly, for
> instance this one:
>
> ------------------------------------------------------------------------
> Return-Path: <[hidden email]>
> Received: from osaka.rodier.me
>     by osaka.office.pmc with LMTP id 0P2UH/1p+VvAFAAAnYgw/w
>     ; Sat, 24 Nov 2018 15:10:53 +0000
> Received: from osaka.rodier.me (localhost [127.0.0.1])
>     by osaka.rodier.me (Postfix) with ESMTP id 6406A2063B
>     for <[hidden email]>; Sat, 24 Nov 2018 15:10:53 +0000 (GMT)
> Received: by osaka.rodier.me (Postfix, from userid 132)
>     id 431B720662; Sat, 24 Nov 2018 15:10:53 +0000 (GMT)
> Content-Type: text/html; charset="utf-8"
> To: =?utf-8?q?Andr=C3=A9_Rodier?= <[hidden email]>
> MIME-Version: 1.0
> Date: Sat, 24 Nov 2018 15:10:53 +0000
> Subject: The event =?utf-8?q?=22Hello=22?= was created
> Message-ID: <1403-5bf96a00-5-79d0b280@98295310>
> From: =?utf-8?q?Andr=C3=A9_Rodier?= <[hidden email]>
> X-AV-Checked: ClamSMTP (Client IP: 127.0.0.1)
> ------------------------------------------------------------------------
>
> Fortunately, Thunderbird, Evolution and Roundcube are behaving the same.
>
>
I use Thunderbird myself, and your message displays fine. The one
difference I see is that the character set and encoding in your mail
client is coming in upper case, while the example has it in lower case.
I thought the RFC said that this was case insensitive, but maybe some
implementations are case sensitive.

--
Richard Damon

Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

Benny Pedersen-2
In reply to this post by André Rodier
André Rodier skrev den 2018-11-24 15:41:
> -------------------------------------------------------
> From =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
> To =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
> -------------------------------------------------------

is unicode done first ?, if so quoted-printable encoding only see 7bit
content

or is quoted-printable encoding done first so unicode only encode 7bit

both loose then, and many clients fail to do the decode parts of it

same problem exists in html emails, if it just was html we did not need
unicode or quoted-printable encoding at all

i find unicode a joke :)
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

André Rodier
On 2018-11-24 21:12, Benny Pedersen wrote:

> André Rodier skrev den 2018-11-24 15:41:
>> -------------------------------------------------------
>> From =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> To =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> -------------------------------------------------------
>
> is unicode done first ?, if so quoted-printable encoding only see 7bit
> content
>
> or is quoted-printable encoding done first so unicode only encode 7bit
>
> both loose then, and many clients fail to do the decode parts of it
>
> same problem exists in html emails, if it just was html we did not
> need unicode or quoted-printable encoding at all
>
> i find unicode a joke :)

Thank you, I think it is a bug in SOGo. The message headers, when
containing accents, are encoded twice using quoted-printable.

When the messages are displayed in an email client, the quoted-printable
is evaluated only once, and the result above is displayed.

André

--
https://github.com/progmaticltd/homebox
Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

Richard Damon
In reply to this post by Benny Pedersen-2
On 11/24/18 4:12 PM, Benny Pedersen wrote:

> André Rodier skrev den 2018-11-24 15:41:
>> -------------------------------------------------------
>> From     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> To     =?utf-8?q?Andr=C3=A9?= Rodier <[hidden email]>
>> -------------------------------------------------------
>
> is unicode done first ?, if so quoted-printable encoding only see 7bit
> content
>
> or is quoted-printable encoding done first so unicode only encode 7bit
>
> both loose then, and many clients fail to do the decode parts of it
>
> same problem exists in html emails, if it just was html we did not
> need unicode or quoted-printable encoding at all
>
> i find unicode a joke :)
>
UTF-8  is not an 'encoding' per the mail RFC, but a character set. UTF-8
is a character set, so the e with accent at the end of André becomes 2
8-bit characters for QP, which is the =C3=A9 in the name. Encodings in
the mail RFC is a method to convert 8 bit messages into something 7 bit
clean.

Yes, if the only characters in the message can all be expressed in an 8
bit character set then you could make the message a bit smaller using
that instead of UTF-8, since the upper characters will only need a
single encoding instead of 2. If you might be using characters beyond an
8-bit character set, then UTF-8 is the best way to go.

Message bodies are a bit simpler, as you use a single content encoding
header for the whole body, and a lot of systems actually are 8-bit clean
so you can just use encoding 8bit, and let a MTA make the translation if
it hits a hop that isn't 8 bit clean.

Unicode isn't prefect, but it is the best we have for a single global
character set. If you mostly just need the basic Latin characters, it is
much more than you need, but once you need things beyond that it shows
its abilities.

--
Richard Damon

Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

@lbutlr
On 24 Nov 2018, at 14:37, Richard Damon <[hidden email]> wrote:
> If you might be using characters beyond an 8-bit character set, then UTF-8 is the best way to go.

If there is even the slightest possibility that you will be using characters beyond the basic *7* bit character set, I would say that UTF-8 is the best choice because there is no code-table issue with UTF-8. We’ve all seen messages (or web pages) munged because something assumes a specific code page.

That doesn’t happen with UTF-8.

Thankfully there are fewer and fewer places where UTF-8 doesn’t work, though it looks like mail headers will be 7 bit until the heat death of the universe.

--
No taxation without misrepresentation.


Reply | Threaded
Open this post in threaded view
|

Re: Convert quoted-printable headers

André Rodier
On 2018-11-25 19:03, @lbutlr wrote:

> On 24 Nov 2018, at 14:37, Richard Damon <[hidden email]>
> wrote:
>> If you might be using characters beyond an 8-bit character set, then
>> UTF-8 is the best way to go.
>
> If there is even the slightest possibility that you will be using
> characters beyond the basic *7* bit character set, I would say that
> UTF-8 is the best choice because there is no code-table issue with
> UTF-8. We’ve all seen messages (or web pages) munged because something
> assumes a specific code page.
>
> That doesn’t happen with UTF-8.
>
> Thankfully there are fewer and fewer places where UTF-8 doesn’t work,
> though it looks like mail headers will be 7 bit until the heat death
> of the universe.

Thank you, I am using UTF-8, I think it is a bug in SOGo, or at least in
my setup.

André

--
https://github.com/progmaticltd/homebox