Connection refused - connect(2)

AI-generated summary

Connection Refused Error with SMTP

The issue started with Sameeran_Joshi1 experiencing a “Connection refused - connect(2)” error when trying to verify their email address on their Discourse forum. They were using AWS as their server, Namecheap for their domain, and Namecheap’s email service.

After trying different SMTP ports (587 and 25), pfaffman suggested trying port 2525, as it’s often supported by most services. He also mentioned that the SMTP HOST might need to be updated, as Namecheap typically provides a hostname instead of an IP address.

Sameeran_Joshi1 was unsure about the SMTP address for Namecheap, as they mentioned it as “localhost.” They then checked the MX records using dnswatch.info and found two possible SMTP addresses: mx1.privateemail.com and mx2.privateemail.com. However, they were unsure which one to use.

RGJ pointed out that the IP address 35.91.163.152 belongs to the forum, not the SMTP service, and suggested contacting Namecheap for further assistance.

In response, Sameeran_Joshi1 asked for alternative email providers that are simpler to configure and work with Discourse, while keeping the same domain from Namecheap.

I am using aws server, and namecheap for domain and email provided through namecheap service.
I get below error and not sure what is missing.

I am using SMTP_PORT = 587, I tried with 25 as well.
So here’s the problem which was occurring, I had installed and set it up and could register my account on discourse, but at the end when it asks me to verify my email I never get an email in my inbox.
So I tried a few small fixes by searching this discourse forum previous errors hence I ended up with the above port.
Not sure what is the solution on this, if any pointers are given that would be really helpful.

======================================== ERROR ========================================
CONNECTION REFUSED

Connection refused - connect(2) for 35.91.163.152:587

====================================== SOLUTION =======================================

Those are likely blocked, though I’m not sure whether it’s at the OS level, the network permissions level, or further up at AWS. You might try port 2525. Most services support that for just this reason. I can’t connect to that IP either, and I would expect namecheap to provide you with a hostname, not an IP address, so I suspect that you need to update the SMTP HOST.

How do I find the SMTP address for namecheap, because they say it to be localhost, so I maybe missing something ?

I tried to go and check dnswatch.info and add my email provided and query for MX field, I get the below results

logmyresearch.online. MX 1800 10 mx1.privateemail.com.
logmyresearch.online. MX 1800 10 mx2.privateemail.com.

I suspect my SMTP address is the mx*.privatemail.com, but confused as to if it is mx1 or mx2 ?
Thanks

That does not sound correct. What kind of service did you buy from them?
I’m afraid you’ll need to contact Namecheap for this, this is not a Discourse issue.

35.91.163.152 is the IP address of your forum, not the IP address for your SMTP service.

Bought a domain and a private email from these folks ?
Any other email provider you can suggest which is more simpler to configure and works with discourse ?
Although the domain will be the same from namecheap.