On an Ubuntu 16.04 VPS, hosted by GoDaddy, I want to be able to send email using my domain name.
I created a mail user noreply@webtest.domain.com
through Vestacp, installed Roundcube and checked that I could receive emails from one of my personal addresses (tried with gmail and hotmail).
However when I want to reply, exim4 fails to send, and gives me a "No route to host" error.
# cat /var/log/exim4/mainlog
exim 4.86_2 daemon started: pid=2310, -q30m, listening for SMTP on port 25 (IPv4) port 587 (IPv4) port 2525 (IPv4) and for SMTPS on port 465 (IPv4)
Start queue run: pid=2311
1iDCy2-00021u-SM H=gmail-smtp-in.l.google.com [172.217.197.27] No route to host
1iDD5o-0000bk-Gt <= noreply@webtest.domain.com U=admin P=local S=795 id=337cb2f63221d64985700e25c2074569@webtest.domain.com
1iDCy2-00021u-SM H=alt1.gmail-smtp-in.l.google.com [64.233.186.27] No route to host
1iDCy2-00021u-SM H=alt2.gmail-smtp-in.l.google.com [74.125.193.27] No route to host
[...]
1iDCy2-00021u-SM == recipient@gmail.com R=dnslookup T=remote_smtp defer (110): Connection timed out
1iDCzB-0002B3-PK ** root@webtest.domain.com: Unrouteable address
1iDCzB-0002B3-PK Frozen (delivery error message)
1iDD8s-0000gq-H3 <= <> R=1iDD8s-0000go-GN U=Debian-exim P=local S=1211
I tried to run tracepath to one of those ip, and I could see that by default it was taking the GoDaddy inner network's interface, and not the one with the Internet IP:
# tracepath 172.217.218.27
1?: [LOCALHOST] pmtu 1500
1: 10.217.15.252 0.262ms
[...]
8: ash-b1-link.telia.net 54.953ms asymm 12
9: no reply
10: no reply
I therefore tried to add the interface directive in /etc/exim4/conf.d/transport/30_exim4-config_remote_smtp
, and rebooted the VPS.
remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain"
driver = smtp
interface = 148.72.xx.xx
But I am still getting the same error. I have no idea where to look now.