VPS21
July 30, 2025, 2:51pm
1
I have installed HestiaCP on a Debian 12 VPS and configured an external SMTP relay. Normal emails are working fine through the relay.
But Auto Reply (Vacation) emails are not sent through the relay . They are sent directly from the server IP.
Because of this, those emails go to the recipient’s spam folder .
SPF, DKIM, and DMARC are correctly set up and passing , so DNS is not the issue.
How can I force auto reply emails to also go through the relay?
Thanks.
Try modifying /etc/exime/exim4.conf.template
, in routers
section modify domains
directive in send_via_unauthenticated_smtp_relay
and send_via_smtp_relay
By default it is domains = !+local_domains
so change it to domains = *
and restart exim4.
Complete example.
Before:
send_via_unauthenticated_smtp_relay:
driver = manualroute
address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
domains = !+local_domains
require_files = SMTP_RELAY_FILE
condition = ${if eq{SMTP_RELAY_USER}{}}
transport = remote_smtp
route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
no_more
no_verify
send_via_smtp_relay:
driver = manualroute
address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
domains = !+local_domains
require_files = SMTP_RELAY_FILE
transport = smtp_relay_smtp
route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
no_more
no_verify
After:
send_via_unauthenticated_smtp_relay:
driver = manualroute
address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
domains = *
require_files = SMTP_RELAY_FILE
condition = ${if eq{SMTP_RELAY_USER}{}}
transport = remote_smtp
route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
no_more
no_verify
send_via_smtp_relay:
driver = manualroute
address_data = SMTP_RELAY_HOST:SMTP_RELAY_PORT
domains = *
require_files = SMTP_RELAY_FILE
transport = smtp_relay_smtp
route_list = * ${extract{1}{:}{$address_data}}::${extract{2}{:}{$address_data}}
no_more
no_verify
I didn’t test it so you should test whether you can send, receive, autoreply, etc. correctly using this change.
1 Like
VPS21
July 30, 2025, 10:27pm
3
Thanks for the suggestion.
I changed the domains
value to *
as you mentioned and restarted Exim, but auto reply emails are still not going through the SMTP relay . They are still being sent directly from the server IP.
Normal emails are working fine through the relay.
If there’s anything else I should try, please let me know. Thanks again!
1 Like
Sorry, I thought that would work. I don’t have any more ideas to solve it but if I think of anything else, I’ll let you know.
1 Like
VPS21
July 30, 2025, 10:46pm
5
No worries at all, I really appreciate you taking the time to help. If you do come across anything else, please let me know. Thanks again!
1 Like