Our server has been listed several times on CBL (see this question) because it "attempted to send email without using the HELO/EHLO command".
Grep'ing on HELO
on Exim's logs, I found such suspicious (yet useful !) entries from GMail :
Remote host closed connection in response to HELO (EHLO response was: 501-5.5.4 Empty HELO/EHLO argument not allowed, closing connection.
and whatever email provider or software :
SMTP error from remote mail server after HELO : 501 Syntax: HELO hostname
It seems to me that these errors may be the very reason for which our IP is listed on CBL.
I can't say for the GMail error yet because those messages are not in Exim's queue anymore (I will confirm as soon as I get a new one), but the other message is a bounce email, as I suspected in the other question ("retry timeout exceeded" because of non-existent address).
Now, I couldn't find confirmation online but I guess it's not normal that bounce emails have an empty HELO command, right ? So how do I configure Exim so that they don't ?
NB : I know I could just blackhole such messages, which I'll eventually try if I can't find a better solution, but it doesn't seem like the right approach.
NB2 : For "regular emails" the HELO command is already set as follow, from /etc/exim4/conf.d/main/00_local_settings
:
REMOTE_SMTP_HELO_DATA=$sender_address_domain