Has anyone used Apache James as an SMTP server for self-hosted Discourse?

AI-generated summary

Ethsim2 discusses moving away from Mailgun due to recurring SMTP errors, including recipient and daily request limit violations and authentication failures, as well as account probation with a 100 messages/hour cap. They are exploring alternatives like Azure Communication Services (noting its upcoming retirement in 2028) and specifically asking about using Apache James as a self-hosted outbound SMTP server for Discourse. Ethsim2 seeks insights on SMTP compatibility, reliability, queue management, maintenance burden, deliverability, and how Discourse handles temporary SMTP failures.

merefield responds by highlighting that the primary challenge in self-hosting outbound email is not the technical operation of the SMTP server, but rather establishing and maintaining a sender reputation. They explain that even with proper DNS configurations (SPF, DKIM, DMARC, reverse DNS), a new VPS IP address often lacks the trust required by other mail servers, leading to rejection, throttling, or spam folder placement. Merefield argues that a significant value of managed SMTP providers is their reputation management capabilities. Consequently, they recommend switching to a different managed provider rather than taking on the substantial administrative burden of building and maintaining a self-hosted email server’s reputation.

I currently use Mailgun as the outbound SMTP provider for my self-hosted Discourse installation, which runs on an externally hosted Ubuntu VPS.

Recently, I have been experiencing recurring SMTP errors, including:

421 Domain is not allowed to send: recipient limit (26) exceeded
421 Domain is not allowed to send: daily request limit (100) exceeded
535 Authentication failed

Mailgun has also sent notifications confirming that my account is on probation and that my domains are limited to 100 messages per hour.

I have been exploring alternative SMTP arrangements, including Azure Communication Services Email. However, Microsoft has announced that its standalone Email service will be retired on 30 September 2028.

Another possibility I have come across is Apache James:

Has anyone here had experience using Apache James as an SMTP server for a self-hosted Discourse installation?

I would be particularly interested in:

  • SMTP compatibility with Discourse.
  • Reliability and message queue management.
  • Maintenance requirements compared with managed SMTP providers.
  • Email deliverability and sender reputation.
  • How Discourse handles temporary SMTP failures and subsequent retries.

I already use the standard Discourse mail-receiver container for incoming email, so my main interest is outbound transactional email.

Many thanks.

The challenge with self-hosting outbound email isn’t so much running an SMTP server as establishing and maintaining a reputation.

You cannot simply spin up a mail server on a VPS and expect other mail servers to trust it. Even with correctly configured SPF, DKIM, DMARC and reverse DNS, an IP address with no established sending reputation may find its emails rejected, throttled or consigned to spam.

A significant part of what you’re paying a managed SMTP provider for is reputation management, not the SMTP infrastructure itself.

I’d be inclined to change providers rather than inherit that administrative burden.