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:15] – 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 | + | |
| - | Le fichier d' | + | # ??? (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: eric | + | 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=" | + | |
| - | + | ||
| - | < | + | |
| - | # when you change these directories (read the docs). | + | |
| - | configdirectory: | + | |
| - | partition-default: | + | |
| - | sievedir: | + | |
| - | + | ||
| - | tls_ca_path: | + | |
| - | tls_cert_file: | + | |
| - | tls_key_file: | + | |
| - | + | ||
| - | # Don't use an everyday user as admin. | + | |
| - | admins: | + | |
| - | + | ||
| - | hashimapspool: | + | |
| - | allowanonymouslogin: | + | |
| - | allowplaintext: | + | |
| - | + | ||
| - | # Allow renaming of top-level mailboxes. | + | |
| - | # | + | |
| - | + | ||
| - | # Use this if sieve-scripts could be in ~user/ | + | |
| - | # | + | |
| - | + | ||
| - | # Use saslauthd if you want to use pam for imap. | + | |
| - | # But be warned: login with DIGEST-MD5 or CRAM-MD5 | + | |
| - | # is not possible using pam. | + | |
| - | sasl_pwcheck_method: | + | |
| - | + | ||
| - | #################################################### | + | |
| - | ## This is a recommended authentication method if you | + | |
| - | ## emerge cyrus-sasl with ' | + | |
| - | ## To use with mysql database uncomment those lines below. | + | |
| - | + | ||
| - | # | + | |
| - | # | + | |
| - | + | ||
| - | ## possible values for sasl_auxprop_plugin ' | + | |
| - | # | + | |
| - | + | ||
| - | ## all possible values. | + | |
| - | # | + | |
| - | ## or limit to CRAM-MD5 only | + | |
| - | sasl_mech_list: | + | |
| - | + | ||
| - | ## change below to suit your setup. | + | |
| - | sasl_sql_user: | + | |
| - | sasl_sql_passwd: | + | |
| - | sasl_sql_database: | + | |
| - | sasl_sql_hostnames: | + | |
| - | sasl_sql_select: | + | |
| - | + | ||
| - | + | ||
| - | ===== 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:** |