- spajanje konfiguracije sa Postfix listom iz mynetworks
authorDinko Korunic <kreator@carnet.hr>
Tue, 31 Mar 2009 11:32:40 +0000 (13:32 +0200)
committerDinko Korunic <kreator@carnet.hr>
Tue, 31 Mar 2009 11:32:40 +0000 (13:32 +0200)
debian/changelog
debian/postinst

index 016445b..6f6a9df 100644 (file)
@@ -1,3 +1,9 @@
+spamassassin-cn (2:3.2.5-6) stable; urgency=low
+
+  * spajanje IP klasa iz mynetworks Postfix konfiguracije u trusted_networks
+
+ -- Dinko Korunic <kreator@carnet.hr>  Tue, 31 Mar 2009 12:59:44 +0200
+
 spamassassin-cn (2:3.2.5-5) stable; urgency=low
 
   * ciscenje 127.0.0.0/8 iz trusted_networks konfiguracije
index c6e4e1c..e931e54 100755 (executable)
@@ -211,6 +211,14 @@ if [ -f $examdir/local.cf ]; then
             trusted_networks="$trusted_networks $i"
         fi
     done
+    # ... merge with Postfix ranges
+    if [ -x /usr/sbin/postconf ]; then
+        for i in $(postconf -h mynetworks); do
+            if ! echo "$trusted_networks" | grep -q "$i"; then
+                trusted_networks="$trusted_networks $i"
+            fi
+        done
+    fi
     # ... strip 127/8 range
     for i in $trusted_networks; do
         if ! echo "$i" | grep -q "127.0.0.0/8"; then