Files
bjoern bffb41326c better names for more mailinglist-types (#2685)
* add a test for xing mailinglists

* strip long hash-prefixes from mailinglist name if we got the name from the List-Id as a last resort

* add a test for newsletter@ mailinglists

these mailinglists have the list-name in `From:`
and can be detected by addresses starting with `newsletter@`.

* if not list-name is set, use the `From:` name for addresses starting with `newsletter@`

this is similar to what we do with `notifications@`

* Update src/dc_receive_imf.rs

Co-authored-by: Hocuri <hocuri@gmx.de>

* add an example to the regex

Co-authored-by: Hocuri <hocuri@gmx.de>
2021-09-16 18:43:37 +02:00

76 lines
3.0 KiB
Plaintext

Return-Path: <mailrobot@mail.xing.com>
X-Original-To: pbetersen@b123.com
Delivered-To: m123123f@dd12312.kasserver.com
X-policyd-weight: using cached result; rate: -7
Authentication-Results: dd12312.kasserver.com;
dkim=pass (1024-bit key; unprotected) header.d=mail.xing.com header.i=@mail.xing.com header.b="o123123j";
dkim-atps=neutral
Received: from mailout1-107.xing.com (mailout1-107.xing.com [109.233.158.107])
by dd12312.kasserver.com (Postfix) with ESMTPS id DCB9D53C055C
for <pbetersen@b123.com>; Tue, 14 Sep 2021 12:11:17 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; d=mail.xing.com; s=main; c=relaxed/simple;
q=dns/txt; i=@mail.xing.com; t=1631614277;
h=From:Subject:Date:To:Mime-Version:Content-Type:X-CSA-Complaints:List-Help;
bh=bc0sqvXhKYO4cLpVn9ZYqLQQYPgPysrjt9/f6mx2BQI=;
b=o123123jtfoTCEiqaRZ3ax7h17rGfXP1ZQ3sjbdaBguPy5q1k+EpuXYdCwFq7S7z
yRjbK+VvTSKDn4Dxqk/wA9hFyGrO6XuYdJt3NEZ3Yye7W222dNR58ww3XCavjSpY
pzhJdAEo9Zw1sG3fhtm2eI60Oe1hLOr6G657sAo2ubQ=;
X-MSFBL: SwzhdcKRUcljkfTYaEiSU28Q3a0pxO+Z9dY1NMgWyq4=|eyJnIjoibWFpbG91dDE
iLCJiIjoibWFpbG91dDEtMTA3IiwidSI6ImNvbnRhY3RzL215bWs7RzhMWjI0RlR
SSUItdVkxaXRaa1EiLCJyIjoiYnBldGVyc2VuQGI0NHQuY29tIn0=
Received: from [10.12.225.241] ([10.12.225.241:27696])
by mta-6.mail.ams1.xing.com (envelope-from <mailrobot@mail.xing.com>)
(ecelerity 4.2.1.51128 r(Core:4.2.1.5)) with REST
id 82/69-03094-54570416; Tue, 14 Sep 2021 12:11:17 +0200
Date: Tue, 14 Sep 2021 12:11:17 +0200
From: =?UTF-8?B?WElORyBLb250YWt0dm9yc2NobMOkZ2U=?= <mailrobot@mail.xing.com>
Reply-To: no-reply@mail.xing.com
To: =?UTF-8?B?QmrDtnJuIFBldGVyc2Vu?= <pbetersen@b123.com>
Message-ID: <6123123123123_5123123123123@hermes-worker-5123123123-7lcmp.mail>
Subject: Kennst Du Dr. Mabuse?
Mime-Version: 1.0
Content-Type: multipart/alternative;
boundary="--==_mimepart_614075452ac33_5ed3cc13386fc";
charset=UTF-8
Content-Transfer-Encoding: 7bit
List-Help: <https://www.xing.com/settings/notifications>,
<mailto:fbl@xing.com>
List-Id: <51231231231231231231231232869f58.xing.com>
X-CSA-Complaints: csa-complaints@eco.de
X-KasLoop: m123123f
----==_mimepart_614075452ac33_5ed3cc13386fc
Content-Type: text/plain;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
**********************************************************
* unfortunately:
*
* - xing mailinglists do not have a name in `List-Id:`
* so we cannot get the name from there
*
* - different senders may use the same `List-Id:`,
* at least i found that two times,
* maybe it is a bug on xing's side as most times `List-Id:` differs,
* however, so we cannot get the name from `From:`.
*
* to avoid chat names as `51231231231231231231231232869f58.xing.com`,
* we detect the hash prefix and strip that;
* as the sender, we have "xing.com" then, which is fine.
*
* that approach should also work for other mailinglist.
**********************************************************
----==_mimepart_614075452ac33_5ed3cc13386fc
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: quoted-printable
html ...
----==_mimepart_614075452ac33_5ed3cc13386fc--