open.itworld.com
  Search  
Security Home Page Security Webcasts Security White Papers Security Newsletters Security News Open Topics Careers ITworld Voices ITwhirled The Security site of ITworld.com

Unix Tip: Sendmail gets smarter

ITworld.com 5/7/2007

Sandra Henry-Stocker, ITworld.com

Send in your Unix questions today! | See additional Unix tips and tricks

Before sendmail 8.13, sendmail servers were generally set up in one of two ways. Either their configurations were based on the main.cf file and they used DNS MX records to determine the identities (and IP addresses) of hosts to which mail was to be delivered or their configuration was based on the subsidiary.cf file and they were set up to relay mail through a system with more knowledge of the outside world (in particular, access to a real world DNS server) than systems requiring the relay service.

These two basic configurations have basically merged in version 18.13 of the sendmail software with the addition of a new configuration option -- the FallbackSmartHost. Designed to be a last ditch option for relaying mail, a FallbackSmartHost is used only if all higher preference options are unavailable. The list of higher preference options can include a SmartHost setting as well as a list of servers identified through their MX records. Once all these other options have been exhausted, either because no systems were identified or they were not available to accept the current mail messages, sendmail will attempt to deliver the email to the FallbackSmartHost.

A message intended for someone with a sun.com email address, for example, might be sent to any of five defined mail exchangers. As defined in DNS, the following systems provide this service for the sun.com domain:

sun.com preference = 20, mail exchanger = mx3.sun.com
sun.com preference = 5, mail exchanger = btmx1.sun.com
sun.com preference = 5, mail exchanger = btmx3.sun.com
sun.com preference = 5, mail exchanger = btmx4.sun.com
sun.com preference = 20, mail exchanger = mx4.sun.com
Since three of these systems have a preference of 5 (higher priority) and two have a preference of 20 (lower priority), the chances are that your message will be sent to one of the three "btmx*" servers. Each has an equal likelihood of being used. If, for some reason, none of these systems responds, the two lower priority servers will be tried. If none of the five servers responds, the FallBackSmartHost is used. In short, it acts like a lowest possible preference MX server.

A FallBackSmartHost can be configured in the sendmail.mc file in much the same manner as the SmartHost. Where the SmartHost is set up with a line that looks more or less like this:
define(`SMART_HOST',`outside.facing.host')
in which "outside.facing.host" is, of course, replaced with the fully qualified name of the actual server, the FallBackSmartHost requires a line like this:
define(`confFALLBACK_SMARTHOST',`another.smart.host')
Both the SmartHost and the FallbackSmartHost server are termed "smart" because they are able to query DNS to acquire the information needed to send mail to systems outside the organization.

Since MX lookups and the use of smart hosts are compatible, you can use the same sendmail.cf file whether you expect to be relaying to a smart host or making use of MX records. In addition, the availability of the FallbackSmartHost options allows you to configure a smart host that can serve as a secondary smart host if your primary smart host (the one defined with your SmartHost option) is unavailable.

On this topic

 

Sandra Henry-Stocker has been administering Unix systems for more than 18 years. She describes herself as "USL" (Unix as a second language) but remembers enough English to write books and buy groceries. She currently works for TeleCommunication Systems, a wireless communications company, in Annapolis, Maryland, where no one else necessarily shares any of her opinions. She lives with her second family on a small farm on Maryland's Eastern Shore. Send comments and suggestions to bugfarm@gmail.com.




Sponsored Links

Sign up for a Microsoft Dynamics® CRM WEBCAST
Hear globally recognized leaders in customer strategy discuss the importance and evolution of CRM.
TRY NEW SUN SERVERS FREE for 60 Days!
Test The Latest Sun Servers In Your Environment BEFORE YOU BUY. Pay Nothing, Not Even Shipping.
Workflow Enabled Help Desk & IT Service Management
Automate service desk activities and integrate processes across IT. Learn more here.
Sign up for a FREE NETWORK RISK ASSESSMENT!
MORE THAN 70% OF NETWORKS ARE INFECTED by hidden Malware. Find out if your network is infected now!
Enterprise IP Goes Mobile
To maximize full productivity, companies must integrate their mobile applications with the IP network.
» Buy a link now

Advertisements
Sponsored links
Top 5 Reasons to Combine App Performance and Security
Locate Hidden Software on business PCs with this free tool
KODAK i1400 Series Scanners stand up to the challenge
Bring harmony to your mix of UNIX-Linux-Windows computing environments
 Home   Open source  Operating systems  Unix
www.itworld.com    open.itworld.com     security.itworld.com     smallbusiness.itworld.com
storage.itworld.com     utilitycomputing.itworld.com     wireless.itworld.com

 
Contact Us   About Us   Privacy Policy    Terms of Service   Reprints  

CIO   Computerworld   CSO   GamePro   Games.net   IDG Connect   IDG World Expo   Infoworld   ITworld   JavaWorld   LinuxWorld  MacUser   Macworld   Network World   PC World   Playlist  

Copyright © Computerworld, Inc. All rights reserved

Reproduction in whole or in part in any form or medium without express written permission of Computerworld Inc. is prohibited. Computerworld and Computerworld.com and the respective logos are trademarks of International Data Group Inc.