I am like 95% done my shell script to install a Debian mail server from a fresh install, this is based on my currently running mailserver that I know to be working. What I have done is I have captured user input for the required info for the SSL but every time I try to generate the SSL unattended with openssl it fails. Any chance someone can help me? I have tried the following which works for mysql changes but didnt work for me.
openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/postfix.pem -keyout /etc/ssl/private/postfix.pem<<EOF
$country
$state
$city
$org
$unit
$commonname
$email
EOF
This gets me as far as this and then I have to hit enter... not cool as I need to not have to hit anything. Any ideas?
It's easy to create a self-signed certificate. You just use the openssl req command.
What I've used with SaltStack is:
openssl req -new -x509 -days 365 -nodes \
-out /etc/ssl/certs/postfix.pem \
-keyout /etc/ssl/private/postfix.pem \
-subj "/C=RO/ST=Bucharest/L=Bucharest/O=IT/CN=www.example.ro"
Credit go to Sean P. Kane.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With