Yunohost + Discourse: SMTP Woes
Are you self-hosting? Did you install Discourse? Does your ISP block port 25? Well. Here’s what you do if you’re using Yunohost for your server.
As a tech enthusiast, I recently tried doing just that. One challenge I faced was configuring SMTP email settings, which wasn’t documented well. After some experimentation, I found a solution and want to share it with other Yunohost users.
To configure SMTP in Discourse, locate the discourse.conf file at /var/www/discourse/config/discourse.conf. Update the SMTP settings, save, and restart Discourse using “systemctl restart discourse.” For example:
nano /var/www/discourse/config/discourse.conf
systemctl restart discourse
If you’re using Office365, follow these steps to set up SMTP:
- Add your forum’s URL to Microsoft admin settings.
- Create an inbox using the subdomain.
- Assign an Exchange Online (Plan 1) license to the mailbox.
- Enable “Authenticated SMTP” in Azure portal.
- Disable MFA on the mailbox.
- Configure Discourse to use your Office365 mailbox with the following settings:
hostname = "forum.yourlinks.com"
smtp_address = smtp.office365.com
smtp_port = 587
smtp_domain = forum.yourlinks.com
smtp_user_name = noreply@forum.yourlinks.com
smtp_password = YourLinksPassWordHere
smtp_authentication = login
smtp_enable_start_tls = true
smtp_openssl_verify_mode =
smtp_force_tls = false
With these tips, you should be able to configure SMTP in Discourse on Yunohost without the struggles I faced.