# Load CARNet Tools
. /usr/share/carnet-tools/functions.sh
+
# Load Debconf
. /usr/share/debconf/confmodule
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"
# 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