From 1f9b9c6276c5c73ec90f66cbc8dfaefe6bab4255 Mon Sep 17 00:00:00 2001 From: Steven Mondji-Lerider Date: Fri, 8 Mar 2013 11:26:04 +0000 Subject: [PATCH] Updating alternc.install to check the ssl cert file --- install/alternc.install | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/install/alternc.install b/install/alternc.install index d8dc3110..ddf3adb8 100644 --- a/install/alternc.install +++ b/install/alternc.install @@ -356,8 +356,25 @@ else postfix_conf=/etc/alternc/postfix/postfix.cf fi grep -v '^\ *#' $postfix_conf |while read line ; do - postconf -e "$line" -done + if echo "$line" | grep -qi '^smtpd_tls_cert_file' ;then + line_strip=`echo "$line"|tr -d '[:blank:]'` + pattern="*=" + cert_file=${line_strip#$pattern} + if [ -e $cert_file ];then + postconf -e "$line" + else + echo "****************************************" + echo "The certificate file : $cert_file does not exists" + echo "please go to https://alternc.org/wiki/SSL to get information on how to create a certificate" + echo "Then edit the file /etc/alternc/postfix/postfix.cf to add" + echo "the cert file path name to the key :smtpd_tls_cert_file" + echo "Finally relaunch alternc.install" + echo "****************************************" + fi + else + postconf -e "$line" + fi +done # Conviguring delivery used by Postfix /usr/lib/alternc/alternc_add_policy_dovecot