Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have ubuntu 12.04 server and installed sendmail to send mails from this server.


There is some strange issue on mail server. Somehow, server not able to send email to

but server sends email successfully to other email ids like, or

Success Case: when send email to

Dec 28 11:40:49 ip-10-99-66-252 sm-mta[16954]: qBSBemdx016952: to=<>, ctladdr=<> (33/33), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120352, [], dsn=2.0.0, stat=Sent (OK 1356694874 d3si34930711vdv.119)
Dec 28 11:51:43 ip-10-99-66-252 sendmail[16960]: qBSBphki016960: from=www-data, size=89, class=0, nrcpts=1, msgid=<>, relay=www-data@localhost

Fail Case: when send email to

Dec 28 11:51:43 ip-10-99-66-252 sm-mta[16962]: qBSBphSo016962: <>... User unknown Dec 28 11:51:43 ip-10-99-66-252 sendmail[16960]: qBSBphki016960:, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30089, relay=[] [], dsn=5.1.1, stat=User unknown

Can someone please help to sort out this issue ?

Edit: I have removed sendmail from server and re-installed it. now i am getting following in mail.log when sends mail to

Dec 29 09:34:32 ip-10-99-66-252 sm-mta[1773]: qBT9YWGZ001771: to=<>, ctladdr=<www-data@ip-10-99-66-252.ec2.internal> (33/33), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120393, [], dsn=5.0.0, stat=Service unavailable

Note: I don't want to expose our emails that's why i replaced xxx with original email address into this question.

share|improve this question
Can you include some of you file? – slm Dec 29 '12 at 7:07
where i should get this file ? – GBD Dec 29 '12 at 7:17
I got file but what should i paste from this file ? – GBD Dec 29 '12 at 7:21
The error message says "User unknown". Are you able to send emails to that user from another place, such as Gmail? – Ladadadada Dec 29 '12 at 9:24
Yes, tried to send email through gmail account. it was successfully sent.But when i tried same thing from server, it gets fail – GBD Dec 29 '12 at 9:26
up vote 2 down vote accepted

The configuration has changed after you re-installed sendmail. Before, it was trying to relay email for this domain via itself. (relay=[] []) i.e. Your mail server was asking itself to send mail.

Now, it's correctly doing the MX lookup and trying to send via the mail servers for ( []).

The trouble seems to be that it can't connect to (Or, presumably the other two: and

Try telnet 25 from your server to see if you can connect. An instant fail or a timeout means that there's either a network route that's not correct or a firewall that's not allowing this traffic. If you are sure it's not at your end, it's must be at their end.

share|improve this answer

Your Answer


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.