X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=a26e2a97d1c20b6edb41685121f6947c4ce07ee6;hb=c2b23b8f4c0b35952a973f234744890bf8ab3c24;hp=6ecc8f60a2b9f3ff9158d6e5fec2bf914e734e65;hpb=a80671d5f813a53e6199cd63c7db8e89ba8c0d87;p=dovecot-cn.git diff --git a/debian/postinst b/debian/postinst index 6ecc8f6..a26e2a9 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/sh + +set -e [ "$1" = "configure" ] || exit 0 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx @@ -31,7 +33,12 @@ cp_check_and_sed 'pop3_client_workarounds' \ /etc/dovecot/conf.d/20-pop3.conf || true cp_check_and_sed '#ssl_cipher_list' \ - 's/#ssl_cipher_list.*/ssl_cipher_list = ALL:!aNULL:!eNULL:!ADH!LOW:!MEDIUM:!EXP:!SSLv2:HIGH/g' \ + 's/#ssl_cipher_list.*/ssl_cipher_list = ALL:!aNULL:!eNULL:!ADH!LOW:!MEDIUM:!EXP:HIGH/g' \ + /etc/dovecot/conf.d/10-ssl.conf || true + +# izbacujemo SSLv2 +cp_check_and_sed 'ssl_cipher_list' \ + 's/:\!SSLv2//g' \ /etc/dovecot/conf.d/10-ssl.conf || true # trazio zelja @@ -46,30 +53,78 @@ cp_check_and_sed 'ssl = no' \ if ! grep -q ^ssl_cert /etc/dovecot/conf.d/10-ssl.conf \ && ! grep -q ^ssl_key /etc/dovecot/conf.d/10-ssl.conf; then + + if [ ! -f /etc/dovecot/dovecot.pem -a ! -f /etc/dovecot/private/dovecot.pem ]; then + echo "CN: Generating certificate and key..." + /usr/share/dovecot-cn/mkcert.sh || true + fi + cp_check_and_sed '#ssl_cert = /dev/null + # negdje se pojavljuje dovecot.key umjesto dovecot.pem + cp_check_and_sed 'ssl_key =