Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I set up a Server A with sendmail running, just for sending emails for other Servers. I put:

Connect:[Server B's external IP]                RELAY  

in /etc/mail/access file and compiled to access.db.

I have Server B to use Server A to send out emails.

Sometimes I will get rejected emails:

554 5.7.1 <localhost.localdomain>: Helo command rejected:

Looks like mail Server A didn't send out emails correctly, it should put Server B's domain name in the email while sending out, shouldn't be . I believe that's the reason my mail got rejected.

Question: How do I configure Sendmail on Server A not to use localhost.localdomain?

More logs: On Server A's maillog:

May  1 15:23:23 serverA sendmail[14485]: p415N29k014483: to=<xxx@nt.gov.au>, delay=00:00:19, xdelay=00:00:01, mailer=esmtp, pri=453786, relay=emdch-mx31.nt.gov.au. [203.42.37.91], dsn=5.7.1, stat=Service unavailable
May  1 16:09:44 serverA sendmail[16131]: p4169GH4016129: to=<xxx@nt.gov.au>, delay=00:00:26, xdelay=00:00:01, mailer=esmtp, pri=461650, relay=emdch-mx21.nt.gov.au. [203.42.37.81], dsn=5.7.1, stat=Service unavailable

Update

It is good practice to set each server to have full URL name: serverA.example.com. Also, leave 127.0.0.1 localhost.localdomain localhost untouched. Create a new entry with your actual server IP mapping: [ip] serverA.example.com serverA This should fix the issue and sendmail will response full URL name instead of localhost.localdomain.

Thanks tim

share|improve this question
    
Do you have additional logs or configurations you can show us? It's a little difficult to determine the context here. –  Mike B May 13 '11 at 2:51
    
Thanks Mikey B, I have added more log from /var/log/maillog on Server A. Please let me know if you need more. Thanks very much! –  starchx May 15 '11 at 7:43

1 Answer 1

up vote 3 down vote accepted

"helo command rejected" means that your "A" server didn't even get as far as the first verb in the SMTP Relay conversation. The envelope sender and recipient are thus not the problem. They haven't even been sent at the point that the error occurs.

The error is response code 554, extended response code 5.7.1. This is the conventional "I don't want to talk to someone at your IP address." response code. The reasons why are up to the server owner, and can vary from

This blacklist says that you are a third-class Internet citizen and I am treating you as such.

to

There isn't actually an SMTP Relay server here, you know.

In this particular case, the reason appears to be

The name localhost.localdomain isn't uniquely yours, and I've decided not to talk to people who configure their MTSes with that as the supposedly unique name of their MTS. You know where the confDOMAIN_NAME setting in Sendmail is.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.