hpk42 / muacrypt

Autocrypt and more for Mail User Agents
Other
36 stars 15 forks source link

Discussion: no Delivered-To header, what next? #69

Closed shtrom closed 4 months ago

shtrom commented 6 years ago

Hey there,

Apparently, some of my email accounts' servers do not add a Delivered-To header.

What can we do from here? Extend the list of headers we extract recipients from?

I have browsed through the Level 1 spec, and it only seems to use the header in the examples, but not as a normative requirement.

hpk42 commented 6 years ago

Would adding an "--account ACC" option to process-incoming help? This would shortcut the determination of which account to process an email with.

shtrom commented 6 years ago

On Mon 21 May 2018 at 08:37:33 -0700, holger krekel wrote:

Would adding an "--account ACC" option to process-incoming help? This would shortcut the determination of which account to process an email with.

It would, but it would require change in the integration (i.e., now the MUA needs to know and explicitely which MUACrypt account to use)

I think the option would be useful nonetheless, but I would rather look for a set of known header that contain the recipient's email address such as Envelope-To or, ultimately, To.

We're probably in non-standard common-use territory, so it will be an interesting endeavour.

-- Olivier Mehani shtrom@ssji.net PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655 Confidentiality cannot be guaranteed on emails sent or received unencrypted.

hpk42 commented 6 years ago

in the new "scandir-incoming" there is new logic which does not look at Delivered-To anymore, other places (in process-incoming) need to be adapted accordingly. The problem with delivered-to is that one can then not have different keys for aliases. The new logic is at https://github.com/hpk42/muacrypt/blob/master/muacrypt/account.py#L170 and looks at all To/CC headers to try to find the account for an incoming message. If nothing can be found it falls back to Delivered-To. This logic is not used everywhere, especially not in process-incoming yet but it should.