Fixes in VERP handling.

VERP disable header option moved from config to send configurations.
Some additional logging for VERP.
This commit is contained in:
Tomas Bures 2018-12-26 09:24:46 +00:00
parent a769bfb567
commit 3b1986116f
7 changed files with 33 additions and 16 deletions

View file

@ -83,6 +83,7 @@ export default class CUD extends Component {
this.mailerTypes[data.mailer_type].afterLoad(data);
data.verpEnabled = !!data.verp_hostname;
data.verp_hostname = data.verp_hostname || '';
data.verp_disable_sender_header = data.verpEnabled ? !!data.verp_disable_sender_header : false;
});
} else {
@ -100,6 +101,7 @@ export default class CUD extends Component {
subject_overridable: false,
verpEnabled: false,
verp_hostname: '',
verp_disable_sender_header: false,
x_mailer: '',
mailer_type: MailerType.ZONE_MTA,
...this.mailerTypes[MailerType.ZONE_MTA].initData()
@ -156,6 +158,7 @@ export default class CUD extends Component {
this.mailerTypes[data.mailer_type].beforeSave(data);
if (!data.verpEnabled) {
data.verp_hostname = null;
data.verp_disable_sender_header = false;
}
});
@ -229,8 +232,9 @@ export default class CUD extends Component {
<Trans i18nKey="verpUsuallyOnlyWorksIfYouAreUsingYourOwn"><p className="text-warning">VERP usually only works if you are using your own SMTP server. Regular relay services (SES, SparkPost, Gmail etc.) tend to remove the VERP address from the message.</p></Trans>
{mailtrainConfig.verpEnabled ?
<div>
<CheckBox id="verpEnabled" text={t('verpEnabled')}/>
<CheckBox id="verpEnabled" label={t('VERP status')} text={t('Enabled')}/>
{verpEnabled && <InputField id="verp_hostname" label={t('serverHostname')} placeholder={t('theVerpServerHostnameEgBouncesexamplecom')} help={t('verpBounceHandlingServerHostnameThis')}/>}
{verpEnabled && <CheckBox id="verp_disable_sender_header" text={t('Disable sender header')} help={t('With DMARC, the Return-Path and From address must match the same domain. By default we get around this by using the VERP address in the Sender header, with the side effect that some email clients diplay an ugly on behalf of message. You can safely disable this Sender header if you\'re not using DMARC or your VERP hostname is in the same domain as the From address.')}/>}
</div>
:
<Trans i18nKey="verpBounceHandlingServerIsNotEnabled"><p>VERP bounce handling server is not enabled. Modify your server configuration file and restart server to enable it.</p></Trans>