I searched and found some posts about this without any real solution.
Basically, I have smtp relay set up globally and (after that didn’t work) on the mail domain directly:
find -L /etc -name "smtp_relay*" -print0 | xargs -0 -I {} sh -c 'echo "{}"; grep -E "^(host|port)" {}; echo'
/etc/exim4/smtp_relay.conf
host:[the.relay.host]
port:2525
/etc/exim4/domains/[themaildomain].com/smtp_relay.conf
host:[the.relay.host]
port:2525
Mail sent by HestiaCP directly (notification emails) or from roundcube work appropriately:
R=send_via_unauthenticated_smtp_relay T=remote_smtp H=the.relay.host [xx.xx.xx.xx] C="250 Queued (1.141 seconds)"
However, if I set a mail account to forward, it doesn’t use the smtp relay:
R=dnslookup T=remote_forwarded_smtp defer (110): Connection timed out H=destination.email.server [xx.xx.xx.xx]: SMTP timeout after initial connection
I imagine this is easy to fix, but I don’t know enough about exim or hestia’s setup with exim to try and muddle a fix on my own…
I’m kinda amazed there was no response to this, as it seems like a pretty big issue if you run into it.
That said, for people looking for an answer in the future… I cannot help you, as I instead made my provider open port 25 instead.
Even though that (generally) won’t work for most people due to either their provider not allowing it or IP reputation issues, in this case for my specific use case it’s all I need so I didn’t bother trying to fix the actual smtp relaying issue.
Good luck!
(and if you fix it, maybe leave a message so others can know how)
I am here in end of November of 2025 and still facing this issue, maybe I am the wrong. I switch my VPS to DigitalOcean droplet, port 25 is blocked and noway to open is, so I find a email provider. It is Mailtrap. I would work well, I setup Global SMTP Relay for it, but with email forwarding it is not working. I doesn’t use global SMTP relay as I can see.
I tried to solve it with Claude, solution I got causes error after exim4 restart. ChatGPT gives other solution, Gemini gives a third version, so…