Now, the sendmail binaries and config files that ship with OSes work "out of the box" with little or no setup needed.
You only need the sendmail daemon running on your machine if you need it to accept inbound mail. Otherwise, it suffices to have the software on your disk, but not running all the time.
Your most important task will be to make sure you're not an "open relay" (see below).
Here are some configuration notes:
/etc/mail/local-host-names (/etc/sendmail.cw or
/etc/mail/sendmail.cw for old sendmail versions). Add a line
for each host or domain name. For example, if your machine is called
mail.dept.uga.edu and it will accept also mail for
dept.uga.edu and oldmail.dept.uga.edu, add these
lines to the sendmail.cw file:
dept.uga.edu
oldmail.dept.uga.edu
You must edit the null cf file to specify the machine to which mail will be forwarded. You'll need a line that reads
DHsome.box.uga.eduwhere "some.box.uga.edu" is the machine that you want mail forwarded to.
DMsome.box.uga.edu
For Solaris, there's a script you can run (
ftp://ftp.uga.edu/pub/unix/packages/sendmail.uga/check-permissions.sh)
which will check whether sendmail will honour any forward and
.procmailrc files your users may have in their home directories.
Run the script check-permissions.sh ALL as root.
For more possibly useful info on potential startup problems on Solaris, see http://www.sendmail.org/sun-specific/.
/etc/aliases and running sendmail -bi to
rebuild the aliases database.
/etc/shells
/usr/local/bin/procmail), then you need to add the names of
these programs to the file /etc/shells for sendmail
work properly. If this file does not exist, create it. If you have
to create it, you also need to add the names of the other standard
shells on your system. For example:
/bin/csh
/bin/sh
/bin/tcsh
/usr/local/bin/procmail
Do not add program names to /etc/shells unless you
know that they are secure and you wish to allow your users to be
able to forward their mail through them. NEVER add an entry to
/etc/shells if it is a shell script.
The access database is a table that maps email addresses, domain
names, and/or IP addresses to actions. For example, the following
line allows all machines in the uga.edu domain to
relay:
uga.edu RELAYHere is a list of all possible actions (mostly stolen from the sendmail docs):
/dev/null.
cyberspammer.com 550 We don't accept mail from spammers
okay.cyberspammer.com OK
sendmail.org OK
128.32 RELAY
dorkslayers.com DISCARD
This table would accept mail from okay.cyberspammer.com, but would
reject mail from all other hosts at cyberspammer.com with the
indicated message. It would allow accept mail from any hosts in the
sendmail.org domain, and allow relaying for the 128.32.*.* network.
It would also discard all mail from the dorkslayers.com domain.
If you want to use this feature, put your table in
/etc/sendmail.access (or /etc/mail/sendmail.access) and
run the appropriate makemap command. The command
depends a bit on which OS you are running but in general it looks
like this:
cd /etc # or /etc/mail /usr/local/bin/makemap dbm sendmail.access < sendmail.accessIf you are running RedHat, replace
dbm with
hash.
You do not need to restart sendmail after updating the access database. Your changes take effect immediately. But note: If you have updated your access database because of in in-progress spam attack you should kill all sendmail processes and restart sendmail. This will take care of any existing connections the spammer may have to your machine. The processes associated with existing connections do not re-read the access database every time it gets updated :)