Cannot reach mailserver from inside docker

0

Locally my code runs fine. On the server it times out. The mailserver runs on the same server and both the mail server and the app are dockerized behind traefik.

with logger: true and debug: true i get this and it's stuck

[2019-03-28 18:28:42] DEBUG Creating transport: nodemailer (6.0.0; +https://nodemailer.com/; SMTP/6.0.0[client:6.0.0])
[2019-03-28 18:28:42] DEBUG Sending mail using SMTP/6.0.0[client:6.0.0]
[2019-03-28 18:28:42] DEBUG [zvN1WRdO2i0] Resolved mail.***.*** as ***.***.***.*** [cache miss]

I can curl the mail.***.*** amdin interface and ping the domain. traceroute times out unfortunately. If I run the code on the server outside of docker it works too.

Any ideas?

cupcakearmy

Posted 2019-03-28T19:02:37.787

Reputation: 1

1Are the ports correctly exposed from the containers? – Aulis Ronkainen – 2019-03-28T20:31:31.040

@AulisRonkainen I think so. I use the email server on a daily basis and when I run it from the server outside of docker or on my local machine it works fine. There is something wrong with the container to container communication – cupcakearmy – 2019-03-28T21:31:48.650

Then I would probably blame DNS, but don't know how to fix it. Btw is your SELinux in enforcing state? Please check the audit log. – Aulis Ronkainen – 2019-03-29T05:07:59.937

No answers