Add better control of From headers for e-mails.

Review Request #10419 — Created Feb. 18, 2019 and submitted

chipx86
Review Board
release-3.0.x
reviewboard

This builds upon the new work in Djblets and the contribution from Brian
LeBlanc to add control over whether a Review Board server always uses
a user's own e-mail address as the From address, never does, or chooses
based on DMARC records.

In previous releases, we had a Django setting for switching between
smart spoofing and always spoofing, but never had any UI support for
this, nor did we have any ability to force the default server address to
be used. Brian's change gave users the ability to use the default server
address through a new checkbox in the E-mail Settings page, but removed
the ability to force spoofing (useful and faster in controlled
environments).

This change switches the checkbox to a drop-down list, giving the
options to automatically choose whether to spoof, always spoof, or never
spoof. It utilizes the new from_spoofing= argument in Djblets's
EmailMessage class, replacing the old enable_smart_spoofing argument
and settings.EMAIL_ENABLE_SMART_SPOOFING setting.

It also renames the "Sender e-mail address" setting to
"Default From address", which is a little more clear, especially alongside
the new option.

Unit tests passed.

Manually tested with all the options, checking the headers of the
resulting e-mails.

Summary
Add better control of From headers for e-mails.
Loading file attachments...

david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (9579f29)
Loading...