Add POSTFIX_STRIP_SENDER_HEADER Environment Variable#354
Merged
crazy-max merged 2 commits intoanonaddy:masterfrom Oct 19, 2025
Merged
Add POSTFIX_STRIP_SENDER_HEADER Environment Variable#354crazy-max merged 2 commits intoanonaddy:masterfrom
crazy-max merged 2 commits intoanonaddy:masterfrom
Conversation
Contributor
Author
|
I've just tested and verified this change works exactly as expected. Thank you to @buxm for providing the exact changes needed to resolve this issue. Removing draft flag from this PR and opening it up for review.. |
Contributor
Author
|
Hey @crazy-max! Just wanted to give this a friendly bump – it's been about 7 weeks since submission. Would love to get your eyes on this when you have a chance. Thanks for all your work on the project! |
crazy-max
reviewed
Oct 18, 2025
| chmod o= /etc/postfix/mysql-virtual-alias-domains-and-subdomains.cf | ||
| chgrp postfix /etc/postfix/mysql-virtual-alias-domains-and-subdomains.cf | ||
|
|
||
| if [ "$POSTFIX_STRIP_SENDER_HEADER" = "true" ]; then |
Member
There was a problem hiding this comment.
Can you also add the default value for this env at
docker/rootfs/etc/cont-init.d/00-env
Lines 84 to 92 in d5210af
Member
|
Looks good to me, thanks all. |
willbrowningme
approved these changes
Oct 19, 2025
crazy-max
approved these changes
Oct 19, 2025
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.
When inbound emails contain a "Sender" header, AnonAddy doesn't strip it off when forwarding the email. This causes problems if you've configured the application to relay emails via Amazon SES, since it validates that ALL email headers (From, Sender, and Return-Path) contain only verified identities in your SES account. If any of these headers contain an unverified domain, SES rejects the entire email with an error like:
This change adds a POSTFIX_STRIP_SENDER_HEADER env var (default
false), which will optionally configure Postfix to strip off the "Sender" header from emails if present before attempting to relay them.To enable Sender header stripping, set the environment variable:
Fixes #267
Related: anonaddy/anonaddy#471