Add config option for always sending emails from server email.
Review Request #9209 — Created Sept. 22, 2017 and submitted — Latest diff uploaded
Review Board tries to send e-mails on behalf of users by spoofing their
e-mail address, in order to offer better comment threads. While it tries
to be smart about when to do this (by checking DNS records to see whether
it can safely spoof the e-mail address), it's sometimes ideal to simply
turn off this behavior and send from the server's configured e-mail
address instead.This change adds an option to force the server's e-mail address to be
used for all e-mails. When enabled, e-mails will still appear to come
from the user, but only by name (using "<Name> via Review Board
server@email" as the From address).In order for this change to correctly send e-mails using the "<Name> via
Review Board server@email" format, the mail message in djblets must be
updated to send e-mails using that format whenemail_smart_spoofing
is
set toFalse
.
The notifications tests were updated to check that the email used is
settings.DEFAULT_FROM_EMAIL
instead ofsettings.SERVER_EMAIL
. The
reviewboard.notifications.tests
suite was run. Tests added for new
review emails and review reply emails with enable_smart_spoofing
disabled.