Postmark inbound: improve inbound parsing

- Support Postmark's RawEmail option;
  recommend it in docs
- Handle Bcc when provided by Postmark
- Obtain `envelope_sender` from Return-Path info
  Postmark now adds, rather than parsing Received-SPF

Related:
- Add `AnymailInboundMessage.bcc` convenience prop
- Test against full Postmark "check" inbound payloads
  (which don't match their docs or real inbound payloads)
- Don't warn about receiving "check" payload
This commit is contained in:
Mike Edmunds
2023-05-05 18:24:01 -07:00
parent 746cf0e24e
commit 744d467f70
8 changed files with 425 additions and 216 deletions

View File

@@ -59,6 +59,19 @@ Breaking changes
* Require urllib3 1.25 or later (released 2019-04-29).
Features
~~~~~~~~
* **Postmark inbound:**
* Handle Postmark's "Include raw email content in JSON payload"
inbound option. Enabling this setting is recommended to get
the most accurate representation of any received email.
* Obtain ``envelope_sender`` from *Return-Path* Postmark now provides.
(Replaces potentially faulty *Received-SPF* header parsing.)
* Add *Bcc* header to inbound message if provided. Postmark adds bcc
when the delivered-to address does not appear in the *To* header.
Other
~~~~~