Page suivante - Page précédente - Table des matières

7. Configuration de sendmail

Téléchargez le source de sendmail si vous ne l'avez pas déjà. Outre utiliser IMAP, vous pouvez faire des choses amusantes comme configurer l'anti-spam.

Voici mon fichier mc. Il délivrera le mail à IMAP sauf s'il y a une entrée de l'utilisateur dans le fichier /etc/sendmail.cN. Cela permet aux comptes systèmes comme root de garder leur courrier dans le spool; Cependant, les comptes utilisateurs utilisent IMAP par défaut. Ne pas faire un simple copier/coller de ce code car sendmail n'appréciera pas les espaces utilisés à la place des tabulations:

 divert(-1)
 #
 #       (C) Copyright 1995 by Carnegie Mellon University
 #
 #                      All Rights Reserved
 #
 # Permission to use, copy, modify, and distribute this software and its
 # documentation for any purpose and without fee is hereby granted,
 # provided that the above copyright notice appear in all copies and that
 # both that copyright notice and this permission notice appear in
 # supporting documentation, and that the name of CMU not be
 # used in advertising or publicity pertaining to distribution of the
 # software without specific, written prior permission.
 #
 # CMU DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 # ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 # CMU BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 # ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 # WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 # ARISING OUT OF OR IN CONNECTION WITH THE USE OR P ERFORMANCE OF THIS
 # SOFTWARE.
 #
 #       Contributed to Berkeley by John Gardiner Myers .
 #
 #       This sample mc file is for a site that uses the Cyrus IMAP server
 #       exclusively for local mail.
 #
 divert(0)dnl
 VERSIONID(`@(#)cyrusproto.mc    8.3 (Carnegie Mellon) @(#)cyrusproto.mc 8.3')
 OSTYPE(linux)
 define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')
 FEATURE(nouucp)
 FEATURE(nocanonify)
 FEATURE(always_add_domain)
 MAILER(smtp)
 MAILER(local)
 MAILER(cyrus)
 define(`confLOCAL_MAILER',`cyrus')
 LOCAL_RULE_0
 R$=N                 $: $#local $: $1
 R$=N                 $: $#local $: $1
 Rbb + $+             $#cyrusbb $: $1
 LOCAL_CONFIG
 FN /etc/sendmail.cN
 # end of mc file

Arpès avoir configuré le fichier /etc/sendmail.cf, créer le fichier /etc/sendmail.cN et ajouter les comptes utilisateurs qui ne souhaitent pas utiliser IMAP:

 root
 majordom
 stan
 mothra

Après avoir installé Sendmail 8.8.8 j'ai aussi installé mail.local comme programme de livraison du courrier local pour ces autres comptes. Il y a une astuce pour configurer mail.local. Aller dans le répertoire de mail.local, dans le source de sendmail et faire:

 cp Makefile Makefile.orig
 cp Makefile.dist Makefile
 make
 cp mail.local /bin/mail.local
 chmod 4555 /bin/mail.local
Après cela, redémarrer sendmail.

Ne pas oublier de terminer les instructions de l'installation de Cyrus.


Page suivante - Page précédente - Table des matières