User gvalchca reported an issue where their Discourse instance suddenly stopped sending emails after an update, despite unchanged server settings and working external scripts. The error pointed to failed DNS resolution during SMTP delivery. After sharing their config — including an internal SMTP server without authentication — community members like zogstrip and codinghorror confirmed the root cause was DNS-related, especially after gvalchca encountered Could not resolve host: github.com while trying to rebuild the app. Suggestions included testing DNS connectivity via ping or curlzogstrip, checking Docker DNS settings fantasticfears, and ensuring internal DNS is properly configured for internal services Kevin_McKinney and clay. gvalchca eventually resolved the issue by modifying DOCKER_OPTS to --ip 127.0.0.1 and adding DISCOURSE_SMTP_AUTHENTICATION: 'none' with quoted TLS settings. Others noted that internal SMTP setups require internal DNS servers and proper network restrictions fantasticfears. The thread also sparked a discussion about improving Discourse’s diagnostics: sam suggested discourse_doctor should auto-detect DNS issues, and pfaffman noted it already runs email tests but could be better integrated into setup. The resolution highlights the importance of Docker DNS configuration for internal services and the value of community troubleshooting.
Im having problems with my instance of Discourse. Although the servers parameters didnt change, and I am able to use them e.g. via simple Python script, the Discourse fails to send emails.
It happened all of a sudden about a month ago after an update. I have rechecked the server parameters, apart from that I’m completely lost.
Google’s DNS may just help you to access the wild on Internet. It’s for access the web.
For email sending, I am not sure how it works.[quote=“gvalchca, post:3, topic:43592”]
its a local server for internal use only:
[/quote]
You have set a DNS record for your SMTP server. How you prevent it from unauthorized access since you are exposing your username and claim it doesn’t need a password?
The second time I installed Discourse, I was having issues where emails wouldn’t send (same setup as you - internal SMTP at my company). It turned out that I had to configure Docker to find our DNS server because it couldn’t resolve the SMTP server.
I added this to the bottom of my DOCKER_OPTS: DOCKER_OPTS="--dns 172.X.X.X --dns 172.X.X.X"
@gvalchca I had a similar problem with an internal install of Discourse. I noted the fix in this thread. Basically, I had to add the address to the internal DNS server in the host machine’s Docker config file.
Discourse-doctor calls the rake task (inside the container). There were some changes to the rake task in the past day or so.
I submitted something last summer (?) that added to discourse-setup recommending to run discourse-doctor, they I think was never merged.
It might make sense to have discourse-setup run the rake task after the container gets cranked up. (I now run it routinely after I do an install, though I have to wait for the client to do the dns config before I do.)