This one falls into the “things I need to make a note of in case I hit the same issue again in the future” category.
Just before Christmas I was trying to do some funky stuff with Exim on Debian and, in the process of trying to achieve my goal, I did an
apt-get upgrade to make sure I had the latest version, just in case that fixed the problem.
Unfortunately, it didn’t. Furthermore, all locally originating outbound emails started failing with an error similar to this one:
root@etc_mailname: Unrouteable address.
Most solutions on the web will advise you to make sure that
/etc/hostname both contain the FQDN of the host in question. However, you also need to ensure that the FQDN exists in
/etc/mailname in TWO places, as per the snippet below:
127.0.0.1 localhost localhost.localdomain yourhostname.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback yourhostname.com fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
The key point above is making sure that the FQDN is defined not only for the IPv4 version of localhost but also the IPv6 version of localhost.