Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
linux:postfix [18-02-2017 00:12] edmc73 [DKIM] |
linux:postfix [06-05-2023 20:50] edmc73 |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
====== Postfix ====== | ====== Postfix ====== | ||
+ | ===== Fonctionnement de base juste pour envoyer des mails ===== | ||
+ | |||
+ | La config **/ | ||
+ | |||
+ | < | ||
+ | # See / | ||
+ | |||
+ | |||
+ | # Debian specific: | ||
+ | # line of that file to be used as the name. The Debian default | ||
+ | # is / | ||
+ | #myorigin = / | ||
+ | |||
+ | smtpd_banner = $myhostname ESMTP $mail_name (Raspbian) | ||
+ | biff = no | ||
+ | |||
+ | # appending .domain is the MUA's job. | ||
+ | append_dot_mydomain = no | ||
+ | |||
+ | # Uncomment the next line to generate " | ||
+ | # | ||
+ | |||
+ | readme_directory = no | ||
+ | |||
+ | # See http:// | ||
+ | # fresh installs. | ||
+ | compatibility_level = 2 | ||
+ | |||
+ | |||
+ | |||
+ | # TLS parameters | ||
+ | smtpd_tls_cert_file=/ | ||
+ | smtpd_tls_key_file=/ | ||
+ | smtpd_tls_security_level=may | ||
+ | |||
+ | smtp_tls_CApath=/ | ||
+ | smtp_tls_security_level=may | ||
+ | smtp_tls_session_cache_database = btree: | ||
+ | smtpd_use_tls = yes | ||
+ | smtpd_enforce_tls = yes | ||
+ | |||
+ | smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination | ||
+ | myhostname = myserver.edmc73.com | ||
+ | alias_maps = hash:/ | ||
+ | alias_database = hash:/ | ||
+ | canonical_maps = hash:/ | ||
+ | myorigin = / | ||
+ | mydestination = $myhostname, | ||
+ | relayhost = | ||
+ | mynetworks = 127.0.0.0/8 | ||
+ | mailbox_size_limit = 0 | ||
+ | recipient_delimiter = + | ||
+ | inet_interfaces = 127.0.0.1 | ||
+ | inet_protocols = all | ||
+ | |||
+ | </ | ||
+ | |||
+ | J'ai volontairement désactivé tout ce qui est en rapport avec ipv6 car trop compliqué... | ||
+ | |||
+ | J'ai ajouté les options tls et le **canonical_maps** | ||
+ | |||
+ | Modifiez vos aliases en ajoutant à la fin du fichier **/ | ||
+ | root: mon@mail.com | ||
+ | |||
+ | Puis lancer la commande | ||
+ | newaliases | ||
+ | | ||
+ | Créez ou modifiez le fichier **/ | ||
+ | root@myserver | ||
+ | |||
+ | Puis lancer la commande | ||
+ | postmap / | ||
+ | |||
+ | Relancer Postfix | ||
+ | systemctl restart postfix | ||
+ | |||
+ | Tester l' | ||
+ | mail -s "test d'un mail" root <<< | ||
+ | |||
+ | Vérifiez dans les log | ||
+ | vi / | ||
+ | |||
+ | ===== Ce qui suit date ! ===== | ||
* http:// | * http:// | ||
* http:// | * http:// |