mail-mime-parser icon indicating copy to clipboard operation
mail-mime-parser copied to clipboard

ReceivedHeader: add parse for Authenticated sender

Open toto4ds opened this issue 5 years ago • 1 comments

Hi,

Looking at ticket #78, I propose to add parsing "Authenticated sender", example:

Received: from my.mail.host (my.mail.host [193.193.193.193]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: [email protected]) by my.mail.host (Postfix) with ESMTPSA id 1F2D84BE6E0E for [email protected]; Tue, 14 Jan 2020 15:48:06 +0700 (+07)

I want to note that the field can be without a domain, example: (Authenticated sender: postmaster)

Thx

toto4ds avatar Jan 18 '20 11:01 toto4ds

Hi @toto4ds --

I specifically and purposefully left out other parts of a Received header, because there is so much variation and no clear guideline to follow, and because I don't want to chase differences in the wild. You can look at and parse those yourself though by calling $header->getComments() and looking for one that starts with "Authenticated sender:" or something.

zbateson avatar Jan 27 '20 20:01 zbateson