Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing the hostname in EHLO

Status
Not open for further replies.

rnovick

MIS
Apr 14, 2003
3
US
Hi,

I am having a problem sending mail to specific servers that do not allow localhost.localdomain in HELO/EHLO.

The response I get is:

<<< 501 5.0.0 Disallowed name in HELO/EHLO: localhost.localdomain 554
5.0.0 Service unavailable

My inbound mail server tells me this:
Action: failed
Status: 5.5.0
Diagnostic-Code: SMTP; 501 5.0.0 Disallowed name in HELO/EHLO: localhost.localdomain
Last-Attempt-Date: Tue, 22 Apr 2003 14:49:33 -0600

So, trying to figure this out, I wanted to see the EHLO part on the command line, and I get this:

[rnovick@windhorse rnovick]$ mail -v randy.novick@dralasoft.com
Subject: Test
test
.
Cc:
randy.novick@dralasoft.com... Connecting to localhost.localdomain. via relay...
220 localhost.localdomain ESMTP Sendmail 8.12.5/8.12.5; Wed, 23 Apr 2003 10:43:5
7 -0600
>>> EHLO localhost.localdomain
250-localhost.localdomain Hello windhorse [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<rnovick@localhost.localdomain> SIZE=51
250 2.1.0 <rnovick@localhost.localdomain>... Sender ok
>>> RCPT To:<randy.novick@dralasoft.com>
>>> DATA
250 2.1.5 <randy.novick@dralasoft.com>... Recipient ok
354 Enter mail, end with &quot;.&quot; on a line by itself
>>> .
250 2.0.0 h3NGhvNi012463 Message accepted for delivery
randy.novick@dralasoft.com... Sent (h3NGhvNi012463 Message accepted for delivery
)
Closing connection to localhost.localdomain.
>>> QUIT
221 2.0.0 localhost.localdomain closing connection

Just looking at the transcripts that others have posted, I do notice that some folks have a hostname in the 220 line and others have what I have -- localhost.localdomain.

My question is this: where does the localhost.localdomain come from? -- is it read from /etc/hosts? I have ruled out the Cwlocalhost.localdomain line at the bottom of sendmail.mc, but am stumped about the other possibilities. I haven't found a resource that says where the hostname is taken from in the 220 handshake. Is anyone familiar with this config?

I am under some time pressure for this fix, so any immediate help/advice would be welcome and appreciated.

Thanks,
-- R

 
rnovick,

Sendmail does read the value from /etc/hosts. Change the entry in /etc/hosts and restart Sendmail to read the new value.

Peter
 
rnovick,

I have same or identical problem. I found that changing the machine or hostname fixes things, although in my case caused other problems ...

Try hostname [domain.com]
then /etc/init.d/sendmail stop & /etc/init.d/sendmail start

Hope this helps!


Jose

KNOWLEDGE: Something you can give away endlessly and gain more of it in the process! - Jose Lerebours
 
Thanks for the tip. I tried this, but then I could not send outbound mail at all. For some reason, my mail server did not recognize me as a user and refused to relay my mail. I am working now on adding all aliases to local-host-names, and will try this again. Naturally, I'll report any success or failure I achieve.

Thanks also to peter for the suggestion for /etc/hosts, however, I'm confused about something:

My /etc/hosts is a one-liner on the loopback address, like this:

127.0.0.1 windhorse.dralasoft.com windhorse localhost.localdomain localhost

What is it that you are suggesting I change?

Anyhooo, as an update, I've managed to change my config enough to get the following conversation at EHLO/HELO handshake time:

[rnovick@windhorse rnovick]$ mail -v randy.novick@dralasoft.com
Subject: another test
a second test
.
Cc:
randy.novick@dralasoft.com... Connecting to windhorse.dralasoft.com. via relay..
.
220 windhorse.dralasoft.com ESMTP Sendmail 8.12.5/8.12.5; Thu, 24 Apr 2003 10:16
:56 -0600
>>> EHLO windhorse.dralasoft.com
250-windhorse.dralasoft.com Hello windhorse.dralasoft.com [127.0.0.1], pleased t
o meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250 HELP
>>> MAIL From:<rnovick@windhorse.dralasoft.com> SIZE=68
250 2.1.0 <rnovick@windhorse.dralasoft.com>... Sender ok
>>> RCPT To:<randy.novick@dralasoft.com>
>>> DATA
250 2.1.5 <randy.novick@dralasoft.com>... Recipient ok
354 Enter mail, end with &quot;.&quot; on a line by itself
>>> .
250 2.0.0 h3OGGuPf014167 Message accepted for delivery
randy.novick@dralasoft.com... Sent (h3OGGuPf014167 Message accepted for delivery
)
Closing connection to windhorse.dralasoft.com.
>>> QUIT
221 2.0.0 windhorse.dralasoft.com closing connection

My hope is that I have cracked the nut, but ...

... hang on ... my test e-mail is returning ... let's see ...

... BULLY! It's fixed! At least I'm not getting bounced back!

For the record, the change that appears to have done it was adding something to local-host-names. It didn't work, but when I removed the line from local-host-names, it appears to have forced a re-read of /etc/hosts and taken the first name it saw there.

-= DANCES =-
\+ SHAKES BOOTY +/

Hopefully it's all taken care of, now, but if I find any ripple effects, I'll be sure to post them. Thanks to Peter and Jose for helping push me to try some stuff I hadn't considered.

Cheers
-- Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top