Change e-mail sending to use <Name> via Review Board when e-mail spoofing disabled.
Review Request #9216 — Created Sept. 24, 2017 and submitted
When e-mail messages are created with
enabled_smart_spoofing
disabled,
the 'From' header should match a DMARC failure but instead the original
from_address
is used.This changes makes e-mail messages copy the same functionality as DMARC
not allowing spoofing whenenable_smart_spoofing
is disabled. This
changes the mail tests to expect the change in functionality when
enable_smart_spoofing
isFalse
.This change is from the comments on the review for adding an option for
disabling e-mail smart spoofing (https://reviews.reviewboard.org/r/9209).
The full testing suite for djblets was run.
Description | From | Last Updated |
---|---|---|
Please add the bug number in the bugs field. |
brennie | |
Can you run all of djblets tests? |
brennie | |
This needs unit tests for the new conditionals. Right now, I'm not 100% sure that this doesn't regress functionality. |
chipx86 | |
Format as: if (not enable_smart_spoofing or parsed_from_email != parsed_sender_email and not is_email_allowed_by_dmarc(parsed_from_email)): |
brennie | |
Use %-formatting: '"doc via example.com" <%s>' % settings.DEFAULT_FROM_EMAIL |
brennie | |
Same here re: formatting. |
brennie | |
The comments for all this logic no longer match the conditional, making it harder to understand the impact of the … |
chipx86 |
- Change Summary:
-
Fix formatting issues brought up in review comments.
- Testing Done:
-
~ The testing suite for djblets mail was run.
~ The full testing suite for djblets was run.
- Commit:
-
7185029c7484540f459491e6c77146e19b8b449fcf262ca146f17d7f493eae5f84ef86ba8e672faa
- Diff:
-
Revision 2 (+13 -6)
Checks run (2 succeeded)
- Change Summary:
-
Fix comments to reflect changes to code.
- Commit:
-
cf262ca146f17d7f493eae5f84ef86ba8e672faa779e35857216724e8a37361aaf34fb622d1932b3
- Diff:
-
Revision 3 (+26 -16)
Checks run (2 succeeded)
- Change Summary:
-
Add test case for
enable_smart_spoofing=False
. - Commit:
-
779e35857216724e8a37361aaf34fb622d1932b32179201c0db5dfbd7d4ed0a6741893b1f812ffd6
- Diff:
-
Revision 4 (+59 -16)