LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-12-2017, 02:06 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Rep: Reputation: 177Reputation: 177
Sendmail: Helo command rejected: Host not found


I'm having a problem sending to a particular recipient. My messages get reject with the error:
Code:
Jul 12 14:50:49 mail sm-mta[25572]: v6BMdEdB023525: to=<dovecot@dovecot.org>, ctladdr=<mfoley@mail.hprs.local> (1000/100), delay=20:11:35, xdelay=00:00:00, mailer=esmtp, pri=4548076, relay=dovecot.org. [94.237.25.159], dsn=4.7.1, stat=Deferred: 450 4.7.1 <mail.hprs.local>: Helo command rejected: Host not found
I tried sending this message manually using a `telnet smtp` session. I entered "HELO mail.hprs.local" and after I entered "RCPT to: dovecot@dovecot.org" I go the "Helo command rejected: Host not found" message.

When I did the same thing using "HELO mail.ohprs.org" I didn't get that error and my message apparently sent OK.

Now, mail.hprs.local is the actual local host and domain name of this computer. mail.ohprs.org is the public domain name. It seems to me that the recipient server is rejecting the message because it can't find mail.hprs.local -- which of course it wouldn't.

How can I get the public FDQN into my mail dialog? In my sendmail.rc file I have:

MASQUERADE_AS(`ohprs.org')dnl
MASQUERADE_DOMAIN(`ohprs.org')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`always_add_domain')dnl

but that obviously isn't getting the job done.

Suggestions?
 
Old 07-12-2017, 07:45 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Not familiar with sendmail...I use another MTA. But, generally speaking, you probably don't want to try to fool foreign servers into thinking you're some other domain/server, and maybe you can't.

Configure your server to use the other server to send your mail instead. Maybe someone who knows sendmail will provide help on how to do that. Looks doable to me in web searches, but the responses are all Greek to me...

This thread may help, too.
 
Old 07-12-2017, 09:44 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
I'm not using an 'other server'. mail.hprs.local is the mail server's local Active Directory FDQN. I.e. local LAN. mail.ohprs.org is the public FDQN and is what has the SSL Certificate. I need external mail servers to see mail.ohprs.org, not mail.hprs.local. I've set ohprs.org as the domain in MASQUERADE_AS, but that doesn't appear to be working.

Yes, I'll need some sendmail expertise on this.
 
Old 07-12-2017, 09:56 PM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 2,150

Rep: Reputation: 449Reputation: 449Reputation: 449Reputation: 449Reputation: 449
Have you bump to this link: https://www.cyberciti.biz/tips/sendm...ion-howto.html

and this link also: https://www.bonusbits.com/wiki/HowTo...n_Masquerading

Good luck!
 
Old 07-13-2017, 10:22 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,555

Original Poster
Rep: Reputation: 177Reputation: 177
I've used some of those settings in JJJCR's links. Still having problems. I've set:
Code:
define(`confHELO_NAME', `mail.ohprs.org')dnl
MASQUERADE_AS(`ohprs.org')dnl
MASQUERADE_DOMAIN(`ohprs.org')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`always_add_domain')dnl
dnl#EXPOSED_USER(`root')dnl
An I still get:
Code:
   ----- The following addresses had permanent fatal errors -----
<rover@novatec-inc.com>
    (reason: 553 5.1.8 <rover@novatec-inc.com>... Domain of sender address root@mail.hprs.local does not exist)
and on the target server maillog:
Code:
Jul 13 11:15:50 server sm-mta[32690]: STARTTLS=server, relay=mail.ohprs.org [98.102.63.107], version=TLSv1.2, verify=FAIL, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
Jul 13 11:15:50 server sm-mta[32690]: v6DFFoFL032690: ruleset=check_rcpt, arg1=<rover@novatec-inc.com>, relay=mail.ohprs.org [98.102.63.107], reject=553 5.1.8 <rover@novatec-inc.com>... Domain of sender address root@mail.hprs.local does not exist
Jul 13 11:15:50 server sm-mta[32690]: v6DFFoFL032690: from=<root@mail.hprs.local>, size=20282, class=0, nrcpts=0, proto=ESMTPS, daemon=MTA, relay=mail.ohprs.org [98.102.63.107]
This message was sent from root. I can send the message from a non-root user, or from root using mailx if I specify -r sender.

Other ideas?

Last edited by mfoley; 07-13-2017 at 10:48 AM.
 
Old 07-13-2017, 01:02 PM   #6
Laserbeak
Member
 
Registered: Jan 2017
Location: Manhattan, NYC NY
Distribution: Mac OS X, iOS, Solaris
Posts: 508

Rep: Reputation: 143Reputation: 143
Your sendmail is set up to check the domain of the sender's e-mail through DNS or whatever name lookup software you have.

This is a good thing, otherwise spammers would be using your mail server to send out spam.

If you really want to send e-mail from <mfoley@mail.hprs.local> can you try add mail.hprs.local to the /etc/hosts file of the sendmail server? So you'd add a line to /etc/hosts:

Code:
127.0.0.1   mail.hprs.local
replacing 127.0.0.1 with your IP address.

or, if they are the same machine, you can have both lines.

Last edited by Laserbeak; 07-14-2017 at 03:17 AM.
 
Old 07-14-2017, 02:23 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
This message was sent from root. I can send the message from a non-root user, or from root using mailx if I specify -r sender
Looks like root is still EXPOSED. Check sendmail.cf for "C{E}root" and comment it out.

You can also add:
Code:
MASQUERADE_DOMAIN(mail.hprs.local)dnl
in sendmail.mc, rebuild sendmail.cf and restart sendmail
 
  


Reply

Tags
sendmail



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Sendmail deferred mails to queue, Helo command rejected: Host not found ponganthony Linux - Server 6 01-29-2014 02:55 AM
Sendmail not using FQDN in HELO even though hostname setting is correct. Jukas Linux - Server 2 04-21-2009 09:39 PM
Forcing sendmail to use HELO the_gripmaster Linux - Server 4 10-08-2008 03:07 AM
sendmail: aol HELO problem leif_84 Linux - Server 2 12-10-2007 11:06 PM
Sendmail settings. Will sendmail always answer "helo". (and tracing blocked port 25) Bjorkli Linux - Networking 5 05-24-2004 03:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration