Mail-In-A-Box will not send to external addresses through ports 465 or 587

Hi folks, I’m in email h#ll, in dire need of your expert help :) I’ve set up Mail-In-A-Box on Ubuntu 18.04, all working fine apart from the well-known port 25 issue. I’m informed that I can use ports 465 and 587 though. Those ports are confirmed open after running the appropriate ufw and iptables commands, but my node.js script using nodemailer will not send to any external addresses - neither from 465 nor from 587. It sends fine to internal addresses on my MiaB box. The same script works perfectly with SendGrid, Gmail and SendInBlue, (mails do arrive at external addresses) so there’s no problem there, it’s these dang ports on my MiaB box - ufw status says they’re open, but they behave like they’re not :( I strongly dislike the way those 3rd-party SMTP services retain copies of the mails and hijack links to gather metrics, so I really need this to work … Any ideas? Thanks, Craig.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


As you are able to reach the external SMTP services via those ports, then this indicates that the ports should indeed be open.

Are you getting any bouncebacks when trying to send from the Droplet itself?

I could suggest sending an example email to the Mail Tester website bellow:

This will generate a report on why your emails might not be delivered to the respective recepients.

Regards, Bobby