ferdium / ferdium-server

The server component that can either be self-hosted or hosted for general purpose - for use with the ferdium thick client.
MIT License
163 stars 41 forks source link

Fix SMTP connection issue by removing incorrect HELO command #105

Open mazzz1y opened 6 months ago

mazzz1y commented 6 months ago

The Ferdium server is unable to send emails over SMTP on servers that strictly check the HELO message:

Couldn't send mail: Error: Can't send mail - all recipients were rejected: 501 5.5.2 <https://ferdium.example.com>: Helo command rejected: Invalid name

This issue happens because the APP_URL, used as the HELO name, includes the protocol (https://), which should not be part of a HELO message. The HELO command requires a proper domain name without the protocol.

Given that the Ferdium server acts as a sending client and the exact content of the HELO message is not critical (as long as it looks like a domain), we can address this by removing the smtp/name from the SMTP configuration and using the default value.