Hi,
My MAIL_URL=smtp://mydomain.com
I get the following error when Accounts.sendVerificationEmail() is executed:
May 08 11:36:54 h2 h2o4[1916]: events.js:160
May 08 11:36:54 h2 h2o4[1916]: throw er; // Unhandled 'error' event
May 08 11:36:54 h2 h2o4[1916]: ^
May 08 11:36:54 h2 h2o4[1916]: Error: connect ECONNREFUSED 127.0.1.1:25
May 08 11:36:54 h2 h2o4[1916]: at Object.exports._errnoException (util.js:1018:11)
May 08 11:36:54 h2 h2o4[1916]: at exports._exceptionWithHostPort (util.js:1041:20)
May 08 11:36:54 h2 h2o4[1916]: at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
I am using meteor 1.4.4.1, have signed certificates from letsencrypt and a working postfix smtp server, which successfully sends mail to my gmail account when running:
echo “test” | mail -s “test” me@gmail.com
I think it is because I do not supply a username and password. However, the mail server does not require a username/password, because it only accepts mail from clients on the same machine 127.0.0.1/8. Node/meteor is hosted on the same machine.
I have tried the following as well:
MAIL_URL=smtp://localhost
Error: Hostname/IP doesn;t match certificates altnames: :Host: localhost is not in the cert’s altnames: DNS:mydomain.com"
MAIL_URL=mydomain.com
Error: Email protocol in $MAIL_URL (mydomain.com) must be ‘smtp’ or ‘smtps’
How should meteor connect/email with a mail server hosted on the same machine?