Conversation
29cb805 to
89d816c
Compare
|
I'm concerned this is going to break substatial backwards compatibility. Not to say we shouldn't do it, but it needs to be taken into consderation. @andrewtimberlake thoughts? |
|
While this is technically correct, I’m not inclined to accept this change. |
|
Fair points on backwards compatibility. Would it be possible to make this parsing optional using We know the BCC header shouldn't be there in delivered mail, and even when it is, it may be empty (just Our use-case for this feature is as a security company we analyze emails and want as full a picture of the email received as possible even if it includes rare edge cases. 😃 |
|
@MikaelFangel we've had one or two issues in the past where the strict adherance to the spec ran afoul to the industry usage. I think what we really require is a RFC2822 strict mode. It would be one you could opt into or a feature flag this way for those seeking to really stick 100% to the specification it meets your needs then for everybody else it would still have the current behavior. |
|
@bcardarella - That makes sense. Thank you for your responses and time 😊 we'll probably just use it as is for now then. |
|
@MikaelFangel we do support the Encoder and Renderer being swapped out as an adapter. However, I suspect this breaks in certain areas at the moment like recipiet verification. If you all are interested in this I think a PR to ensure that functions that are hard coded for the RFC2822 adapaters allow the optoinal override. The pattern is already in functions like |
|
@bcardarella - perfect we give it a look. |
|
I understand the concerns regarding backward compatibility, and that most email systems expect a single From recipient... But since this library is intended for general email parsing and the parser is said to adhere to the RFC 2822, my understanding is that it should ensure correct parsing of all valid header fields defined by the RFC - including cases where multiple From recipients are present. While SPF, DKIM, and DMARC are all built around the expectation that there is a single from address, that expectation may not necessarily need to constrain a general-purpose mail library. It would be a shame to lose potentially important information from a valid email because it was dropped during parsing... With that in mind, I really hope you will still give the change request some consideration. Until then, we will try swapping it out as you suggested |
|
@yech199 as I mentioned a |
Closes # .
Changes proposed in this pull request
The RFC 2822 §3.6.2, which the parser adheres to, states:
In other words:
Therefore, this change proposes returning all from and reply-to recipients if present, and only the first sender recipient if present.