Mailgun mail system not working (using Discourse)

August 29, 2019 102 views
Email Ubuntu 18.04

So I’ve used discourse diagonostic tool and here’s the error :

==================== MAIL TEST ====================
For a robust test, get an address from
Or just send a test message to yourself.
Email address for mail test? ('n' to skip) []:
Sending mail to . .
Testing sending to using
======================================== ERROR ========================================
Connection to port 2525 failed.
====================================== SOLUTION =======================================
The most likely problem is that your server has outgoing SMTP traffic blocked.
If you are using a service like Mailgun or Sendgrid, try using port 2525.

(I’ve removed all sensitive info here)

So it says that ports are closed. I’ve tried opening ports on the firewall typing ‘ufw allow 2525’ (ports numbers) but I still have these errors.

Any help is greatly appreciated

1 Answer


What I could suggest here is, make sure that it is not something at Mailgun’s end, run a telnet test to the port quiz site:

telnet 2525

If you are able to connect then maybe Mailgun are rejecting the connections from your droplet, I could suggest reloading your UFW service and then check the status

sudo ufw reload 
sudo ufw status

Hope that this helps!

Have another answer? Share your knowledge.