Installing Exim and Courier


Installing and configuring Exim and Courier are very straightforward thanks to the quality of the packages that come with Debian. Chances are, if you have a new Debian system, it already has a version of Exim installed. However, you'll want to use a specific version of Exim that contains features for content scanning. Here are the installation steps:

1. Start by installing this particular Exim package:
# apt-get install exim4-daemon-heavy
2. You need to change a few of the configuration options from the defaults. Run the following command:
# dpkg-reconfigure --priority=medium exim4-config


You are asked a number of questions. Here's how to answer them:
Split configuration into small files: Yes.
General type: Select "Mail sent by smarthost; received via SMTP or fetchmail" if you need to send all of your outgoing mail through a server at your Internet service provider. Otherwise, select "Internet site; mail is sent and received directly using SMTP." Mail name: Enter the name of your mail server here.


IP addresses: Clear this box (or leave it empty if it is already so) so that Exim will listen on all local IP addresses. Destinations to accept mail for: Enter any domains that your server will be accepting mail for. Be sure to separate them with colons, and not commas or spaces. Domains to relay for: Enter the names of any domains that your machine will relay mail for, meaning that it can receive mail from them but then passes it on. In most cases, you will not want to enter anything here.


Machines to relay for: Enter the IP address ranges of any client machines that you want your server to accept mail from. Another (safer) option is to leave this empty and require clients to authenticate using SMTP authentication. SMTP authentication is best performed over an encrypted connection, so this process is described in the security section at the end of this chapter. Keep DNS queries to a minimum: No.