Configure sendmail as a smart host

Configure sendmail as a smart host

by Vivek Gite ยท 2 comments

Smart host is very handy if you are on dial up network or sometimes a host finds mail that it is unable to deliver directly to the desired remote host.

In large network, it is good idea to have a single host/mail server acting as MTA. Smart hosts are usually used when all other methods of delivery have failed. In the case of the organization with the private network, it would be perfectly reasonable to have the hosts attempt to deliver mail directly first, and if that fails then to send it to the smart host. This relieves the smart host of a lot of traffic because other hosts can directly send mail to other hosts on the private network.

The SMART_HOST macro allows you to specify the host that should relay all outgoing mail that you are unable to deliver directly, and the mail transport protocol to use to talk to it.

Open your configuration file:# vi /etc/mail/sendmail.mcAppend or modify macro that read as follows :define(`SMART_HOST',`')Replace with your actual smtp server address. If line contains word, dnl remove the dnl word. Regenerate a new config file with m4 command:# m4 /etc/mail/ > /etc/mail/sendmail.cfRestart sendmail service:# /etc/init.d/sendmail restart

Tricky one today – configuring local debian+sendmail box to forward all mails to local exchange server. This post cracked it.

Leave a Reply

Your email address will not be published. Required fields are marked *