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 have a CentOS server. It has sendmail installed but not used for a mail server. I forwarded the root email to another email address. However, I keep getting errors in maillog:

Dec  6 08:49:16 server1 sm-msp-queue[16191]: qB6601et005433: to=root, ctladdr=root (0/0), delay=08:49:15, xdelay=00:00:00, mailer=relay, pri=883224, relay=[127.0.0.1], dsn=4.0.0, stat=Deferred: [127.0.0.1]: No route to host
Dec  6 08:49:16 server1 sendmail[16190]: qB39nDfQ014062: to=<root@subdomain.example.com>, delay=3+05:00:02, xdelay=00:00:00, mailer=esmtp, pri=6965048, relay=subdomain.example.com., dsn=4.0.0, stat=Deferred: subdomain.example.com.: No route to host
Dec  6 08:49:16 server1 sendmail[16190]: qB39nDfR014062: to=<root@subdomain.example.com>, delay=3+05:00:02, xdelay=00:00:00, mailer=esmtp, pri=7004959, relay=subdomain.example.com., dsn=4.0.0, stat=Deferred: subdomain.example.com.: No route to host

In the forwarded email address, I received notification "it can't deliver email to root@subdomain.example.com.

subdoamin.example.com does have a MX record, and I do not want to add one.

Is there any configuration that I can change to prevent this error? I want all emails to the root to be forwarded to the forward address.

share|improve this question
add comment

2 Answers 2

Can you ping (by hostname or IP) subdomain.example.com? What this error is saying to me is that you simply don't have IP connectivity to that host - solve that problem, and (assuming that host is accepting mail from you) sendmail will be happy.

share|improve this answer
    
subdomain.example.com is the reverse DNS of this computer. PING works however there is no MX entry for subdomain.example.com. –  Sherwood Hu Dec 6 '12 at 18:55
    
There doesn't have to be an MX - mail can use A just as well. Does the name "subdomain.example.com" resolve to the IP of the computer you're trying to send to? Reverse DNS doesn't matter as much, if at all. –  John Dec 6 '12 at 19:01
    
If you are pinging the MX host for subdomain.example.com then next try to connect to port 25 via the command line. Try something like telnet host 25 or nc host 25 and see if you connect. –  adamo Dec 6 '12 at 22:08
add comment

Have you uncommented the line which forces sendmail to listen only in the loopback or local interface in /etc/mail/sendmail.mc? If not, try uncommenting that line --

Change this

DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1, Name=MTA’)dnl

to this

DAEMON_OPTIONS(`Port=smtp, Name=MTA’)dnl
share|improve this answer
add comment

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.