[SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

[SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-21 15:43

I have an issue since upgrading ASSP to the latest version. I have been on the ASSP forum but need some help here.

ASSP is now generating hundreds of rejections with the message:

[SMTP Error] 501 Syntax: helo needs hostname

I actually got some complaints that valid mail was being rejected (gmail?).

In ASSP there is a section for validating HELO but that is all turned off.

The feedback from the ASSP forum has been that it is actually a valid message meaning that someone is connecting with a blank hostname and it is actually hMS that is doing the rejection.

The problem is that I am not seeing the rejection in the hMS log even though I have Application/SMTP/TCP-IP/Debug ticked for hMS logging.

My sample log entries are:

hMS log shows just:

"DEBUG" 1520 "2012-12-17 00:05:00.103" "Creating session 20437"
"SMTPD" 1520 20437 "2012-12-17 00:05:00.103" "10.27.27.35" "SENT: 220 DesserGroup.com"
"DEBUG" 1520 "2012-12-17 00:05:00.213" "Ending session 20437"

while ASSP log shows

Dec-17-12 00:05:00 Connected: 173.9.62.249:1664 -> 10.27.27.35:25 (listenPort) -> 10.27.27.35:4128 > 10.27.27.35:125;
Dec-17-12 00:05:00 173.9.62.249 [SMTP Error] 501 Syntax: helo needs hostname;
Dec-17-12 00:05:00 173.9.62.249 disconnected (0 seconds);

My sample was countered with a different hMS log sample

"SMTPD" 4388 5 "2012-12-21 08:02:47.157" "10.69.5.95" "RECEIVED: ehlo"
"SMTPD" 4388 5 "2012-12-21 08:02:47.376" "10.69.5.95" "SENT: 501 EHLO Invalid domain address."
"SMTPD" 4388 5 "2012-12-21 08:02:53.939" "10.69.5.95" "RECEIVED: QUIT"
"SMTPD" 4388 5 "2012-12-21 08:02:54.173" "10.69.5.95" "SENT: 221 goodbye"

Why am I not seeing these log entries in my log?

My reaction is that this is in fact an error generated by ASSP but I just want to check here.

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-21 17:00

Is there a setting in hMS server that controls the checking of the HELO command?

User avatar
mattg
Moderator
Moderator
Posts: 20104
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by mattg » 2012-12-22 03:41

It is local host name in SMTP settings >> Delivery of email

Try mail.dessergroup.com and see what happens
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by dzekas » 2012-12-22 07:59

LesD wrote:Is there a setting in hMS server that controls the checking of the HELO command?
It is not about checking helo or ehlo commands.

It is about some email client issuing broken command on smtp server. ehlo and helo commands require at least one parameter. HELO checks kick in later and they check value provided in that parameter. There is no such thing as "allow ehlo/helo without hostname argument". It would be direct violation of email protocol.

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-22 19:38

mattg wrote:It is local host name in SMTP settings >> Delivery of email

Try mail.dessergroup.com and see what happens
What change in behaviour would you expect to see after that change?

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-22 19:55

dzekas wrote:It is about some email client issuing broken command on smtp server. ehlo and helo commands require at least one parameter. HELO checks kick in later and they check value provided in that parameter. There is no such thing as "allow ehlo/helo without hostname argument". It would be direct violation of email protocol.
Understood. That matches with what I was told on the ASSP forum.

What is confusing me is that I am currently getting about 300 such error messages a day. I only keep a weeks worth of logs but I have found a bunch of old logs going back to March and neither ASSP nor hMS were reporting a single 501 error. Since upgrading ASSP I have noticed this error and not a day goes by without several hundred.

I am no longer getting any complaints about bounces so I have to put this down to either a recent surge of broken spammers or a change in ASSP function where before it was silently (or with a different message) dropping such connections.

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-23 21:56

I have been told on the ASSP forum that "There is no code in ASSP that can produce a '501 reply'" so these error messages are coming, quite correctly, from hMS.

I would just like to understand one thing and that is why this error does not appear in the hMS log. Rather I am seeing an 'echo' of the response in the ASSP log.

Nothing to loose any sleep over but I am keen to understand what exactly is going on.

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by random » 2012-12-23 22:03

LesD wrote:What is confusing me is that I am currently getting about 300 such error messages a day.
I think this discussion may interest you.
http://www.hmailserver.com/forum/viewtopic.php?p=144294
No solution, but you are not the only one.

lg
random

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-23 22:59

Thank you. There was one clue there indicating that possibly logging has changed in 5.4

What are the risks in installing 5.4 in place of 5.3.2 for a lightly loaded system? I am tempted to do so.

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by random » 2012-12-24 11:14

LesD wrote:Thank you. There was one clue there indicating that possibly logging has changed in 5.4
I am running 5.4 and getting the same messages.
LesD wrote:What are the risks in installing 5.4 in place of 5.3.2 for a lightly loaded system? I am tempted to do so.
Personally I think that 5.4 build 1944 is running fine. Far better than it's "beta status" would tell. Maybe there are some more opinions on that beta.
But I would recommend updating to 5.3.3 first.
And it will not help to get rid of these messages.

lg
random

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-24 15:03

I took the plunge and installed 5.4. All seems to be working fine. logging situation is still the same.

Could you let me see a sample of the hMS log? Do you have ASSP as a front-end?

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by random » 2012-12-24 21:08

LesD wrote:Could you let me see a sample of the hMS log?
Of course. It looks like that:
"SMTPD" vvvv aaa "date time" "x.x.x.x" "SENT: 220 mydomain.local"
"SMTPD" xxxx aaa "date time" "x.x.x.x" "RECEIVED: EHLO "
"SMTPD" xxxx aaa "date time" "x.x.x.x" "SENT: 501 EHLO Invalid domain address."
"SMTPD" yyyy aaa "date time" "x.x.x.x" "RECEIVED: HELO "
"SMTPD" yyyy aaa "date time" "x.x.x.x" "SENT: 501 HELO Invalid domain address."
"SMTPD" zzzz aaa "date time" "x.x.x.x" "RECEIVED: QUIT"
"SMTPD" zzzz aaa "date time" "x.x.x.x" "SENT: 221 goodbye"
I get it less frequently. About ten times a day.
LesD wrote:Do you have ASSP as a front-end?
No. I did use it. But hMailServer offers very good anti-spam protection out-of-the-box:
http://www.hmailserver.com/documentatio ... am_methods
Plus hMailServer offers a very easy way to integrate spamassassin.

lg
random

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-24 21:58

Now let me show you what is confusing me:

My hMS log just shows

"SMTPD" 1520 20437 "2012-12-17 00:05:00.103" "10.27.27.35" "SENT: 220 DesserGroup.com"

while my ASSP log shows

Dec-17-12 00:05:00 Connected: 173.9.62.249:1664 -> 10.27.27.35:25 (listenPort) -> 10.27.27.35:4128 > 10.27.27.35:125;
Dec-17-12 00:05:00 173.9.62.249 [SMTP Error] 501 Syntax: helo needs hostname;
Dec-17-12 00:05:00 173.9.62.249 disconnected (0 seconds);

To me this looks like ASSP is issuing the error while a Site Admin on the ASSP forum assures me that ASSP is only echoing what hMS is issuing as ASSP does not have code to make this test.

If indeed hMS is issuing the error then why is it not logging the exchange as per your log. Also the text of the error messages are different.

As it is a site admin at ASSP who is writing I can't take any further issue with him. I am confused. Can anyone clarify what is going on?

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by random » 2012-12-24 23:14

LesD wrote:My hMS log just shows

"SMTPD" 1520 20437 "2012-12-17 00:05:00.103" "10.27.27.35" "SENT: 220 DesserGroup.com"

while my ASSP log shows

Dec-17-12 00:05:00 Connected: 173.9.62.249:1664 -> 10.27.27.35:25 (listenPort) -> 10.27.27.35:4128 > 10.27.27.35:125;
Dec-17-12 00:05:00 173.9.62.249 [SMTP Error] 501 Syntax: helo needs hostname;
Dec-17-12 00:05:00 173.9.62.249 disconnected (0 seconds);
The hMailServer logs should indicate that the connection was interrupted or closed or canceled or something like that, too. Plz check.
Did you acitvate all logging, including debug?
LesD wrote:To me this looks like ASSP is issuing the error while a Site Admin on the ASSP forum assures me that ASSP is only echoing what hMS is issuing as ASSP does not have code to make this test.
I am neither in the position nor qualified to mediate in this matter.
Maybe you try to show that to the site admin and try to convince her/him:
http://comments.gmane.org/gmane.mail.sp ... test/14447
And I do think that ASSP reacts adequately. I would expect this behavior.

Just out of curiosity: Why does it matter to you if ASSP or hMailServer rejects the HELO/EHLO? The use of HELO and EHLO without hostname is in violation of the SMTP protocol and IMHO must be rejected by any proper mail server or proxy.

lg
random

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by LesD » 2012-12-25 00:37

Yes I do have full logging on, even Debug, though I cut out the debug logs from the post.

I agree that the rejection of the connection is correct. I am just trying to understand what is actually going on by reading the logs. My understanding of the logs is that ASSP is doing the rejection (as there is no rejection in the hMS log) while I am being told categorically that ASSP cannot do the rejection.

So this long conversation is just to try and clarify my understanding. The processing of mail traffic is fine either way, as you say.

random
Normal user
Normal user
Posts: 108
Joined: 2006-07-16 09:51
Location: Germany

Re: [SMTP Error] 501 Syntax: helo needs hostname (V 5.3.2)

Post by random » 2012-12-25 09:20

LesD wrote:My understanding of the logs is that ASSP is doing the rejection (as there is no rejection in the hMS log) while I am being told categorically that ASSP cannot do the rejection.
This is my opinion, too.
The link I posted in my last posting IMHO confirms your opinion.

If you need proof it would be fairly easy to do so: Set up a test installation. Use two ASSP in a chain and use telnet to submit EHLO or HELO without hostname. If only the first ASSP log shows the 501-error, you got your proof.

lg
random

Post Reply