deltachat / chatmail

chatmail service deployment scripts and docs
https://delta.chat/en/2023-12-13-chatmail
MIT License
141 stars 14 forks source link

Do not cleanup headers on received mails #163

Closed link2xt closed 10 months ago

link2xt commented 11 months ago

https://github.com/deltachat/chatmail/pull/156 just got merged and it removes Received headers for sent mails to avoid leaking MUA IP address.

These settings however apply to both incoming and outgoing mails currently, so when we receive an incoming message with a lot of Received headers, we drop all of them. I sent a mail from testrun.org (running mailcow) to c20.testrun.org and got only a single Received header:

Return-Path: <link2xt@testrun.org>
Delivered-To: 6hfei64rn@c20.testrun.org
Received: from c20.testrun.org
    by c20 with LMTP
    id Z5BuAQW7mGWcQQEAysZ61w
    (envelope-from <link2xt@testrun.org>)
    for <6hfei64rn@c20.testrun.org>; Sat, 06 Jan 2024 02:29:25 +0000

We generally want to have Received headers to display hop info in the message info in Delta Chat, it is like a traceroute that can show you where the message was delayed if you receive it late.

ghost commented 10 months ago

I understand your point, but it is angainst a strictly data save stadard. Only data is save, which is not stored in any way. The bigest critic to deltachat is the mass of meta-data in emails.

Maybe a compromiss is a flag into chatmai.ini to choose the strength of headercleaning (nad the strength of pipeling-stopp). But think of , that it is a harder point to programm for the cmdeploy programmers

link2xt commented 10 months ago

I merged #197 because removing Received headers on received messages broke DKIM signatures from purelymail. They sign Received headers so we cannot just drop them.