Configuring a Mail Server

Does your Internet service provider prohibit email message attachments larger than 1 MB or impose other restrictions that you find cumbersome? Your Linux system can provide an email server that you can configure any way you like.

The sendmail package provides a powerful mail transfer agent (MTA), which transfers email from one system to another.

Tip

Don’t confuse sendmail and other MTAs with mail clients, which merely let you read email.

Once you’ve installed sendmail, you must configure its operation. To do so, log on as root and use your favorite text editor to add the following two lines to the /etc/inetd.conf file:

pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd        ipop3d
imap    stream  tcp     nowait  root    /usr/sbin/tcpd        imapd

Now, you must reboot your system. Alternatively, you can cause the inetd daemon to re-read its configuration file and you can start the sendmail process manually. To do so, issue the following commands:

killall -HUP inetd
./sendmail start

To verify that sendmail is running, issue the following command:

./sendmail status

The output of the command should report that the process is running.

You should now be able to send email to users on other systems, and to receive email sent by them to you. Simply reconfigure your favorite mail client to specify your own system as your mail server. For example, if you’re using Netscape Navigator, select Edit Preferences Mail Servers. Make a note of the existing mail server settings, just in case ...

Get Learning Red Hat 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.