Skip to content

Fix DMARC misalignment - #446

Merged
duckduckgrayduck merged 3 commits into
masterfrom
staging
Aug 10, 2026
Merged

Fix DMARC misalignment#446
duckduckgrayduck merged 3 commits into
masterfrom
staging

Conversation

@duckduckgrayduck

@duckduckgrayduck duckduckgrayduck commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
image image

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

@duckduckgrayduck
duckduckgrayduck merged commit caf1749 into master Aug 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants