Electronic Mail

Table of Contents

1. Preliminary Configuration
2. Install and Configure Exim
3. Testing Submission by Hand Using SMTP
4. Troubleshooting
5. Assessment
6. Inspecting Headers
7. POP3 Server
7.1. Assessment
8. [Optional] A Simple Open Mailing List
9. Last Words

E-mail is a large and rather complex topic, but is very important. Being such an important part of everyday life, e-mail has a lot of things to consider. We could talk about many aspects of e-mail administration, but we’ll stick to the basics.

By the end of this lab, you should have a good idea of what is involved when setting up a very basic e-mail server, how mail is delivered and received, and how such things as mailing lists can be set up. We don’t have time today to cover other important e-mail issues such as SPAM and Virus prevention.

1. Preliminary Configuration

  1. In our case, we’re going to have all our e-mail services run on our Server1, but this needn’t be the case.

  2. Add an MX record with priority 0, for localdomain, that points to our servers IPv4 and IPv6 address. The second argument of an MX record must not be a name with a CNAME record, but rather something that has an A or AAAA record[67].

  3. Add an alias smtp.localdomain which points to the e-mail server, for both IPv4 and IPv6. Remember, this is an alias, so don’t add an entry to the reverse zone.

  4. Add another alias called pop3.localdomain, in the same way as the previous alias.

  5. Make the changes take effect, and test to make sure the mappings are correct and working.

    $ dig +short -t MX localdomain
    0 smtp.localdomain.
    $ dig +short -t ANY server1.localdomain
    192.168.1.1
    fd6b:4104:35ce::1
    $ dig +short -t ANY smtp.localdomain
    192.168.1.1
    fd6b:4104:35ce::1
    $ dig +short -t ANY pop3.localdomain
    192.168.1.1
    fd6b:4104:35ce::1
  6. Add a usercode for a fictitous user called bob on Server1. Use adduser bob for this. We shall be using this user later to test our delivery.



[67] See RFC1912.