Add CLOUDRON_MAIL_SMTP_STARTTLS env

starting 6.3, the internal mail server will do STARTTLS. this env
allows apps to configure themselves appropriately for pre 6.3 and
post 6.3 appropriately.

we trigger a re-configure which ensures that the new env gets put
in the database and then in the container.
This commit is contained in:
Girish Ramakrishnan
2021-03-16 16:20:06 -07:00
parent a3ee79ccbd
commit 098da7426c
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -1084,7 +1084,8 @@ function setupSendMail(app, options, callback) {
{ name: `${envPrefix}MAIL_SMTP_USERNAME`, value: app.mailboxName + '@' + app.mailboxDomain },
{ name: `${envPrefix}MAIL_SMTP_PASSWORD`, value: password },
{ name: `${envPrefix}MAIL_FROM`, value: app.mailboxName + '@' + app.mailboxDomain },
{ name: `${envPrefix}MAIL_DOMAIN`, value: app.mailboxDomain }
{ name: `${envPrefix}MAIL_DOMAIN`, value: app.mailboxDomain },
{ name: `${envPrefix}MAIL_SMTP_STARTLS`, value: '1' },
];
debugApp(app, 'Setting sendmail addon config to %j', env);
appdb.setAddonConfig(app.id, 'sendmail', env, callback);