infrastructure:serveur_mail:partie_1:debian_jessie_postfix_dovecot
Différences
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 | ||
| infrastructure:serveur_mail:partie_1:debian_jessie_postfix_dovecot [2015/10/17 13:54] – [Pour finir] ghusson | infrastructure:serveur_mail:partie_1:debian_jessie_postfix_dovecot [2017/01/08 17:10] (Version actuelle) – [At the end...] ghusson | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | ===== Prérequis | + | ===== Requisits |
| - | ==== Remarques préalables | + | ==== Firsts remarks |
| - | Les répertoires des mails seront de la forme : / | + | - By initial choice, user mail directories are composed like this : / |
| + | - You must have a valid FQDN with the corresponding reverse DNS. | ||
| + | - You must have SSL/TLS certificates. | ||
| + | - Postfix configuration here is not suited to high traffic servers (ISP), for this target, see : hash_queue_depth and http:// | ||
| ==== Variables ==== | ==== Variables ==== | ||
| - | RQ : renseigner les 3 utilisateurs et leurs mots de passes assossiés | + | RQ : change the 3 usernames and their passwords, the mail domain and the server hostname |
| <code bash> | <code bash> | ||
| - | # pour postfixadmin, a renseigner dans keepass | + | # for postfixadmin |
| export PFADBNAME=" | export PFADBNAME=" | ||
| export PFADBUSER=" | export PFADBUSER=" | ||
| Ligne 23: | Ligne 27: | ||
| </ | </ | ||
| - | ==== Commencer sainement | + | ==== Begin safely |
| - | Listes APT à jour et serveur à jour, installation de resolvconf : | + | Server update and resolvconf |
| <code bash> | <code bash> | ||
| apt-get update | apt-get update | ||
| Ligne 31: | Ligne 35: | ||
| </ | </ | ||
| - | ==== Interfaces réseau | + | ==== Network interfaces |
| <code bash>vi / | <code bash>vi / | ||
| - | Vérifier/ajouter | + | Verify/add : " |
| <code bash>vi / | <code bash>vi / | ||
| Ligne 41: | Ligne 45: | ||
| </ | </ | ||
| - | ==== cache DNS ==== | + | ==== DNS cache ==== |
| <code bash> | <code bash> | ||
| apt-get install bind9 | apt-get install bind9 | ||
| Ligne 50: | Ligne 54: | ||
| </ | </ | ||
| - | SI PAS D'IPV6 (RQ bug en cours : https:// | + | IF NO IPV6 (RQ bug on jessie |
| <code bash> | <code bash> | ||
| cp -a / | cp -a / | ||
| Ligne 61: | Ligne 65: | ||
| </ | </ | ||
| - | + | ==== Network restart | |
| - | ==== FQDN ==== | + | |
| - | il faut un FQDN valide avec le DNS et le reverse correctement renseignés. | + | |
| - | + | ||
| - | ==== Redémarrage réseau | + | |
| <code bash> | <code bash> | ||
| / | / | ||
| </ | </ | ||
| - | Rq : si le FQDN a changé, redémarrer complètement la machine. | + | Rq : if the FQDN was changed, restart the server. |
| - | ==== Installation de mysql-server ==== | + | ==== mysql-server |
| <code bash> | <code bash> | ||
| apt-get install mysql-server | apt-get install mysql-server | ||
| - | # Nouveau mot de passe du superutilisateur de MySQL : renseigner le mot de passe root mysql (mysql/root) et le mettre dans le fichier | + | # New mysql superuser password : enter and keep safely somwhere |
| apt-get install dbconfig-common | apt-get install dbconfig-common | ||
| </ | </ | ||
| - | ===== Installation | + | ===== postfixadmin / postfix / dovecot |
| - | ==== Configuration des BDD ==== | + | ==== DBs configuration |
| - | Création des bases et users pour postfixadmin | + | DBs and users creation for postfixadmin |
| <code bash> | <code bash> | ||
| echo " | echo " | ||
| Ligne 94: | Ligne 94: | ||
| </ | </ | ||
| - | Préconfiguration | + | dbconfig |
| <code bash> | <code bash> | ||
| cat << ' | cat << ' | ||
| Ligne 118: | Ligne 118: | ||
| </ | </ | ||
| - | ==== Installation de postfixadmin ==== | + | ==== postfixadmin |
| <code bash> | <code bash> | ||
| apt-get install postfixadmin | apt-get install postfixadmin | ||
| - | # Serveur web à reconfigurer automatiquement | + | # auto reconfigure |
| - | #Faut-il configurer la base de données de postfixadmin | + | # reconfigure |
| - | #Type de serveur de bases de données à utiliser avec postfixadmin : mysql | + | # DB server to use with postfixadmin : mysql |
| - | # Mot de passe de l' | + | # DB admin password |
| - | #Action souhaitée pour le fichier de configuration | + | # choose to install the package maintainer |
| </ | </ | ||
| - | ==== Installation de postfix ==== | + | ==== postfix |
| <code bash> | <code bash> | ||
| if [ -e / | if [ -e / | ||
| apt-get install postfix postfix-mysql dovecot-common | apt-get install postfix postfix-mysql dovecot-common | ||
| - | # Configuration | + | # mail server conf type : internet site |
| - | # Nom de courrier | + | # mailserver name : entrer |
| apt-get remove --purge exim4 exim4-base exim4-config exim4-daemon-heavy exim4-daemon-light exim4-config-2 exim4-localscanapi-1.0 exim4-localscanapi-1.1 | apt-get remove --purge exim4 exim4-base exim4-config exim4-daemon-heavy exim4-daemon-light exim4-config-2 exim4-localscanapi-1.0 exim4-localscanapi-1.1 | ||
| rm -rf /etc/exim4 | rm -rf /etc/exim4 | ||
| </ | </ | ||
| - | ==== Installation de dovecot ==== | + | ==== dovecot |
| <code bash> | <code bash> | ||
| apt-get install dovecot-mysql dovecot-sieve dovecot-imapd dovecot-lmtpd dovecot-managesieved | apt-get install dovecot-mysql dovecot-sieve dovecot-imapd dovecot-lmtpd dovecot-managesieved | ||
| </ | </ | ||
| - | ==== Configuration initiale de apache | + | ==== Apache initial configuration |
| - | voir howto correspondant : XXX | + | see corresponding |
| - | ==== Configuration | + | ==== postfixadmin |
| <code bash> | <code bash> | ||
| cp -a / | cp -a / | ||
| Ligne 155: | Ligne 155: | ||
| / | / | ||
| / | / | ||
| - | # verifier le fonctionnement de l' | + | # verify that the webserver is responding |
| vi / | vi / | ||
| - | # changer les champs suivants | + | # change these fields |
| XXX | XXX | ||
| # | # | ||
| $CONF[' | $CONF[' | ||
| + | $CONF[' | ||
| $CONF[' | $CONF[' | ||
| $CONF[' | $CONF[' | ||
| Ligne 178: | Ligne 179: | ||
| </ | </ | ||
| - | **A faire à la main :** | ||
| - | * RQ : si on veut utiliser des scripts de hook, il faut configurer un sudo dessus : " | ||
| - | * Se rendre sur l' | ||
| - | * Générer un nouveau password d' | ||
| - | * L' | ||
| - | * l' | ||
| - | * Vérifier l' | ||
| + | ** Todo by hand :** | ||
| + | * RQ : if you need to use hook scripts, you have to configure a sudoer : " | ||
| + | * go to postfixadmin web interface : http:// | ||
| + | * generate a new admin password, and keep it safely somewhere, click on " | ||
| + | * the web interface proposes to modify the conf file : / | ||
| + | * the web interface proposes to create a new superadmin, do it and keep safely password somewhere | ||
| + | * verify the installation by going to : http:// | ||
| - | ==== Configuration de postfix ==== | + | ==== postfix |
| < | < | ||
| service postfix stop | service postfix stop | ||
| </ | </ | ||
| - | === Les mapping virtuels avec mysql === | + | === virtual mappings with mysql=== |
| < | < | ||
| - | # backup | + | # initial |
| cd / | cd / | ||
| mkdir origin | mkdir origin | ||
| cp -ar ./* origin | cp -ar ./* origin | ||
| - | # configuration liee a postfixadmin | + | # postfixadmin |
| - | # RQ : on a besoin des variables | + | # RQ : we need exported |
| mkdir / | mkdir / | ||
| export PFXSQLCONFDIR=/ | export PFXSQLCONFDIR=/ | ||
| Ligne 279: | Ligne 280: | ||
| </ | </ | ||
| - | === Supprimer l'IP du poste émetteur d' | + | === Remove |
| <code bash> | <code bash> | ||
| cat << ' | cat << ' | ||
| Ligne 289: | Ligne 290: | ||
| </ | </ | ||
| - | === Messages d' | + | === Custom error messages - french |
| <code bash> | <code bash> | ||
| cat << ' | cat << ' | ||
| Ligne 401: | Ligne 402: | ||
| </ | </ | ||
| - | Nettoyer l' | + | Cleanup the safe run postfix |
| <code bash> | <code bash> | ||
| rm / | rm / | ||
| </ | </ | ||
| - | === Fichier | + | === main.cf |
| Ligne 584: | Ligne 585: | ||
| - | === Fichier | + | === master.cf |
| <code bash>vi / | <code bash>vi / | ||
| - | Ajouter | + | add : |
| < | < | ||
| submission inet n - n - - smtpd | submission inet n - n - - smtpd | ||
| Ligne 602: | Ligne 603: | ||
| - | ==== Configuration de dovecot ==== | + | ==== dovecot |
| === mysql / postfixadmin === | === mysql / postfixadmin === | ||
| <code bash> | <code bash> | ||
| Ligne 644: | Ligne 645: | ||
| - | ===== Pour finir ===== | + | ===== At the end... |
| - | **A faire à la main :** | + | **Do by hand :** |
| - | * Editer | + | * Edit / |
| - | * Editer | + | * Edit / |
| - | * Editer | + | * Edit / |
| # (re)start services | # (re)start services | ||
| Ligne 663: | Ligne 664: | ||
| <code bash> | <code bash> | ||
| echo " | echo " | ||
| - | echo " | + | echo " |
| newaliases | newaliases | ||
| </ | </ | ||
| - | Vérification finale que tout s’enchaîne bien : | + | Final verification (all the chain) |
| <code bash> | <code bash> | ||
| # stop mail services | # stop mail services | ||
| Ligne 676: | Ligne 677: | ||
| - | ===== Non traité | + | ===== Not included for the moment |
| - | *quota : table quota2 dans postfixadmin + option | + | * quota : table quota2 dans postfixadmin + option |
| - | *vacation | + | * group mailbox |
| - | *mailbox | + | * lucene/ |
| - | *SIEVE en listen ? revoir config sieve 90-sieve-extprograms.conf 90-sieve.conf 20-managesieve.conf | + | * logging mysql |
| - | *lucene/ | + | |
| - | *logging mysql | + | |
infrastructure/serveur_mail/partie_1/debian_jessie_postfix_dovecot.1445090050.txt.gz · Dernière modification : 2015/10/17 13:54 de ghusson