cannot get RSA private key from file : disabling TLS support

After the migration of the mail server I see this error in mail.log when I try to send mails from smtps. It’s very strange but I found solution .

postfix/smtpd[21796]: warning: cannot get RSA private key from file /etc/postfix/smtpd.key: disabling TLS support
In my main.cnf the certificate lines are:


smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

and here are my fix:

Run this command:

make-ssl-cert generate-default-snakeoil --force-overwrite

then :
/etc/init.d/postfix restart

Now everything is ok. I think the problem is because i copy/paste the hole postfix dir from the old mail server and the certificates are not the same or something.. nevermind , is ok now 😀