[ "$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
"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,
# 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"
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