This document outlines the process of setting up mail delivery to and from users of an Elemental Linux Server (ELS) system. Delivery of mail to other systems on the network is not covered here. For more information on that topic, see the ELS Howto: Remote Mail when you have completed this document.
You should have at least one non-root user set up on the system prior to beginning this document.
The mail delivery agent, Exim, and the basic mail client, mailx, are already installed as part of the base packages. You may also want to install Alpine as a mail client, but it is not required. Instructions for setting up alpine are included in the ELS Howto: Remote Mail.
There are three configuration files needed for local mail delivery. Two are used by Exim and one is for mailx. Even if you intend to use Alpine exclusively it is still a good idea to configure mailx.
The example below shows the /etc/aliases file with the postmaster address set to a local user named joe. Any unchanged lines have been removed for brevity.
postmaster: joe@localhost.lan mailer-daemon: postmaster root: postmaster
The commands that follow show how you would copy exim.conf and mailx.rc, decompressing them on the fly.
zcat /usr/share/doc/exim/aliases > /etc/aliases zcat /usr/share/doc/exim/exim.conf > /etc/exim/exim.conf zcat /usr/share/doc/mailx/mailx.rc > /etc/mailx.rc
You can test the setup by sending email to various users on the system. Detailed steps are below.
Here is an example of a successful test:
login: joe password: $ /usr/lib/sendmail root Subject: Hello Hello World! <CTRL-D> $ mailx Heirloom mailx version 12.3 01/07/07. Type ? for help. "/var/spool/mail/joe": 1 message 1 new >N 1 joe@host.domain.lan Tue Aug 26 21:04 14/503 Hello ? 1 Message 1: From joe@host.domain.lan Tue Aug 26 21:04:03 2008 X-Original-To: joe Delivered-To: joe@host.domain.lan Subject: Hello Date: Tue, 26 Aug 2008 21:03:48 -0500 (CDT) From: joe@host.domain.lan (Joe) To: undisclosed-recipients:; Hello World! ? q Held 1 message in /var/spool/mail/joe
If your test was not successful, here are some troubleshooting tips.
You can find more information about configuring and troubleshooting Exim at http://www.exim.org/docs.html