Sendmail Configuration Settings Unmasked!

Sendmail Configuration Settings Unmasked!

All of Sendmail's configuration files can be found in /etc/mail/ with the notable exception of /etc/aliases (the system aliases file). Here is a brief list of each of the configuration files and what it does:

access - Allow or deny relying of mail from various hosts and domains, access.db is the hash file that is actually used by Sendmail (edit access then run "make" in the /etc/mail directory)

domaintable - Allows you to setup domain name mapping

local-host-names - These are the names of all the domains and hosts for which your server is the endpoint. All domain names listed here are accepted for local delivery. No mail for a domain name listed here will be routed any further.

mailertable - routing table that overrides other mail routes for specified domains. - Main configuration file for Sendmail. All other files in this list are simply extensions of settings hidden within this file. This file controls all aspects of Sendmail, including its connections, timeouts, and routing instructions. - This is the macro configuration file. It "simplifies" the editing of Anything done via can also be done by directly editing the file. The advantage to using the file is that it records your preferences and allows you to easily re-apply them to an updated version of Sendmail.

trusted-users - Users that can send mail as other users (sort of an su for sending mail). Apache and Mailman are good examples of users you might include in this file.

virtusertable - This acts as an aliases file for virtual domains. It allows you to host multiple domains on one machine.


The following are noteworthy settings inside the file that you may wish to change at one time or another:

O MaxMessageSize=1000000 - this is the maximum message size in bytes; by default there is no limit.

O LogLevel=9 - this controls the amount of information that goes into the log files.

O MeToo=True - if set to true then the sender receives a copy of their email when they send an email to an alias that they are a member of.

O Timeout.iconnect=5m - Used to weed out slow hosts. Definitely change this. I recommend trying 5 seconds (O Timeout.iconnect=5s). This value is the timeout for the initial connection. If it fails the initial connection then it moves that host to the rear of the queue and when its turn comes again in the queue it will use the more generic "Timeout.connect" value.

O Timeout.helo=5m - The time the server will wait for the HELO command to complete (inital connection). The RFC's call for 5 minutes, but in my opinion that is too long. Still, to be conservative I wouldn't make it smaller than 2 minutes.

O Timeout.mail=10m - Timeout for the response to the MAIL command. The RFC specifies a minimum of 5 minutes. I would use the minumum, though some folks set this as low as 2 minutes.

O Timeout.datainit=5m - Timeout for the response to the DATA command. The RFC specifies a minimum of 2 minutes. I would use the minumum.

O Timeout.ident=0 - You really want to check this and make *sure* that it is zero, otherwise sendmail wastes that many seconds attempting to use ident.

O DefaultUser=8:12 - the UserID:GroupID that Sendmail runs as

O QueueLA=8 - load average at which Sendmail simply queues up new messages, this is a good tweaking parameter

O RefuseLA=12 - load average at which Sendmail starts to reject connections, this is needs to be modified if you modify QueueLA

#0 MaxDaemonChildren=0 - maximum number of child processes allowed at one time.

O DeadLetterDrop=/var/tmp/dead.letter - where to save bounces if all else fails (and this does happen if the system runs out of space on the /var volume

#O MaxRecipientsPerMessage=100 - the maximum number of recipients in a message.

Introduction: Setting up Mail Services in Linux
Part I, The Movement of Mail Across the Internet
Part II, Setting up a Mail server on Red Hat 8.0
Part III, The Sendmail Configuration Files Unmasked!