If the DISCOURSE_HOSTNAME and the DISCOURSE_SMTP_ADDRESS are the same, will this cause issues?
I’ve setup Postfix & Dovecot on the Docker host to accept authenticated requests over TLS. I have valid certificates for my server, but whatever configuration I try, I can’t get Discourse to send mails correctly to Postfix running on the Docker host.
If I use the hostname (discourse.[myhost].com) it doesn’t work (it won’t even connect). If I use the Docker host IP address (172.17.0.1), I get
hostname "172.17.0.1" does not match the server certificate
Clearly, I need to use the FQDN that was used to create the certificates. If I try to set DISCOURSE_SMTP_ENABLE_START_TLS to false then it says I need to issue a start TLS command. I don’t really want to open Postfix up without TLS, so I don’t really see this as a viable option anyways.
Using an external SMTP relay is also not an option because I don’t want to pay more just to ensure emails don’t end up in people’s spam/junk folders.
I’ve got to say, I’ve only have a rudimentary understanding of Docker networking, an even less understanding of setting up a Postfix SMTP server with Dovecot for authentication, but I’m not a complete noob, but getting this setup in a safe/secure way is proving to be extremely difficult.
@maltfield I’ve read you’re article on Open Source Ecology but I don’t want to use unauthenticated over port 25. The university I work for has very strict protocols about using unencrypted, unauthenticated communication (even within a local network setup like this). They are too worried that it could be abused by a disgruntled student.