-
Notifications
You must be signed in to change notification settings - Fork 256
Description
What happened?
If you are self-hosting and use an email server that enforces RFC 5321 for EHLO messaging being a properly formatted domain, the email cannot be sent. By default, the stoat-api-1 container will send an email with the hostname of the docker container, which is just the container ID. RFC 5321 requires a domain name or IP address, so emails are rejected. Here's a log of the issue occurring from the email server side:
`026-02-22T13:46:09Z TRACE Raw SMTP output sent (smtp.raw-output) listenerId = "smtp", localPort = 25, remoteIp = redacted, remotePort = 57057, size = 43, contents = "220 example.com Lets Talk\r\n"
2026-02-22T13:46:09Z TRACE Raw SMTP input received (smtp.raw-input) listenerId = "smtp", localPort = 25, remoteIp = redacted, remotePort = 47460, size = 19, contents = "EHLO bb5b0be39583\r\n"
2026-02-22T13:46:09Z INFO Invalid EHLO command (smtp.invalid-ehlo) listenerId = "smtp", localPort = 25, remoteIp = redacted, remotePort = 47460, domain = "bb5b0be39583"
2026-02-22T13:46:09Z TRACE Raw SMTP output sent (smtp.raw-output) listenerId = "smtp", localPort = 25, remoteIp = redacted, remotePort = 47460, size = 32, contents = "550 5.5.0 Invalid EHLO domain.\r\n"`
A potential solution is have a variable called domain in [api.smtp] in Revolt.toml or just take the domain from the existing from_address variable. Workarounds can be done by relaying to a server that is more lax in enforcement or using legacy TCP/465 with TLS encryption, but not TCP/587.