Fix DMARC misalignment - #446
Merged
Merged
Conversation
eyeseast
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Production sends emails asynchronously via a Celery task. The EMAIL_BACKEND is djcelery_email.backends.CeleryEmailBackend, which serializes the message to a dict, ships it to a Celery worker, and only there hands it to CELERY_EMAIL_BACKEND (the Anymail Mailgun backend). django-celery-email's email_to_dict only carries standard Django message fields plus any attributes listed in CELERY_EMAIL_MESSAGE_EXTRA_ATTRIBUTES. Anymail-specific attributes like envelope_sender are not in the default set, so they were dropped in serialization. By the time the worker's Mailgun backend ran, there was no per-message override left, and it fell back to MAILGUN_SENDER_DOMAIN which is mg.documentcloud.org