Fixes to builtin ZoneMTA settings
This commit is contained in:
parent
89a2aa15a4
commit
a5b5f3f1dd
2 changed files with 20 additions and 12 deletions
|
@ -100,15 +100,19 @@ export function getMailerTypes(t) {
|
||||||
data.mailer_settings.logTransactions = data.logTransactions;
|
data.mailer_settings.logTransactions = data.logTransactions;
|
||||||
}
|
}
|
||||||
|
|
||||||
function beforeSaveGenericSMTP(data) {
|
function beforeSaveGenericSMTP(data, builtin = false) {
|
||||||
beforeSaveCommon(data);
|
beforeSaveCommon(data);
|
||||||
data.mailer_settings.hostname = data.smtpHostname;
|
|
||||||
data.mailer_settings.port = Number(data.smtpPort);
|
if (!builtin) {
|
||||||
data.mailer_settings.encryption = data.smtpEncryption;
|
data.mailer_settings.hostname = data.smtpHostname;
|
||||||
data.mailer_settings.useAuth = data.smtpUseAuth;
|
data.mailer_settings.port = Number(data.smtpPort);
|
||||||
data.mailer_settings.user = data.smtpUser;
|
data.mailer_settings.encryption = data.smtpEncryption;
|
||||||
data.mailer_settings.password = data.smtpPassword;
|
data.mailer_settings.useAuth = data.smtpUseAuth;
|
||||||
data.mailer_settings.allowSelfSigned = data.smtpAllowSelfSigned;
|
data.mailer_settings.user = data.smtpUser;
|
||||||
|
data.mailer_settings.password = data.smtpPassword;
|
||||||
|
data.mailer_settings.allowSelfSigned = data.smtpAllowSelfSigned;
|
||||||
|
}
|
||||||
|
|
||||||
data.mailer_settings.maxMessages = Number(data.smtpMaxMessages);
|
data.mailer_settings.maxMessages = Number(data.smtpMaxMessages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +258,8 @@ export function getMailerTypes(t) {
|
||||||
data.dkimPrivateKey = data.mailer_settings.dkimPrivateKey;
|
data.dkimPrivateKey = data.mailer_settings.dkimPrivateKey;
|
||||||
},
|
},
|
||||||
beforeSave: data => {
|
beforeSave: data => {
|
||||||
beforeSaveGenericSMTP(data);
|
beforeSaveGenericSMTP(data, zoneMtaType === ZoneMTAType.BUILTIN);
|
||||||
|
|
||||||
const zoneMtaType = Number.parseInt(data.zoneMtaType);
|
const zoneMtaType = Number.parseInt(data.zoneMtaType);
|
||||||
data.mailer_settings.zoneMtaType = zoneMtaType;
|
data.mailer_settings.zoneMtaType = zoneMtaType;
|
||||||
if (zoneMtaType === ZoneMTAType.WITH_HTTP_CONF || zoneMtaType === ZoneMTAType.WITH_MAILTRAIN_HEADER_CONF) {
|
if (zoneMtaType === ZoneMTAType.WITH_HTTP_CONF || zoneMtaType === ZoneMTAType.WITH_MAILTRAIN_HEADER_CONF) {
|
||||||
|
|
|
@ -105,11 +105,14 @@ mysql:
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
# Install required node packages
|
# Install required node packages
|
||||||
(cd
|
for idx in client shared server zone-mta; do
|
||||||
npm install --no-progress --production
|
(cd $idx && npm install)
|
||||||
|
done
|
||||||
|
|
||||||
|
(cd client && npm run build)
|
||||||
|
|
||||||
chown -R mailtrain:mailtrain .
|
chown -R mailtrain:mailtrain .
|
||||||
chmod o-rwx config
|
chmod o-rwx server/config
|
||||||
|
|
||||||
# Setup log rotation to not spend up entire storage on logs
|
# Setup log rotation to not spend up entire storage on logs
|
||||||
cat <<EOM > /etc/logrotate.d/mailtrain
|
cat <<EOM > /etc/logrotate.d/mailtrain
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue