Try to fix weird sender names: High level patch idea #123
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey, I haven’t tested this locally since I don’t have a dev environment set up, but I wanted to put this up because I was hitting a problem importing PSTs.
When I try to import from a PST, the sender names look like this:
From: /O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP (************)/CN=RECIPIENTS/CN=********-********That string is the Exchange LegacyDN (an internal X.500 identifier), not an SMTP address. It happens because when senderAddrtype === "EX", the MAPI properties PR_SENDER_EMAIL_ADDRESS or PR_EMAIL_ADDRESS only return the LegacyDN, not the real SMTP.
What this patch changes
From header:
Recipients (To/Cc/Bcc):
Why
This should avoid weird LegacyDNs showing up in headers and instead generate proper RFC-2822 headers like:
instead of leaking raw X.500 strings.
It needs to be thoroughly tested though.
If this is something that you would be open to testing, I would be grateful. As I'm not familiar with the buildstack, it would be difficult for me to get up and running.