Hi everybody,
I’m having trouble configuring my mail server on Discourse.
I’m running my own SMTP server with OpenSMTPD. It works, I’m using it successfully with my Gitea and my Nextcloud.
Discourse doesn’t seem to like it though. When I try to register my admin account I don’t receive the confirmation mail.
The log in shared/standalone/log/rails/production.log
says for each mail:
Sent mail to [my mail address] (64.9ms)
Job exception: Cannot assign requested address - connect(2) for "[my mail server]" port 587
My mail server never gets any connections according to its logs.
These are the mail settings from my app.yml
:
DISCOURSE_SMTP_ADDRESS: [my mail server]
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: [my mail server user]
DISCOURSE_SMTP_PASSWORD: "[my password]"
#DISCOURSE_SMTP_ENABLE_START_TLS: true # (optional, default true)
Again, the exact same settings (same user, same address, same password, same port, also STARTTLS) are working in my Gitea and my Nextcloud without problems.
I already tried:
- Putting the password in single quotes instead of double quotes
- Setting TLS to false
- Setting a custom from-mail at the end of
app.yml
(though this probably isn’t the problem as my NC/Gitea usenoreply@subdomain.domain.tld
as addresses just like Discourse does and it works) - Searching for the error message in the Discourse log, but I didn’t find anything.
- For the record, I ran
launcher rebuild app
after each change. -
telnet [my mail server]
connects just fine.
I’m running Discourse on my home server, the SMTP server is on my VPS (both run Arch Linux).
Anybody have any ideas what could be going wrong?