email - SMTP server not working, running on Node.js with Mailin package -


i followed mailin docs haven't been able make work.

my domain is: aryan.ml

i'm using amazon route 53 dns configurations. here's screenshot of that: amazon route 53 dns configurations

on app.js file i'm running sample code given official mailin docs well. code under "embedded inside node application" heading @ http://mailin.io/doc

var mailin = require('mailin');    mailin.start({    port: 25,    disablewebhook: true // disable webhook posting.  });    /* access simplesmtp server instance. */  mailin.on('authorizeuser', function(connection, username, password, done) {    if (username == "johnsmith" && password == "mysecret") {      done(null, true);    } else {      done(new error("unauthorized!"), false);    }  });    /* event emitted when connection mailin smtp server initiated. */  mailin.on('startmessage', function(connection) {    /* connection = {        from: 'sender@somedomain.com',        to: 'someaddress@yourdomain.com',        id: 't84h5ugf',        authentication: { username: null, authenticated: false, status: 'normal' }    }    }; */    console.log(connection);  });    /* event emitted after message received , parsed. */  mailin.on('message', function(connection, data, content) {    console.log(data);    /* useful parsed message here.     * use parsed message `data` directly or use raw message `content`. */  });

i tried testing setup using mxtoolbox "failed connect" mx server. http://mxtoolbox.com/supertool.aspx?action=smtp%3amxemail.aryan.ml&run=toolpage

any help/guidance appreciated.

you need make sure these 2 things correct (for aws):

  1. turns out amazon's security group kept blocking port 25. if you're experiencing similar problems on aws make sure allow traffic through port 25 of server.
  2. for mailin package navigate /node_modules/mailin/lib/mailin.js , change default value of host 0.0.0.0, it's on line 27. solves problem on aws.

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -