Table des matières
, , ,

Exim 4

Exim est le service de mail par défaut de Debian.
Dans la majorité des cas il est suffisant mais doit être configuré pour transmettre les mails vers un relais.

Dans une utilisation en entreprise, le relais est local, pour un particulier, il faut transmettre vers le relais de l'opérateur.
Pour ceux qui ont un compte gmail ou google apps, il est possible d'utiliser gmail comme relais.

Installation

Exim4 est installé par défaut, il s'agit du paquet :

Configuration

La configuration d'exim se fait en ligne de commande avec :

dpkg-reconfigure exim4-config

Les types d'installation sont :

Pour un serveur qui ne fait qu'émettre des mails vers l'extérieur, il faut choisir “Envoi via relais (smarthost), pas de courrier local”.

Il faut ensuite configurer les options :

Pour réaliser une authentification SMTP, il faut éditer le fichier /etc/exim4/passwd.client avec une ligne de la forme :

smtp.serveur.com:nom:pass

puis lancer :

update-exim4.conf

Pour vérifier que tout fonctionne parfaitement, envoyer un mail de test :

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

Exemple de configuration gmail

Procédure de configuration :

# 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:*********

la configuration générée dans /etc/exim4/update-exim4.conf.conf est la suivante :

# /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