Emails not parsed as HTML

I have a problem with Evolution where some emails are not parsed correctly, this started a year ago or so, so it is nothing new. The strange thing is that emails that come from the same company, but from different users, using the same images in their signatures, are parsed differently. This is the signature of a mail that is parsed correctly:

image

This one is not (email background is not white, images are not in-line, they come as attachments):

Of course, when an email is parsed incorrectly, all (in-line) images in the mail comes as an attachment, not just the signatures. Both the senders of the emails above are in the Edit/Preferences/Mail preferences/Html Messages/Allow for senders list, if that matters.

I have tried View/Load Images (CTRL+i), but that just shows a red cross over the attachments/images for a second or two.

Does anyone have any idea why this is?

The key question is: what email client(s) are being used to send the messages that don’t parse, and is there a difference from the ones that do parse? If so, this is likely to be a configuration issue at the sender’s end, related to incorrect MIME encoding.

Hi,
it looks like the message structure is somehow broken. You can check
that in the message source (Ctrl+U), search for “Content-Type” in
there. It will be there multiple times. You won’t see the “tree”
structure of the parts and the subparts, but I suspect it will look
like something similar to this:

multipart/related
multipart/alternative
text/plain
text/html
image/png

The images have also Content-ID, which correspond to what you see as
cid:. The best would be if you could ask one of the users to send you
a test message, with nothing private in it, and attach it here or
somewhere from where you’d be able to remove it, if needed.

Also, what does Edit->Preferences->Mail Preferences->HTML Messages
->Plain Text Mode say for you, please? It can be set to prefer Plain
Text, in which case you are looking into the text/plain part, not the
text/html part (see above).

Bye,
Milan

I only found a multipart/mixed, see below.

I also do not find a Plain Text Mode under HTML Preferences? I am using version 3.44.4-0ubuntu1 of Evolution under Linuxmint 21.1 vera.

Here is one “failed” email, where I have removed (hopefully) all sensitive information (names, addresses etc).

[Edit] I had to remove a base64-encoded image, to get the size under the allowed 32k.

Return-Path: <$$$REMOVED$$$>
Delivered-To: $$$REMOVED$$$
Received: from akilles.oderland.com
        by akilles.oderland.com with LMTP
        id IOV+DTlswWOpJTMA+O+zbw
        (envelope-from <$$$REMOVED$$$>)
        for <$$$REMOVED$$$>; Fri, 13 Jan 2023 15:35:37 +0100
Return-path: <$$$REMOVED$$$>
Envelope-to: $$$REMOVED$$$
Delivery-date: Fri, 13 Jan 2023 15:35:37 +0100
Received: from mx1.oderland.com ([91.201.60.244]:48304) by
 akilles.oderland.com with esmtps  (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from
 <$$$REMOVED$$$>) id 1pGL9d-00E4Ds-5e for $$$REMOVED$$$;
 Fri, 13 Jan 2023 15:35:37 +0100
X-Oderland-RCPT-TO: $$$REMOVED$$$
X-Halon-ID: 89bc019a-934f-11ed-9b35-d1fae5a7c13b
Received: from NAM12-MW2-obe.outbound.protection.outlook.com
 (mail-mw2nam12on2068.outbound.protection.outlook.com [40.107.244.68]) by
 mx1.oderland.com (Halon) with ESMTPS id
 89bc019a-934f-11ed-9b35-d1fae5a7c13b; Fri, 13 Jan 2023 15:35:35 +0100 (CET)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=TMrbDkOdW5TbrDtf7rjRjIFiKHjOQPz8DTfSRUYJaoqfoIe2+qvXPs3XM3ZItYKhVrX3aMu60gVUb/F79Ts8OKIQwLwMBiLFXeY2GMX+gVztczupJiBg9X5mAsqXfbg6bEhwH2t0ERs9e3u2Fr0ahWUyWWdiYVMH2ZUKZRjILpe+4UEXizX+y3lqwvk4ncuAte08j3AUYYm6XdW34wsxBkIJ9KM9IjsINCuBQEhYHwMpdV7I4/sRe2aTIAhQJtc1al4WlStA5kRGTawCIw/lVqgxrkrrFcUN7pMngR8y8bOnNBhUHZk5cPU047I5rSK85bJoKJp9A6MqYrRkqW43ig==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
 d=microsoft.com; s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=4WE/SqEP7bD7EfTg2y4ib7H9A7zMIF9c9gZnX2ZrjV0=;
 b=GQ5eJd1K+VK/NOuwQZ1yILYAmd1oshFl7fxJGietiXdF0ycTFeA1Wy0E74Oq3IRS0fMntY00gHF+/7jduus9LCcQsVHV8h+2kHtlt9UchArUg9ZY53R6//CLm63vx0TXL3ymJsgBQ+C77F7OUcc/uU8pw+dA9sxH0qsKJNsJOD4NjVzVx4Yo0R1y6cAUjrS8nx7gIXjJRc+3Yp3WNymN84wU1NP72ePKH5OjozbbQUSgkUle63GdNDLOKPCzBcnoNwvY4g/yax1w2SuK4irEZiuqIww1cocmwoG5zMChLkuC8MKLI9tx0m32x/0uIQUzYFaZp0Pz+sir8z2vF0TqhA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=$$$REMOVED$$$; dmarc=pass action=none
 header.from=$$$REMOVED$$$; dkim=pass header.d=$$$REMOVED$$$; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=$$$REMOVED$$$;
 s=selector2;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=4WE/SqEP7bD7EfTg2y4ib7H9A7zMIF9c9gZnX2ZrjV0=;
 b=MSXdIYQ38O5VkcYwLBq6mYyglIbOBsEFEnq/xOiYaI1P7nl3PKbpQsR91v0n/4XwQdG4cW2LGSTm3g9Xd82FLKkPJ4Px9uphipCsy57NekawZLhSrYbZhxT008SzxTf2JaV8k+SZIl7SwCGt+p+pcsMdbfrbj4BSQiMD0bWN4hU=
Received: from BN9PR11MB5324.namprd11.prod.outlook.com
 (2603:10b6:408:119::19) by BL1PR11MB5979.namprd11.prod.outlook.com
 (2603:10b6:208:386::9) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.13; Fri, 13 Jan
 2023 14:35:31 +0000
Received: from BN9PR11MB5324.namprd11.prod.outlook.com
 ([fe80::a053:f7fb:58e2:b1f5]) by BN9PR11MB5324.namprd11.prod.outlook.com
 ([fe80::a053:f7fb:58e2:b1f5%2]) with mapi id 15.20.5986.019; Fri, 13 Jan
 2023 14:35:31 +0000
Content-Type: multipart/mixed;
        boundary="_000_BN9PR11MB5324A5327CB2B03F1326709EA7C29BN9PR11MB5324namp_"
From: $$$REMOVED$$$ <$$$REMOVED$$$>
To: "$$$REMOVED$$$ ($$$REMOVED$$$)" <$$$REMOVED$$$>
Subject: kan du uppdatera 29536
Thread-Topic: kan du uppdatera 29536
Thread-Index: AdknXEgqy/F/9QSkS8CzPFlrxsEpjA==
Date: Fri, 13 Jan 2023 14:35:31 +0000
Message-ID:
 <BN9PR11MB5324A5327CB2B03F1326709EA7C29@BN9PR11MB5324.namprd11.prod.outlook.com>
Accept-Language: sv-SE, en-US
Content-Language: sv-SE
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
 <BN9PR11MB5324A5327CB2B03F1326709EA7C29@BN9PR11MB5324.namprd11.prod.outlook.com>
authentication-results: dkim=none (message not signed)
 header.d=none;dmarc=none action=none header.from=$$$REMOVED$$$;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BN9PR11MB5324:EE_|BL1PR11MB5979:EE_
x-ms-office365-filtering-correlation-id:
 7e4b6a57-7242-4329-dc7b-08daf5736c7c
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info:
 itC+1M3xEdLddjSsJml9D+wbOamhh9G0qViuKsAi01z4v0IUOP4MxUNOmmSNa4b783zmORkeH4nVGdxKLDWKzip3LvNlBZ4utlfEx+U1wG3iMyR2Zf5tNNyJP4+jMZ29iOubk+qCNx+qbFcgOWJYHmWrFUr7ivVwUhOX6D5+2fLSzwWi4cmYji0m84C1NyR7DH6j8/jp93OSjdxT4uXVn/XGJF/yAVYS3b2stiCVb566UgKQaMHw3XD4qJcxW7fTUyZ95C5BIKN3LZwIZ3WvetdMfk/YszQhmWs6bK59ICGoiLQ89E68q704av5DJBTX0mdhUYfwQwRMEs/59LPFLXRD7O8vqQtUTPLJPwRGaQeogC1vZ7uLHHESDqqY4vOZkcseb8AYUHYd75zpjMRt79JHvpbJxwRmoefGHdJkTvQgFWMITTDGvHd71DYdcLpQfwbPHTghD9ucEX0+6B8wp5B59Oi1XC3WWAmyGyaS5uXnWrSA0sf7eY4B7J659hwvGiLttmhDdnTpGovHoea4IYBjHgGAWHt09hateHVhSe2cv/3QP8JZjvfLYEermb+JJexUJWbYcr6CKlI+Sb/1Wq08R5a0/e67aMi7fTwzEU0NVIM3XGcnSnv0mICyDvDdodbsmVwWy3AXaS8XdZqVGNXVooAZKjyn8keN6shJP/DfE3qUU9LMYDHhQwBiaM5Sa8L3QcT0gR9Z3rRFCV4YnY7XoghgHVYA42zQldNUaiJekAiQL5GOF0TdjoT0PHFDsfz0ZFBnzo+jM9e4+bxMpw==
x-forefront-antispam-report:
 CIP:255.255.255.255;CTRY:;LANG:sv;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR11MB5324.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(396003)(136003)(346002)(366004)(376002)(39860400002)(451199015)(6506007)(2906002)(76116006)(5660300002)(52536014)(8936002)(99936003)(122000001)(64756008)(6916009)(8676002)(9686003)(66446008)(558084003)(38100700002)(41300700001)(33656002)(478600001)(38070700005)(166002)(7116003)(26005)(66946007)(66556008)(55016003)(186003)(7696005)(66476007)(86362001)(71200400001)(316002)(19628015004);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
 =?iso-8859-1?Q?dnHEXL2EHLClyTlaPgKK0tX8Nh943TlQPAKwKdMIvfa9QAVdbMMfXKq5MH?=
 =?iso-8859-1?Q?pZ65Z9iwtPiOQYwz2+WvylCFslABUPVLPimOK7tQO1jG6Lb5EU1tqzjgsK?=
 =?iso-8859-1?Q?E+8pt1FlDV8m0x0w3HUpVGTdCpQnpitS0wzPBeDeBQoFDpMdLFBtKZMtCi?=
 =?iso-8859-1?Q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GnJSeJldhtA7e5xafGf/tzOdFHMru9jeiz1TptBigtmkR?=
 =?iso-8859-1?Q?sUbUZNQmy19F2cftM2fJSmeOnFoIkKFS/nq6y30yASjacx2QeVWUotR6GV?=
 =?iso-8859-1?Q?/+lweCa8rZTkzberrLQTZjO1GTI7j4j+83VeAO3Kj5SO2SiL8IauPL0hRR?=
 =?iso-8859-1?Q?+lNDbc2rgRvD8xpbvW1u3CnDAWmLFwmUJGDZoHudrkrktR9v5GQZgyNOF7?=
 =?iso-8859-1?Q?Hv6bKGNroV2doBXuq4SIjqKglszsM/g++q3CeSlXwOyjOC059p8ClD1ldb?=
 =?iso-8859-1?Q?YQXhKr8/2tOGCqTCO4y/pba/jTdA20G2mK80LRlGZuhlYPMdolS5mE4g4A?=
 =?iso-8859-1?Q?/vpracjLexR9GlSemB946n1RV34EHcT3hN5D/DC+Gt/FwB5cSEBeky/T6a?=
 =?iso-8859-1?Q?Pcvjzczed0TxRAvitQocBgp2EqJaGQFSBVG9ZS0R6/389ZYIMJpVUnD0aC?=
 =?iso-8859-1?Q?5Pw0cqM37mk2DkdBgClqcmkt8cWmPNc0Fhc8t8UqVQsnn/uCAJ6c7pTNvx?=
 =?iso-8859-1?Q?IIJBKt304FqYe2rzQZ1f/dHO6hZoeluiDRYrsyi9H60utMvp2KRWhfT2MP?=
 =?iso-8859-1?Q?x/aY7uhKpfVR+XalOolezK+bDR2xc79Pl6dY3pZ+MpwmhGDf11vzOeMw?=
 =?iso-8859-1?Q?=3D=3D?=
MIME-Version: 1.0
X-OriginatorOrg: $$$REMOVED$$$
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource:
 BN9PR11MB5324.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id:
 7e4b6a57-7242-4329-dc7b-08daf5736c7c
X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Jan 2023 14:35:31.5888
 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 3876dbb5-741c-4fe6-9981-06fa00a6d682
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname:
 GY+kijMEOfDO9EGxLqzphOPWwlXUvgNhTxTBctuCtPCmzm9PlwIX47GMYwPtOY3EOGfQRF8ISHVgUCc8JEj2MOob4Bmk49CL+MaNwBaimLE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5979
X-Evolution-Source: 1529509257.7058.2@PLANCK

--_000_BN9PR11MB5324A5327CB2B03F1326709EA7C29BN9PR11MB5324namp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable



Med v=E4nliga h=E4lsningar / Best regards


$$$REMOVED$$$
$$$REMOVED$$$
$$$REMOVED$$$
$$$REMOVED$$$
$$$REMOVED$$$
$$$REMOVED$$$
$$$REMOVED$$$

$$$REMOVED$$$
[cid:image001.png@01D92764.AA155D40]<https://goo.gl/WIeR1i>   [cid:image002=
.png@01D92764.AA155D40] <https://goo.gl/oseUhV>    [cid:image003.png@01D927=
64.AA155D40] <https://goo.gl/cT6NMA>    [cid:image004.png@01D92764.AA155D40=
] <https://goo.gl/VW3eZO>
[cid:image005.png@01D92764.AA155D40]


--_000_BN9PR11MB5324A5327CB2B03F1326709EA7C29BN9PR11MB5324namp_
Content-Disposition: attachment; filename="winmail.dat"
Content-Transfer-Encoding: base64
Content-Type: application/ms-tnef; name="winmail.dat"

$$$REMOVED$$$

--_000_BN9PR11MB5324A5327CB2B03F1326709EA7C29BN9PR11MB5324namp_--

I will try to find out what clients they are using, but I realized when I was looking through old mails that some emails are parsed correctly and others incorrectly from the same user, so I suspect that it must be something else!? My guess would be that they are all using Microsoft Outlook (the latest desktop office version).

I only found a multipart/mixed, see below.

Hi,

the message structure is:

multipart/mixed
text/plain
application/ms-tnef

Thus they are using tnef format, which is a special Microsoft thing for
formatted mails. There is a tnef plugin for Evolution, which decodes
and shows those, but it seems you’ve it missing. Maybe your distro
packages it separately, or they do not ship it at all. It’s part of the
main sources; it can be the libytnef dependency is the reason why they
disabled it.

I also do not find a Plain Text Mode under HTML Preferences? I am
using version 3.44.4-0ubuntu1 of Evolution under Linuxmint 21.1 vera.

I have it at the very bottom of that tab. It’s also a built-in plugin,
weird you do not have it installed. Or it can be disabled under
Edit->Plugins, maybe. In any case, it’s not the problem here.

Bye,
Milan
1 Like

The plain-text-plugin was disabled for some reason, after I enabled it and restarted Evolution, I can now see the setting you referred to.

I searched for the TNEF plugin in the plugin settings and the Linux Mint software manager, but it does not appear there. I will take a backup of my Evolution data, and install the flatpak version instead, and see if that solves my problem. I will also look around in the Linux Mint forums and see if someone there knows more about this plugin.

If neither of those things solves my problem, I’ll just leave it as it is. I have managed to live with this for a year, so I’ll be ok if I don’t find a solution to this :slight_smile:

Either way, now I know what the problem is, I did not know that TNEF was a thing, so many thanks for that!

Hi,
it will not solve it, the Flathub.org’s version has the YTNEF support
disabled.

You might be able to build the plugin yourself, from the sources:

but it’s beyond this forum how to do it, I’m afraid. I can try to write
a cook book/how-to, if you think it’ll be helpful, though you might
check first whether you have available the YTNEF library in your
distro.

By the way, if I recall correctly, the Outlook has an option to not use
the TNEF format (they may call it RTF in the GUI) - it’s better to not
use it, if they want to “support” more than just Microsoft Outlook for
the recipients. :wink:

Bye,
Milan

Yes, I just tried the flatpak version and it did not work.

I will build it from source, if I don’t get a better idea from the LM forums. Asking the Outlook users might be a solution also, i might even try that first. Thanx again…