X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=e02759cec0620a22cb5c0af8d23c00ba548b3552;hb=0425a071bf6c08b013b9dcd92f03fe0c2e5067ad;hp=0d75081e6f8a19364e9e36ffca65b9a6ce3c52fe;hpb=d78f12c6bd8a4ec6ef0eee12dd9a8551fd57766f;p=dovecot-cn.git diff --git a/debian/postinst b/debian/postinst index 0d75081..e02759c 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 @@ -14,6 +16,12 @@ cp_check_and_sed 'disable_plaintext_auth.*yes' \ 's/disable_plaintext_auth.*$/disable_plaintext_auth = no/g' \ /etc/dovecot/conf.d/10-auth.conf || true +if ! grep -q "mail_privileged_group.*mail$" /etc/dovecot/conf.d/10-mail.conf \ + cp_check_and_sed 'mail_privileged_group' \ + 's/mail_privileged_group.*$/mail_privileged_group = mail/g' \ + /etc/dovecot/conf.d/10-mail.conf || true +fi + cp_check_and_sed '#imap_client_workarounds' \ 's/#imap_client_workarounds/imap_client_workarounds/g' \ /etc/dovecot/conf.d/20-imap.conf || true @@ -31,7 +39,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 @@ -49,7 +62,7 @@ if ! grep -q ^ssl_cert /etc/dovecot/conf.d/10-ssl.conf \ 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 2>&1 > /dev/null + /usr/share/dovecot-cn/mkcert.sh || true fi cp_check_and_sed '#ssl_cert =