je n'arrive vraiment pas a faire fonctionner le TLS avec postix..
je suis sous debian j'ai installé par :
apt-get install openssl
apt-get install postfix-tls
j'ai tout réalisé ua niveau de la configuration par rapport au explication du livre:
POSTFIX la Reference de chez O'REILLY par kyle DENT
bien entendu, ça va pas!
j'ai des erreurs de ce type dès que je veux faire du tls
Jan 1 23:45:08 ulysse postfix/smtpd[1722]: 1722:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:662:Expecting: ANY PRIVATE KEY:
Jan 1 23:45:08 ulysse postfix/smtpd[1722]: 1722:error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:missing asn1 eos:ssl_rsa.c:707:
voila mon fichier de configuration main.c
-----------------------------------------------
# see /usr/share/postfix/main.cf.dist for a commented, fuller
# version of this file.
# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no
# Nom de domaine
mydomain = pcd-chimie.com
# Nom d'hote
myhostname = ulysse
# Nom du fichier des alias
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
# appending .domain is the MUA's job.
append_dot_mydomain = no
append_at_myorigin = yes
myorigin = $mydomain
# Masquer les adresses
masquerade_domains = $mydomain
masquerade_exceptions = root
# Liste des domaines acceptes.
mydestination = $myhostname, $mydomain, $myhostname.$mydomain, localhost
# Relais SMTP
relayhost = smtp.wanadoo.fr
# Reseau de confiance
mynetworks = 127.0.0.0/8, 192.168.0.0/24
# Commande pour delivrer les mails en local
mailbox_command = procmail -a "$EXTENSION"
# Taille Max de la boite mail
mailbox_size_limit = 524288000
recipient_delimiter = +
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_key_filE = /etc/postfix/mailkey.pem
smtpd_tls_cert_file = /etc/postfix/mail_signed_cert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_CApath = /etc/postfix/certs
relay_clientcerts = hash:/etc/postfix/clientcerts
smtpd_tls_ask_ccert = yes
# smtpd_recipient_restrictions = permit_mynetworks, permit_tls_clientcerts, reject_unauth_destination
smtpd_recipient_restrictions = permit_tls_all_clientcerts, permit_mynetworks, check_relay_domains
smtpd_tls_session_cache_database = sdbm:/etc/postfix/smtpd_scache
smtpd_tls_loglevel = 3
smtp_use_tls = yes
smtp_tls_key_file = /etc/postfix/mailkey.pem
smtp_tls_cert_file = /etc/postfix/mail_signed_cert.pem
smtp_tls_CAfilE = /etc/postfix/cacert.pem
je v vous donner les commandes tapé pour les clef et certificats..
---------------------------------------------------------------------------
# cd /usr/lib/ssl/misc/
# ./CA.sh -newca
# openssl req -new -nodes -keyout mailkey.pem -out mailreq.pem -days 365
# openssl ca -out mail_signed_cert.pem -infiles mailreq.pem
# mv mailkey.pem /etc/postfix
# mv mail_signed_cert.pem /etc/postfix
# cp ./democa/cacert.pem /etc/postfix
# vi /etc/postfix/main.cf
smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/mailkey.pem
smtpd_tls_cert_file = /etc/postfix/mail_signed_cert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_CApath = /etc/postfix/certs
# postfix reload
# openssl req -new -nodes -keyout webmaster_key.pem -out webmaster_req.pem -days 365
# openssl ca -out webmaster_signed_cert.pem -infiles webmaster_req.pem
# openssl pkcs12 -in webmaster_signed_cert.pem -inkey webmaster_key.pem -certfile /etc/postfix/cacert.pem -out webmaster.p12 -export -name "webmaster@mondomaine.com"
# openssl x509 -fingerprint -noout -in webmaster_signed_cert.pem |cut -d= -f2
# vi /etc/postfix/clientcerts
00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 webmaster@mondomaine.com
# postmap /etc/postfix/clientcerts
# vi /etc/postfix/main.cf
relay_clientcerts = hash:/etc/postfix/clientcerts
smtpd_tls_ask_ccert = yes
smtpd_recipient_restrictions =
permit_mynetworks
permit_tls_clientcerts
reject_unaut_destination
(je l'ai modifier car meme la ça ne marche pas)
# postfix reload
# vi /etc/postfix/main.cf
smtp_use_tls = yes
smtp_tls_key_file = /etc/postfix/mailkey.pem
smtp_tls_cert_file = /etc/postfix/mail_signed_cert.pem
smtp_tls_CAfile = /etc/postfix/cacert.pem
# postfix reload