rijesena poruka 'compatibility mode' za sve servise, newaliases-gecos, dodan eta...
[postfix-cn.git] / debian / postinst
index cde2e48..818ecff 100755 (executable)
@@ -5,7 +5,7 @@ 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
@@ -94,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,
@@ -376,15 +384,20 @@ rm -f /etc/postfix/main.cf.dpkg-tmp.$$
 #fi
 
 # kreiraj aliases_gecos
-if [ -x /usr/share/postfix-cn/make-aliases-gecos.sh ]; then
+if [ -x /usr/sbin/newaliases-gecos ]; then
   if [ "$matchgecos" = "true" ]; then
     echo "CN: Creating GECOS alias map..."
-    /usr/share/postfix-cn/make-aliases-gecos.sh
+    /usr/sbin/newaliases-gecos
   fi
 fi
 
 # rjesava gresku using backwards-compatible default setting chroot=y
-postconf -F smtp/inet/chroot=y && restart_postfix="yes"
+
+for service in smtp/inet smtp/unix submission/inet pickup/fifo cleanup/unix qmgr/fifo rewrite/unix bounce/unix defer/unix trace/unix verify/unix flush/unix relay/unix showq/unix error/unix scache/unix discard/unix retry/unix
+do
+       postconf -F $service/chroot=y
+done   
+restart_postfix="yes"
 
 # restart 
 if [ "$restart_postfix" = "yes" ]; then