How to fix "501 HELO Syntactically Invalid Argument"?

I use Exim on both the sending and the relay nodes, it seems that the sending host offers:

HELO foo_bar.example.com 

Answer:

 501 Syntactically invalid HELO argument(s) 
+4
source share
6 answers

Perhaps a problem with underscores in the host name? http://www.exim.org/lurker/message/20041124.113314.c44c83b2.en.html

+6
source

Underscores are not actually valid in Internet host names, although some people use them anyway. A malicious DNS server should not allow you to have entries for them.

Change the system host name to be valid, hopefully this will fix it.

+1
source

After spending so many hours trying to fix this problem, which in my case just came from nothing, I got a solution. In my case, only systems deployed on Suse OS suddenly stopped sending emails, but not the same ones on Ubuntu. After exhausting and eliminating all the proposed features of this problem, and even taking into account the change in the OS of these machines, I found out that somehow the email sending service is reasonable for the host name of the host machine. On Ubuntu machines, the / etc / hosts file has only the following line:

127.0.0.1 localhost

and there were Suse machines that stopped sending emails. After editing / etc / hosts from Suse machines to

127.0.0.1 localhost proplad

where proplad is the host name of the machine, the errors disappeared. It appears that some security policies (possibly from the smtp service) use the host information provided through the API, which is ignored for Ubuntu machines, but not for Suse machines. Hope this helps others by avoiding massive hours of research on the Internet.

+1
source

Diago's answer helped me solve the problem I was trying to figure out.

Our Suse OS also stopped working out of nowhere. Tried all the suggestions I found here and on Google. Nothing succeeded. I tried to add our domain to etc / hosts, but this did not help.

Received server host name with hostname command. Added that the hostname for the etc / hosts file is the same as Digao suggested.

 127.0.0.1 localhost susetest 

I saved the changes and then started postfix stop, postfix start. And now it works like a charm.

+1
source

The HELO argument must be a host name or IP address. foo_bar.example.com is neither an IP address nor a host name (underscores are not valid in host names), so the error message is correct and there is nothing to fix.

0
source

Using qmail, I ran into this problem. I realized that this was due to a previously incomplete installation.

1) When sending a letter, qmail announces itself on other SMTP servers using "HELO ...", and then adds what is in the file: /var/qmail/control/me

(sometimes the file is located in /var/qmail/control/helohost )

2) This file must contain a host name with a valid DNS record.

I didn’t have (none) , so letters were not sent.

0
source

Source: https://habr.com/ru/post/1276822/


All Articles