I’ve been using Stalwart-mail with discourse exclusively for the past months, and it works like a charm. I can now use both Submission (port 587 with STARTTLS) and Submissions (port 465 with TLS). No special configuration or setup involved.
Careful though, setting up a domain DNS records is a two-step process.
- First, you add a domain name in the Directory. This gives you resource records to add in your DNS zone file.
- Once your DNS is updated, you create a TLS provider for that domain. You should add the following hostnames:
mail,autoconfig,autodiscover, andmta-tls(with your domain appended, e.g.,mail.example.org).[1] - After a period (seconds to minutes), the internal ACME provider will pick up the changes and obtain TLS certificates. At this point, the domain configuration will have updated the records: pick the
_mta-tlsRR with the new id, and all the_tlsarecords, add them to your zone file, and your good to go.
Stalwart-mail now comes with very powerful spam filter and integrated fail2ban functionality (banning IP addresses that failed authentication or requested bogus URIs).
note that for a minimal Stalwart-mail + Discourse setup, you probably don´t need
autoconfignorautodiscoversince those are useful with IMAP clients. ↩︎