Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
public:linux:mail [2010/04/02 20:00] – ceric35 | public:linux:mail [2023/02/13 13:39] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Installation d'un serveur mail ====== | ====== Installation d'un serveur mail ====== | ||
- | ===== Rérérences ===== | + | Cette documentation explique comment installer un serveur mail complet (smtp, imap, pop) |
+ | basé sur les comptes unix (et le système de stockage basé sur maildir). | ||
- | Ce tutorial se base sur [[http://www.jopa.fr/index.php/2009/02/ | + | documentation : http://www.gentoo.org/doc/fr/virt-mail-howto.xml |
- | ===== OpenLDAP | + | ===== Postfix |
- | {{: | + | {{: |
- | <code bash> | + | Postfix permet d' |
- | <file |/etc/ | + | <code> |
- | allow bind_v2 | + | < |
- | # | + | **Configuration** |
- | # See slapd.conf(5) for details on configuration options. | + | |
- | # This file should NOT be world readable. | + | |
- | # | + | |
- | include | + | |
- | include | + | |
- | include | + | |
- | include | + | |
+ | < | ||
+ | # the internet hostname of this mail system | ||
+ | myhostname = ceric35.net | ||
- | # Define global ACLs to disable default read access. | + | # les adresses autorisés a utiliser postfix |
+ | mynetworks = 127.0.0.0/8, 168.168.0.0/ | ||
- | # Do not enable referrals until AFTER you have a working directory | + | # Hote relay |
- | # service AND an understanding of referrals. | + | relayhost = smtp.free.fr |
- | # | + | |
- | pidfile | + | # Alias pour les comptes mail |
- | argsfile | + | alias_maps = hash:/etc/mail/aliases |
+ | alias_database = hash:/etc/mail/aliases | ||
- | ####################################################################### | + | # Utilisation de procmail pour la livraison des mails |
- | # BDB database definitions | + | mailbox_command = procmail -a " |
- | ####################################################################### | + | |
- | database | + | # Autorisation des + (et obligatoire pour mailman) |
- | suffix | + | recipient_delimiter = + |
- | # < | + | |
- | checkpoint | + | |
- | rootdn | + | |
- | # Cleartext passwords, especially for the rootdn, should | + | |
- | # be avoid. | + | |
- | # Use of strong authentication encouraged. | + | |
- | rootpw | + | |
- | # The database directory MUST exist prior to running slapd AND | + | |
- | # should only be accessible by the slapd and slap tools. | + | |
- | # Mode 700 recommended. | + | |
- | directory | + | |
- | # Indices to maintain | + | |
- | index | + | |
- | ** Fichier import.ldif :** | + | # ??? (mais mailman aime bien) |
- | < | + | unknown_local_recipient_reject_code |
- | objectclass: | + | |
- | objectclass: | + | |
- | o: ceric35 | + | |
- | dc: ceric35 | + | |
- | dn: uid=ceric35, | + | </ |
- | uid: ceric35 | + | |
- | cn: Administrateur Ceric35 | + | |
- | sn: Ceric35 | + | |
- | mail: ceric35@ceric35.homelinux.org | + | |
- | userPassword: | + | |
- | objectClass: | + | |
- | dn: uid=eric, | + | **Ajout des alias:** |
- | uid: eric | + | < |
- | cn: Utilsateur eric | + | root: mailboxname |
- | sn: Ceric35 | + | admin: mailboxname |
- | mail: eric@ceric35.homelinux.org | + | </ |
- | userPassword: | + | |
- | objectClass: | + | |
+ | **Prise en compte des alias:** | ||
+ | newaliases | ||
+ | postfix reload | ||
- | < | + | ===== procmail ===== |
- | # | + | |
- | URI ldap:// | + | |
- | ===== Cyrus ===== | + | Procmail permet de traiter les mails transférés par postfix. |
- | {{:public: | + | **Installation:** |
+ | emerge procmail | ||
- | < | + | **Configuration** |
+ | La configuration par défaut est très bien: | ||
+ | < | ||
+ | # Use maildir-style mailbox in user's home directory | ||
+ | DEFAULT=$HOME/.maildir/ | ||
+ | </ | ||
- | <code bash> | + | ===== courier ===== |
- | < | + | Courier permet de fournir un serveur imap (ou pop) pour recupérer les mails a distance. |
- | LDAP_SERVERS: | + | |
- | # DOMAINE | + | **Installation:** |
- | LDAP_DEFAULT_DOMAIN: ceric35.homelinux.org | + | emerge courier-imap |
- | LDAP_TIMEOUT: | + | Fonctionne par defaut sans configuration. |
- | LDAP_TIME_LIMIT: | + | |
- | LDAP_CACHE_TTL: | + | |
- | LDAP_CACHE_MEM: | + | |
- | + | ||
- | # VERSION LDAP | + | |
- | LDAP_VERSION: | + | |
- | + | ||
- | # SASL Pour l' | + | |
- | LDAP_USE_SASL: | + | |
- | + | ||
- | # Méthode d' | + | |
- | LDAP_AUTH_METHOD: | + | |
- | + | ||
- | # Utilisateur utilisé pour la connexion - Si vide = Anonyme | + | |
- | LDAP_BIND_DN: | + | |
- | # Et le mot de passe | + | |
- | LDAP_BIND_PW: | + | |
- | + | ||
- | # Base de départ de la recherche | + | |
- | LDAP_SEARCH_BASE: | + | |
- | # Et profondeur (sub / one / base ) | + | |
- | LDAP_SCOPE: sub | + | |
- | + | ||
- | # Filtre de recherche : uid dans notre cas | + | |
- | LDAP_FILTER: | + | |
- | # Et nom du champ contenant le mot de passe | + | |
- | LDAP_PASSWORD_ATTR: | + | |
- | + | ||
- | < | + | |
- | SASLAUTHD_OPTS="" | + | |
- | + | ||
- | # Use / | + | |
- | SASLAUTHD_OPTS=" | + | |
- | + | ||
- | # Use ldap authentications mechanism | + | |
- | SASLAUTHD_OPTS=" | + | |
- | ===== Postfix ===== | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | < | + | |
- | < | + | |
- | ===== Postgrey | + | ===== webmail : roundcube |
- | < | + | Roundcube est un webmail. |
- | ===== Amavis, SpamAssassin & Clamav ===== | + | **Installation: |
+ | emerge roundcube | ||
+ | webapp-config -I -h mail.ceric35.net -d / roundcube 0.5.4 | ||
- | {{:public: | + | **Configuration:** |
- | {{: | + | * config/main.inc.php |
- | {{: | + | * $rcmail_config[' |
+ | * / | ||
+ | * 127.0.0.1 ceric35.net | ||
- | < | + | ==== webmail : imp ===== |
- | ===== Source ===== | + | **Installation: |
+ | emerge squirrelmail | ||
+ | webapp-config -I -h mail.ceric35.net -d imp squirrelmail 1.4.22 | ||
- | http:// | + | **Configuration:** |