diff --git a/src/addons.js b/src/addons.js index 23b57be22..d185c5d99 100644 --- a/src/addons.js +++ b/src/addons.js @@ -390,9 +390,10 @@ function setupEmail(app, options, callback) { assert.strictEqual(typeof options, 'object'); assert.strictEqual(typeof callback, 'function'); + // note that "external" access info can be derived from MAIL_DOMAIN (since it's part of user documentation) var env = [ 'MAIL_SMTP_SERVER=mail', - 'MAIL_SMTP_PORT=2500', + 'MAIL_SMTP_PORT=2525', 'MAIL_IMAP_SERVER=mail', 'MAIL_IMAP_PORT=9993', 'MAIL_DOMAIN=' + config.fqdn() diff --git a/src/mailer.js b/src/mailer.js index cf37aebbf..6a32d8375 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -159,14 +159,14 @@ function sendMails(queue) { var transport = nodemailer.createTransport(smtpTransport({ host: mailServerIp, - port: 2500, // this value comes from mail container + port: 2525, // this value comes from mail container auth: { user: 'no-reply', // derive from adminEmail pass: 'supersecret' } })); - debug('Processing mail queue of size %d (through %s:2500)', queue.length, mailServerIp); + debug('Processing mail queue of size %d (through %s:2525)', queue.length, mailServerIp); async.mapSeries(queue, function iterator(mailOptions, callback) { transport.sendMail(mailOptions, function (error) { diff --git a/src/scripts/setup_infra.sh b/src/scripts/setup_infra.sh index 0c1d3a795..25698d31d 100755 --- a/src/scripts/setup_infra.sh +++ b/src/scripts/setup_infra.sh @@ -62,7 +62,7 @@ if docker images "${GRAPHITE_REPO}" | tail -n +2 | awk '{ print $1 ":" $2 }' | g echo "Removed old graphite images" fi -# mail (MAIL_SMTP_PORT is 2500 in addons.js. used in mailer.js as well) +# mail (note: 2525 is hardcoded in mail container and app use this port) # MAIL_SERVER_NAME is the hostname of the mailserver i.e server uses these certs # MAIL_DOMAIN is the domain for which this server is relaying mails mail_container_id=$(docker run --restart=always -d --name="mail" \