sendmail: add requiresValidCertificate
some apps really want a valid certificate to send mail and upstream authors won't add support to skip self-signed certs or skip host name check in cert. In our case, the issue is that we use 'mail' as the server name despite having valid certs. this flag will set the server name to the full mail server fqdn and also reconfigure the app as needed when the mail server name changes. we also set up the mail server name to resolve to internal IP because no mail port is exposed when we are not receiving emails!
This commit is contained in:
+3
-1
@@ -1133,8 +1133,10 @@ async function setupSendMail(app, options) {
|
||||
|
||||
const password = existingPassword || hat(4 * 48); // see box#565 for password length
|
||||
|
||||
const smtpServer = options.requiresValidCertificate ? (await mailServer.getLocation()).fqdn : 'mail'; // this is also a hint to reconfigure on mail server name change
|
||||
|
||||
const env = [
|
||||
{ name: 'CLOUDRON_MAIL_SMTP_SERVER', value: 'mail' },
|
||||
{ name: 'CLOUDRON_MAIL_SMTP_SERVER', value: smtpServer },
|
||||
{ name: 'CLOUDRON_MAIL_SMTP_PORT', value: '2525' },
|
||||
{ name: 'CLOUDRON_MAIL_SMTPS_PORT', value: '2465' },
|
||||
{ name: 'CLOUDRON_MAIL_STARTTLS_PORT', value: '2587' },
|
||||
|
||||
Reference in New Issue
Block a user