Configuring the sendmail Server

sendmail is a robust email server. Like Apache, it has an enormous number of configuration options to handle many different service scenarios, even though many of these scenarios are pretty rare. With a small amount of configuration, sendmail can be configured to handle most mail-serving tasks.

How Do I Do That?

Fedora’s default sendmail configuration will:

  • Start the sendmail service at each boot

  • Accept mail from local users for local mailboxes and place it in those mailboxes

  • Accept mail from local users for remote systems, place it in a queue, and attempt to deliver it directly to the remote mail hosts

This configuration may or may not work for you, depending on how you are connected to the Internet.

Preparing to configure sendmail and activating changes

To configure sendmail easily, install the sendmail-cf package:

# yum install sendmail-cf

Changes to the sendmail configuration are made to the file /etc/mail/sendmail.mc. However, this isn’t the sendmail configuration file! Instead, it’s a file that is used to generate the sendmail configuration file, /etc/mail/sendmail.cf.

To generate a new sendmail.cf file:

# cd /etc/mail
# make

This must be done after each change is made to sendmail.mc. Reload the sendmail server to make your changes take effect:

# service sendmail reload

(You can also use the Restart button in the Services tool.)

Configuring sendmail to use a mail relay

Some Internet Service Providers (ISPs) block email traffic to all mail servers ...

Get Fedora Linux now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.