X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=c61af86c73725bdfe9a4a367947ec1700610b44d;hb=e190e2817c53fa6b45bfbff3e579b50022196750;hp=c64271057c1843877b48441125a5840b53b3da3b;hpb=36ec6375d4ce875d68303580346db9b1e73f078e;p=postfix-cn.git diff --git a/debian/postinst b/debian/postinst index c642710..c61af86 100755 --- a/debian/postinst +++ b/debian/postinst @@ -5,8 +5,9 @@ set -e [ "$1" = "configure" ] || exit 0 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx -# Load CARNet Tools +# Load CARNET Tools . /usr/share/carnet-tools/functions.sh + # Load Debconf . /usr/share/debconf/confmodule @@ -93,6 +94,14 @@ if [ -f /etc/postfix/master.cf ]; then "s/# $option/$option/g" \ /etc/postfix/master.cf || true done + + for option in "o smtpd_client_restrictions=" \ + "o smtpd_helo_restrictions=" \ + "o smtpd_sender_restrictions="; do + cp_check_and_sed "$option" \ + "s/.*$option/# -$option/g" \ + /etc/postfix/master.cf || true + done fi # ovo manje/vise uzima kao default, ali u slucaju da je multihomed stroj, @@ -106,10 +115,11 @@ postconf -e append_dot_mydomain="yes" postconf -e append_at_myorigin="yes" # dodaj 127.0.0.0/8, netaddr i ipv6-localhost +# dodaje izlazne servere za webmail --zelja mynetworks="`postconf -h mynetworks`" -for i in "127.0.0.0/8" "$netaddr" "[::1]/128"; do +for i in "127.0.0.0/8" "\[::1\]/128" "$netaddr" "193.198.233.95" "193.198.233.96"; do if ! echo $mynetworks | grep -q $i; then - mynetworks="$mynetworks $i" + mynetworks="$mynetworks, $i" fi done postconf -e mynetworks="$mynetworks" @@ -280,10 +290,10 @@ fi # TLS stuff postconf -e smtp_tls_security_level="may" -postconf -e smtp_tls_session_cache_database="sdbm:/var/lib/postfix/smtp_scache" +postconf -e smtp_tls_session_cache_database="btree:/var/lib/postfix/smtp_scache" postconf -e smtp_tls_session_cache_timeout="3600s" postconf -e smtpd_tls_security_level="may" -postconf -e smtpd_tls_session_cache_database="sdbm:/var/lib/postfix/smtpd_scache" +postconf -e smtpd_tls_session_cache_database="btree:/var/lib/postfix/smtpd_scache" postconf -e smtpd_tls_session_cache_timeout="3600s" postconf -e tls_random_source="dev:/dev/urandom" postconf -e smtpd_tls_exclude_ciphers="aNULL" @@ -381,6 +391,9 @@ if [ -x /usr/share/postfix-cn/make-aliases-gecos.sh ]; then fi fi +# rjesava gresku using backwards-compatible default setting chroot=y +postconf -F smtp/inet/chroot=y && restart_postfix="yes" + # restart if [ "$restart_postfix" = "yes" ]; then service postfix restart