127.0.1.1 and the Bad HELO

on

Vanaf een van de servers moesten mails verstuurd kunnen worden. Dus exim4 geinstalleerd en een quick-configuratie uitgevoerd met

sudo dpkg-reconfigure exim4-config

Klaar dacht ik. Appeltje eitje. Dat heb ik al vaker gedaan…. Maar uiteraard deze keer niet dus.

Alle mailpogingen

mail -s “test” knilluz(aapenstaartje)buurnet(punt)nl[ENTER]
bladiedla[ENTER]
CTRL-D

resulteerden in een directe bounce van het verstuurde mailtje:

SMTP error from remote mail server after RCPT TO:<knilluz[apenstaart]buurnet[punt]nl>:
host mxb.mail.widexs.nl [123.456.789.123]: 550-Bad HELO:
A HELO should be a FQDN or address literal – Please see RFC 2821 550 section 4.1.1.1

YOU HAVE A BAD HELO.

Dankzij Debian and the Gnomes. Waar het in dit geval fout ging was bij de vertaling van het lokale domeinnaam naar een ipadres. Hierover zijn al pagina’s volgeschreven, hoe dit op een behoorlijk foute manier is opgelost bij Debian (en dus Ubuntu).  En ik citeer daarom nu alleen maar even uit de debian reference paragraaf 10.4. Lees en huiver:

Hosts are referred to by domain name as well as by IP address. DNS is a client-server system in which name resolvers consult nameservers in order to associate domain names with IP addresses and other properties of hosts. The GNU C Library resolver(3) can also look up IP addresses in files or consult Network Information Services (NIS).

Some software (e.g., GNOME) expects the system hostname to be resolvable to an IP address with a canonical fully qualified domain name. This is really improper because system hostnames and domain names are two very different things; but there you have it. In order to support that software, it is necessary to ensure that the system hostname can be resolved. Most often this is done by putting a line in /etc/hosts containing some IP address and the system hostname. If your system has a permanent IP address then use that; otherwise use the address 127.0.1.1.

127.0.0.1 localhost
127.0.1.1 uranus

To see whether your system hostname can be resolved to an IP address with a fully qualified domain name, use the hostname –fqdn command.

De beslissing om dit op deze manier uit te voeren is een ‘bad hack’, bij andere distributies is deze regel niet opgenomen in de /etc/hosts file.

De oplossing voor ons mailprobleem was hier dus heel simpel verwijder die 127.0.1.1 regel en vervang deze door het ‘echte’ domein: [het echte ipadres] [full domainname: xxx.yyy.nl] [other aliasses].

bronnen: 1 2 3