Sendmail can be configured to send emails directly to destination host or email server. However, network traffic congestion, email destination location, and connectivity rate sometimes affect and tend to fail a successful email delivery.
Medium and large type of private networks are traditionally behind a firewall. This type of network usually sends emails directly to internal destination host and if all fails, elects a smart host, which is located outside their firewall, as their smart host email server to send emails to mostly external destination hosts. Having a smart host and gateway email server, relieves a lot of failing factors from sending emails directly from source to external destination host.
Sendmail provides a quick and simple method of configuring a smart host. Here’s a quick run down on how to configure your sendmail to act as smart host.
Configure Sendmail as Smart Host
Minimum Requirements
1. Fedora or Linux Box
2. Existing and Working Sendmail Setup
3 .Existing DNS Setup
Configuration Steps for Sendmail as Smart Host
To create a smart host from your sendmail, backup and edit your sendmail conf file
# vi /etc/mail/sendmail.cdf
Look for sendmail directive line similar below and modify it
dnl define(`SMART_HOST’, `smtp.your.provider’)dnl
Simply replace ‘smtp.your.provider’ with your email gateway server and remove the starting and ending ‘dnl’ words from the line . The new sendmail smart host directive will look like
define(`SMART_HOST’, `you-smtp.your.provider’)
Save and exit.
Recompile sendmail configuration file
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Restart sendmail daemon service
# service sendmail restart
When an email failed to be delivered, sendmail smart host will act as a fallback failover mechanism on sending failed emails from local sendmail source to smart host STMP server then going to email destination server.
Tags:Backup, configuration, configure, connection, create, daemons, edit, edition, email, file, firewall, hosts, linux, network, networking, sendmail, server, servers, services, source, traffic


October 28th, 2008 at 3:01 am
Nice concise article, very handy when sendmail has a steep learning curve. One question: what happens if the smart host is down? Does your local sendmail queue the mail and keep retrying until the smart host is back up? Or does the local sendmail start trying to send the mail itself?
October 29th, 2008 at 12:19 am
I have a really strange issue with using a smart host in sendmail. when outbound mail is sent to my email server via stmp (from a workstation) and the link to the smart host is down, sendmail will hang and never accept the msg for delivery. As soon as the smart host is reachable again – sendmail has no problem accepting msgs. I always thought sendmail would accept msgs for remote delivery and try to reach the smart host without holding up the client.
April 3rd, 2009 at 4:33 am
Thanks..it helped alot!
September 16th, 2009 at 12:04 am
Of course, what a great site and informative posts, I will – bookmark this site? Regard.