Hi every body 🙂 I’m trying to set up a discourse forum, and I already have a working mailcow setup for my domain. Discourse requires an SMTP relay to send out transactional emails, and want to use my mailcow server for this.
What I tried:
The discourse config looks like this
DISCOURSE_SMTP_ADDRESS: mail.example.tld
DISCOURSE_SMTP_PORT: 587
DISCOURSE_SMTP_USER_NAME: noreply@example.tld
DISCOURSE_SMTP_PASSWORD: "password"
where noreply@example.tld is a working account on my mailcow setup with the password “password”, and I’ve successfully sent mail from it before in a client like thunderbird with these credentials.
When discourse tries to send a mail, I get the error Reason: 533 5.7.1 <noreply@example.tld>: Sender address rejected: not owned by user noreply@example.tld
also tried
I’ve also tried sending mail directly with telnet and didn’t succeed, but probably because I’m not familiar with it. Trying to authenticate over starttls like in this thread https://stackoverflow.com/questions/27030605/smtp-starttls-certificate-negotitiation-via-telnet I get a kind of weird reply
openssl s_client -debug -starttls smtp -crlf -connect mail.example.tld:587
HELO myhostname
AUTH LOGIN
>334 VXNlcm5hbWU6
noreply@example.tld (encoded in base64)
>334 UGFzc3dvcmQ6
password (encoded in base 64)
>RENEGOTIATING
>132463048316736:error:1420410A:SSL routines:SSL_renegotiate:wrong ssl version:ssl/ssl_lib.c:2140:
I’m not sure how to tell what the right version of ssl is, nor why it only failed after sending credentials, when earlier it negotiated the certificates just fine.
And if I try without TLS I get what I would have expected
telnet mail.example.tld 25
HELO myhostname
AUTH LOGIN
503 5.5.1 Error: authentication not enabled
I guess I can connect to the smtp relay (and email clients can send mail no problem!), but there’s something I need to configure differently, and I don’t really understand what the right question to ask is. Can any body help?