Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| applications:postfix [Le 13/01/2007, 21:43] – Modification de la structure et de la forme (bcp d'anglicisme) màj charlax | applications:postfix [Le 18/04/2007, 18:53] (Version actuelle) – effacée _Enchained | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| - | Traduit Par [[utilisateurs: | ||
| - | |||
| - | === Introduction === | ||
| - | |||
| - | Postfix c'est l' | ||
| - | |||
| - | === Installation === | ||
| - | |||
| - | Pour installer Postfix avec SMTP-AUTH et TLS vous devez faire: | ||
| - | |||
| - | apt-get install postfix postfix-tls libsasl2 sasl2-bin libsasl2-modules libdb3-util procmail | ||
| - | |||
| - | |||
| - | === Configuration === | ||
| - | |||
| - | Pour la configuration tappez: | ||
| - | dpkg-reconfigure postfix | ||
| - | |||
| - | |||
| - | Et insérez les détails suivant quand on vous les demande (replacer server1.example.com par votre nom de domaine): | ||
| - | | ||
| - | NONE | ||
| - | | ||
| - | | ||
| - | No | ||
| - | | ||
| - | 0 | ||
| - | + | ||
| - | |||
| - | Ensuite faire les commandes suivantes: | ||
| - | |||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | echo ' | ||
| - | echo ' | ||
| - | | ||
| - | mkdir / | ||
| - | cd / | ||
| - | openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024 | ||
| - | chmod 600 smtpd.key | ||
| - | openssl req -new -key smtpd.key -out smtpd.csr | ||
| - | openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt | ||
| - | openssl rsa -in smtpd.key -out smtpd.key.unencrypted | ||
| - | mv -f smtpd.key.unencrypted smtpd.key | ||
| - | openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650 | ||
| - | | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | postconf -e ' | ||
| - | | ||
| - | |||
| - | Le fichier / | ||
| - | |||
| - | # See / | ||
| - | |||
| - | smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | ||
| - | biff = no | ||
| - | |||
| - | # appending .domain is the MUA's job. | ||
| - | append_dot_mydomain = no | ||
| - | | ||
| - | # Uncomment the next line to generate " | ||
| - | # | ||
| - | | ||
| - | myhostname = server1.example.com | ||
| - | alias_maps = hash:/ | ||
| - | alias_database = hash:/ | ||
| - | myorigin = / | ||
| - | mydestination = server1.example.com, | ||
| - | relayhost = | ||
| - | mynetworks = 127.0.0.0/8 | ||
| - | mailbox_size_limit = 0 | ||
| - | recipient_delimiter = + | ||
| - | inet_interfaces = all | ||
| - | smtpd_sasl_local_domain = | ||
| - | smtpd_sasl_auth_enable = yes | ||
| - | smtpd_sasl_security_options = noanonymous | ||
| - | broken_sasl_auth_clients = yes | ||
| - | smtpd_recipient_restrictions = permit_sasl_authenticated, | ||
| - | smtpd_tls_auth_only = no | ||
| - | smtp_use_tls = yes | ||
| - | smtpd_use_tls = yes | ||
| - | smtp_tls_note_starttls_offer = yes | ||
| - | smtpd_tls_key_file = / | ||
| - | smtpd_tls_cert_file = / | ||
| - | smtpd_tls_CAfile = / | ||
| - | smtpd_tls_loglevel = 1 | ||
| - | smtpd_tls_received_header = yes | ||
| - | smtpd_tls_session_cache_timeout = 3600s | ||
| - | tls_random_source = dev:/ | ||
| - | |||
| - | |||
| - | Redémarrez le démon avec cette commande: | ||
| - | |||
| - | / | ||
| - | |||
| - | === Authentification === | ||
| - | |||
| - | L' | ||
| - | |||
| - | Il est possible de changer quelques détails pour le faire fonctionner proprement. Postfix exécutant " | ||
| - | |||
| - | |||
| - | mkdir -p / | ||
| - | rm -fr / | ||
| - | |||
| - | Maintenant éditez / | ||
| - | | ||
| - | |||
| - | # This needs to be uncommented before saslauthd will be run automatically | ||
| - | START=yes | ||
| - | | ||
| - | PARAMS=" | ||
| - | | ||
| - | # You must specify the authentication mechanisms you wish to use. | ||
| - | # This defaults to " | ||
| - | # " | ||
| - | # MECHANISMS=" | ||
| - | | ||
| - | MECHANISMS=" | ||
| - | |||
| - | ''' | ||
| - | |||
| - | Finallement vous devez éditer / | ||
| - | |||
| - | |||
| - | dir=`dpkg-statoverride --list $PWDIR` | ||
| - | |||
| - | en | ||
| - | |||
| - | # | ||
| - | |||
| - | |||
| - | Ensuite changez la variable PWDIR et PIDFILE et ajoutez la variable dir au début du fichier: | ||
| - | |||
| - | |||
| - | PWDIR="/ | ||
| - | PIDFILE=" | ||
| - | dir=" | ||
| - | |||
| - | === Les tests === | ||
| - | Maintenant démarrez saslauthd: | ||
| - | |||
| - | / | ||
| - | |||
| - | pour voir si SMTP-AUTH et TLS fonctionne correctement tapez cette commande : | ||
| - | |||
| - | telnet localhost 25 | ||
| - | |||
| - | Ensuite après avoir établi la connexion avec postfix tapez : | ||
| - | |||
| - | EHLO somename.tld | ||
| - | |||
| - | Si vous voyez ces lignes | ||
| - | |||
| - | 250-STARTTLS | ||
| - | 250-AUTH | ||
| - | |||
| - | Ça fonctionne!!! | ||
| - | |||
| - | Tapez | ||
| - | quit | ||
| - | |||
| - | Pour retourner dans l' | ||
