Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
linux:postfix [12-07-2013 15:51] edmc73 |
linux:postfix [07-11-2016 09:55] edmc73 [DKIM] |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Postfix ====== | ====== Postfix ====== | ||
- | http:// | + | * http:// |
+ | * http:// | ||
+ | * http:// | ||
- | http://www.system-linux.eu/index.php? | + | Un super site en français => http://x.guimard.free.fr/postfix/ |
+ | ===== Configuration ===== | ||
+ | Au départ voici les fichiers que vous avez | ||
+ | :/ | ||
+ | dynamicmaps.cf | ||
+ | |||
+ | Au final vous aurez | ||
+ | :/ | ||
+ | dynamicmaps.cf | ||
+ | |||
+ | ==== dynamicmaps.cf ==== | ||
+ | :!: Je ne l' | ||
+ | |||
+ | ==== generic et generic.db ==== | ||
+ | Permet de renommer l' | ||
+ | root@edmc73.com | ||
+ | www-data@edmc73.com webmaster@edmc73.com | ||
+ | |||
+ | Les mails envoyés par l' | ||
+ | |||
+ | Ajouter dans le fichier de conf **/ | ||
+ | smtp_generic_maps = hash:/ | ||
+ | |||
+ | Exemple de fichier **/ | ||
+ | his@localdomain.local | ||
+ | her@localdomain.local | ||
+ | @localdomain.local | ||
+ | |||
+ | Ne pas oublier d' | ||
+ | postmap / | ||
+ | | ||
+ | Et de recharger la config de postfix | ||
+ | service postfix reload | ||
+ | |||
+ | ==== main.cf ==== | ||
+ | **main.cf** est le fichier de configuration principal. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== master.cf ==== | ||
+ | |||
+ | Rien à faire de spécial | ||
+ | |||
+ | ==== postfix-files, | ||
+ | |||
+ | Ne pas toucher | ||
+ | |||
+ | ==== sasl ==== | ||
+ | |||
+ | Sert à sécuriser le SMTP. Assez compliqué, plus d'info => http:// | ||
+ | |||
+ | ==== transport et transport.db ==== | ||
+ | Typiquement, | ||
+ | |||
+ | Dans le cas des mails envoyés vers orange et wanadoo, il faut ralentir le trafic sous peine d' | ||
+ | wanadoo.com slow: | ||
+ | wanadoo.fr slow: | ||
+ | orange.com slow: | ||
+ | orange.fr slow: | ||
+ | |||
+ | suivi de la commande | ||
+ | postmap transport | ||
+ | |||
+ | On rajoutera à la fin du fichier **master.cf** | ||
+ | # | ||
+ | # service type private unpriv chroot wakeup maxproc command + args | ||
+ | # (yes) (yes) (yes) (never) (100) | ||
+ | # | ||
+ | slow unix - - n - 5 smtp -o syslog_name=postfix-slow -o smtp_destination_concurrency_limit=3 -o slow_destination_rate_delay=1 | ||
+ | |||
+ | Puis ceci dans le fichier **main.cf** | ||
+ | transport_maps = hash:/ | ||
+ | slow_destination_recipient_limit = 20 | ||
+ | slow_destination_concurrency_limit = 2 | ||
+ | |||
+ | On relis la config | ||
+ | service postfix reload | ||
+ | |||
+ | ==== mailname ==== | ||
+ | |||
+ | Le fichier **/ | ||
+ | myorigin = / | ||
===== Commandes ===== | ===== Commandes ===== | ||
Ligne 62: | Ligne 146: | ||
http:// | http:// | ||
+ | |||
+ | DÉTAILS DE LA SOLUTION : TRANSPORT SPÉCIFIQUE POUR ORANGE/ | ||
+ | |||
+ | vi / | ||
+ | |||
+ | wanadoo.com slow: | ||
+ | wanadoo.fr slow: | ||
+ | orange.com slow: | ||
+ | orange.fr slow: | ||
+ | |||
+ | puis | ||
+ | postmap / | ||
+ | |||
+ | vi / | ||
+ | |||
+ | < | ||
+ | # service type private unpriv chroot wakeup maxproc command + args | ||
+ | # (yes) (yes) (yes) (never) (100) | ||
+ | # | ||
+ | slow unix - - n - 5 smtp -o syslog_name=postfix-slow -o smtp_destination_concurrency_limit=3 -o slow_destination_rate_delay=1</ | ||
+ | |||
+ | vi / | ||
+ | | ||
+ | < | ||
+ | slow_destination_recipient_limit = 20 | ||
+ | slow_destination_concurrency_limit = 2</ | ||
+ | |||
+ | et finalement : | ||
+ | / | ||
+ | |||
+ | Les mails se stockent tout de même en queue, mais la file se vide ensuite relativement rapidement | ||
+ | |||
+ | ===== Statistiques ===== | ||
+ | |||
+ | https:// | ||
+ | |||
+ | Ce lien explique comment superviser postfix avec zabbix mais on peut découvrir aussi le script **pflogsumm.pl** qui permet de ressortir des stats. | ||
+ | |||
+ | ===== DKIM ===== | ||
+ | |||
+ | Ajouter une signature DKIM à vos emails sortant => http:// | ||
+ | |||
+ | Un autre tuto très bien détaillé => http:// |