Centos – How to configure sendmail to use a different SMTP server

centosexchangesendmail

I'm trying to configure sendmail on Centos 5 so that all mail goes through another SMTP server. In this case, it happens to be an Exchange Server. I've edited the sendmail.mc file with this line:

define(`SMART_HOST', `10.1.1.30')dnl

But when I try to send an e-mail, I get the following error:

Nov  2 14:02:00 COMPUTERNAME sendmail[1370]: oA2K1xht001368: to=<testemail@test.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=120355, relay=10.1.1.30, dsn=5.1.2, stat=Host unknown (Name server: 10.1.1.30: host not found)

The box 10.1.1.30 is accessible from the box I am sending mail from. Meaning, I can ping 10.1.1.30 and get good responses. So I don't understand why sendmail can't find the host. Any ideas? Thanks.

Best Answer

Sendmail appears to be doing a name lookup on '10.1.1.30'. Change the sendmail.mc to point to a hostname. If the hostname isn't in DNS you can put it into /etc/hosts.

Related Topic