Make internal smtp port a constant

This commit is contained in:
Girish Ramakrishnan
2019-07-25 15:27:28 -07:00
parent 2d260eb0d5
commit a6ea12fedc
4 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ function validatePortBindings(portBindings, manifest) {
2514, /* cloudron-syslog (lo) */
config.get('port'), /* app server (lo) */
constants.SYSADMIN_PORT, /* sysadmin app server (lo) */
config.get('smtpPort'), /* internal smtp port (lo) */
constants.INTERNAL_SMTP_PORT, /* internal smtp port (lo) */
config.get('ldapPort'), /* ldap server (lo) */
3306, /* mysql (lo) */
4190, /* managesieve */
-1
View File
@@ -85,7 +85,6 @@ function initConfig() {
data.apiServerOrigin = null;
data.webServerOrigin = null;
data.provider = 'generic';
data.smtpPort = 2525; // this value comes from mail container
data.ldapPort = 3002;
data.dockerProxyPort = 3003;
+1
View File
@@ -21,6 +21,7 @@ exports = module.exports = {
ADMIN_LOCATION: 'my',
INTERNAL_SMTP_PORT: 2525, // this value comes from the mail container
SYSADMIN_PORT: 3001,
NGINX_DEFAULT_CONFIG_FILE_NAME: 'default.conf',
+1 -1
View File
@@ -84,7 +84,7 @@ function sendMail(mailOptions, callback) {
var transport = nodemailer.createTransport(smtpTransport({
host: mailServerIp,
port: config.get('smtpPort'),
port: constants.INTERNAL_SMTP_PORT,
auth: {
user: mailOptions.authUser || `no-reply@${config.adminDomain()}`,
pass: relayToken