Postal: SMTP Timeout after 2 emails sent

Created on 5 Jun 2017  路  3Comments  路  Source: postalhq/postal

I'm trying it on my production site.
It used to work on my test, I can send emails from my Mac to the Ubuntu server where Postal is installed.
But when I try to do the same from another Ubuntu server, it just send 2 emails and then stop and gives timeout errors.
I even try to connect with telnet and works, but when it is sending telnet doesn't work either. It is like if SMTP connection is not being accepted. But there is no firewall on it.
No errors in the logs, it doesn't even connect.

My newsletter app is on Ubuntu in Amazon AWS. And Postal is on DigitalOcean.
From my Mac, it works, from Ubuntu server it stop working after 2 emails.

Postal has default settings, with 2 workers.

Any idea about what is happening?

Most helpful comment

As per https://github.com/atech/postal/issues/192 it appears AWS is a bit wierd about using port 25.

If you absolutely have to use SMTP instead of the API, you can use iptables to send port 2525 to postal like this:

/sbin/iptables -t nat -I PREROUTING -d 172.31.30.15 -p tcp -m tcp --dport 2525 -j DNAT --to-destination 172.31.30.15:25
/sbin/iptables -t nat -I OUTPUT     -d 172.31.30.15 -p tcp -m tcp --dport 2525 -j DNAT --to-destination 172.31.30.15:25

Then you can update your application to send to port 2525 and Amazon should leave it alone.

All 3 comments

As per https://github.com/atech/postal/issues/192 it appears AWS is a bit wierd about using port 25.

If you absolutely have to use SMTP instead of the API, you can use iptables to send port 2525 to postal like this:

/sbin/iptables -t nat -I PREROUTING -d 172.31.30.15 -p tcp -m tcp --dport 2525 -j DNAT --to-destination 172.31.30.15:25
/sbin/iptables -t nat -I OUTPUT     -d 172.31.30.15 -p tcp -m tcp --dport 2525 -j DNAT --to-destination 172.31.30.15:25

Then you can update your application to send to port 2525 and Amazon should leave it alone.

That should be the problem, I'm using the newsletter system (PHP) and Postal on the same server now and works.
Thank you

thats certainly one way of fixing it but I would be concerned about memory usage long term

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shinebayar-g picture shinebayar-g  路  3Comments

igerzog picture igerzog  路  5Comments

yeah-nothing picture yeah-nothing  路  6Comments

Razva picture Razva  路  7Comments

ro78 picture ro78  路  4Comments