1

Topic: Helo command rejected: Host not found

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MARIADB edition.
- Linux/BSD distribution name and version: CentOS7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?  Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello, my clients have not been receiving their emails from a specific domain in Louisiana.  I called and spoke to their IT office and it seems as though everything is correct on their end.  Through troubleshooting, it would seem that a spam feature of iRedMail is blocking the emails from coming in.  Here's the error message:

Mar 27 21:14:30 mail postfix/smtpd[27340]: NOQUEUE: reject: RCPT from mail.<redacted>.la.us[IP-address]: 450 4.7.1 <Spamcop.<redacted>.la.us>: Helo command rejected: Host not found; from=<from@<redacted>.la.us> to=<info@<redacted>.com> proto=ESMTP helo=<Spamcop.<redacted>.la.us>

I thought it might be a rejection message based on postfix configuration "smtpd_relay_restriction" but I didin't find that in main.cf (this came from a google search).

The 'Host not found' part confuses me because I can send emails to them.  I am also able to telnet into their mail.<redacted>.la.us address and send a successful HELO message.

Is there a feature in iRedMail that is causing this rejection, and how can I manually manipulate that feature?

thanks for your help.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2 (edited by usafitz 2018-03-28 08:24:40)

Re: Helo command rejected: Host not found

The only fix I've found thus far is to add into the main.cf and /opt/iredmail/settigns.py:

mynetworks = 127.0.0.1 [::1] xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx and so on....

If I add the IP address of where's it's coming from and restart the server, it lets the emails through.  But there has to be a better way, right?  Interestingly enough, adding the same IP addresses to the whitelist of the server didn't do anything.

3

Re: Helo command rejected: Host not found

What is the actual HELO command?

4

Re: Helo command rejected: Host not found

it was

HELO url.com 25

here's the interaction:
220-mail.<redacted>.com ESMTP Postfix
HELO <redacted>.com
250 mail.<redacted>.com
quit
221 2.0.0 Bye
Connection closed by foreign host.

5

Re: Helo command rejected: Host not found

Does "url.com" exist?

Are you getting this from the logs on your mail server, or are you telnetting into their mail server?

6 (edited by usafitz 2018-03-28 08:49:03)

Re: Helo command rejected: Host not found

Their mail server gives the same respnse to HELO:

[user@ip ~]$ telnet mail.<redacted>.la.us 25
Trying ip...
Connected to mail.<redacted>.la.us.
Escape character is '^]'.
220 Spamcop.<redacted>.la.us ESMTP (e5f132fcb7277ffb4e9ad47c002b6180)
HELO <redacted>.com
250 Spamcop.<redacted>.la.us Hello <redacted> [<ip addr>], pleased to meet you
quite
221 Spamcop.<redacted>.la.us Goodbye <redacted>, closing connection
Connection closed by foreign host.

7

Re: Helo command rejected: Host not found

Sorry, maybe I'm misunderstanding. Don't mean to waste your time.

Here's a log line from a recent email to me:

Mar 28 00:37:26 nc027 postfix/smtpd[2601]: NOQUEUE: reject: RCPT from unknown[46.252.162.3]: 450 4.1.8 <info@undpp.com>: Sender address rejected: Domain not found; from=<info@undpp.com> to=<ME@MYDOMAIN.COM> proto=ESMTP helo=<tk-kaspi.ru>

So the sending mail server is issuing

HELO tk-kaspi.ru

. In this case tk-kaspi.ru exists, but I'm wondering if the "url.com" in the

HELO url.com

that the sending mail server is issuing in your case exists. Is there an A, AAAA, or CNAME record for "url.com"?

8

Re: Helo command rejected: Host not found

Yep there are records for the email server that is's coming from.  the HELO message was legit from them in the log files as well.

9

Re: Helo command rejected: Host not found

What's the output of

dig url.com a

done from your mail server?

10

Re: Helo command rejected: Host not found

dig gives me their legitimate A records for url.com.  I'm not going to list the IP address here, but it's fine

11

Re: Helo command rejected: Host not found

OK, then I've run out of ideas. Sorry.

12

Re: Helo command rejected: Host not found

no worries

13

Re: Helo command rejected: Host not found

usafitz wrote:

NOQUEUE: reject: RCPT from mail.<redacted>.la.us[IP-address]: 450 4.7.1 <Spamcop.<redacted>.la.us>: Helo command rejected: Host not found;

FYI:https://forum.iredmail.org/post56041.html#p56041

craig wrote:

NOQUEUE: reject: RCPT from unknown[46.252.162.3]: 450 4.1.8 <info@undpp.com>: Sender address rejected: Domain not found;

> tk-kaspi.ru
Server:         8.8.4.4
Address:        8.8.4.4#53

Non-authoritative answer:
Name:   tk-kaspi.ru
Address: 46.252.162.3
> undpp.com
Server:         8.8.4.4
Address:        8.8.4.4#53

** server can't find undpp.com: NXDOMAIN

undpp.com  > ** server can't find undpp.com: NXDOMAIN

"450 4.7.1"  "450 4.1.8"  there is different.

14

Re: Helo command rejected: Host not found

Thanks, rain6966. I'm sure usafitz will find the first part of your post useful. The second part was unnecessary though; I was just posting a random example log line to illustrate a clarification question I was asking usafitz, not looking for help. It's unrelated to the original post.

15

Re: Helo command rejected: Host not found

I took a look at that post from 2009 and it looks like the changes have already been implemented in the main.cf file.  The only other thing I can do is go ahead and comment out #reject_unknown_helo_hostname but I don't know if that's a good strategy due to spam.  Thoughts?

16

Re: Helo command rejected: Host not found

According to that same thread, the last poster stated, "Apparently lots of 'big organizations' have unresolvable domains in their helo hostname." We reject invalid HELOs, but your mileage may vary. Hopefully the other parts of your anti-spam system will make up for not rejecting based on invalid HELOs.

17

Re: Helo command rejected: Host not found

Good thought!  I may give it a try and take a chance... might take some time got get data, but I'll post if it turned out to be a good move.  Thanks again Craig.

18

Re: Helo command rejected: Host not found

Welcome.

On that comment about "big organisations", I have actually educated a few banks using Exchange about using "domain.local". Cleaning up the world one bank at a time. smile

19

Re: Helo command rejected: Host not found

Ha, it seems like that's what I'm doing with this city in La.  I've been helping them troubleshoot their systems because I believe that their servers are not getting a good resolution with that helo message.  On a related note, do you know what would cause the following protocol error?

NOQUEUE: reject: RCPT from [<redacted>]:14077: 550 5.5.1 Protocol error; from=<jay@<redacted>.us>

20

Re: Helo command rejected: Host not found

usafitz wrote:

NOQUEUE: reject: RCPT from [<redacted>]:14077: 550 5.5.1 Protocol error; from=<jay@<redacted>.us>

Seems like the sending server is broken and not using SMTP properly, which means it's probably a spammer. If the sender is a real and legitimate sender, he/she should probably complain to his/her mail host, not you. Otherwise it's probably not something to be concerned about.

21

Re: Helo command rejected: Host not found

craig wrote:
usafitz wrote:

NOQUEUE: reject: RCPT from [<redacted>]:14077: 550 5.5.1 Protocol error; from=<jay@<redacted>.us>

Seems like the sending server is broken and not using SMTP properly, which means it's probably a spammer. If the sender is a real and legitimate sender, he/she should probably complain to his/her mail host, not you. Otherwise it's probably not something to be concerned about.

Agree. It's more like a spammer.

22

Re: Helo command rejected: Host not found

Perfect, that's what I thought.  Thank you everyone for verifying this.