Add better control of From headers for e-mails.
Review Request #10419 — Created Feb. 18, 2019 and submitted
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
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
EmailMessageclass, replacing the old
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