Table of Contents
, , ,

Exim 4

Exim is the default mail service with Debian.
It's enough for most needs but must be configured to forward emails to a relay.

For company use, the relay is generally local, at home the relay is provided by the ISP.
For those who owns a gmail or google apps account, it is possible to use gmail as a relay.

Installation

Exim4 is installed by default, it's the following package :

Setup

Exim setup is done with the command :

dpkg-reconfigure exim4-config

Installation types are :

For a server that just needs to send email outside, we need to choice “mail sent by smarthost; no local mail”.

The settings to configure are :

To enable SMTP authentication, we need to edit the file /etc/exim4/passwd.client and some lines with this template :

smtp.serveur.com:nom:pass

Then execute :

update-exim4.conf

To check if it's working, just send an email with the “mail” command :

# mail a.valid.email@gmail.com
Subject: test
this is a test
.
Cc:
#

Example of gmail configuration

Steps :

# password file used when the local exim is authenticating to a remote
# host as a client.
#
# see exim4_passwd_client(5) for more documentation
#
# Example:
### target.mail.server.example:login:password
gmail-smtp.l.google.com:compte@bouthors.fr:*********
*.google.com:compte@bouthors.fr:*********
smtp.gmail.com:compte@bouthors.fr:*********

Result config inside /etc/exim4/update-exim4.conf.conf :

# /etc/exim4/update-exim4.conf.conf
#
# Edit this file and /etc/mailname by hand and execute update-exim4.conf
# yourself or use 'dpkg-reconfigure exim4-config'
#
# Please note that this is _not_ a dpkg-conffile and that automatic changes
# to this file might happen. The code handling this will honor your local
# changes, so this is usually fine, but will break local schemes that mess
# around with multiple versions of the file.
#
# update-exim4.conf uses this file to determine variable values to generate
# exim configuration macros for the configuration file.
#
# Most settings found in here do have corresponding questions in the
# Debconf configuration, but not all of them.
#
# This is a Debian specific file

dc_eximconfig_configtype='satellite'
dc_other_hostnames=''
dc_local_interfaces='127.0.0.1'
dc_readhost='bouthors.fr'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com::587'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'

Backup

Links