ispman/bin ispman.postfix.makemaps,1.9,1.10

Joerg Delker <[email protected]>
Newsgroups gmane.comp.isp.ispman.cvs
Message-ID <[email protected]>
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19263

Modified Files:
	ispman.postfix.makemaps 
Log Message:
changed generation of postfix maps according to bug [972117]


Index: ispman.postfix.makemaps
===================================================================
RCS file: /cvsroot/ispman/ispman/bin/ispman.postfix.makemaps,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ispman.postfix.makemaps	30 May 2004 23:35:32 -0000	1.9
+++ ispman.postfix.makemaps	13 Jun 2004 15:48:12 -0000	1.10
@@ -26,16 +26,28 @@
         next unless $_;
         $domain_info = $ispman->getDomainInfo($_);
 
-#$relay_map->{$_}=$_ if ($domain_info->{'ispmanDomainMailDeliveryMethod'} eq "smtp");
-#Allow relaying from these domains.
-        $relay_map->{$_} = $_;
-        $dest_map->{$_}  = $_
-          if grep ( /mail/,
-            $ispman->as_array( $domain_info->{'ispmanDomainService'} ) );
-        $canonical_map->{"\@$_"} = join "",
-          ( '@', $domain_info->{'ispmanReplicaMaster'} )
-          if $domain_info->{'ispmanReplicaMaster'};
-        $transport_map->{$_} = $ispman->getTransportMap($_);
+        # generate maps for domain if mail service is enabled
+        if (
+            grep ( /mail/,
+                $ispman->as_array( $domain_info->{'ispmanDomainService'} ) )
+          )
+        {
+
+           # add domain to relay or destination map depending on delivery method
+            if ( $domain_info->{'ispmanDomainMailDeliveryMethod'} eq "smtp" ) {
+                $relay_map->{$_} = $_;
+            }
+            else {
+                $dest_map->{$_} = $_;
+            }
+
+            if ( $domain_info->{'ispmanReplicaMaster'} ) {
+                $canonical_map->{"\@$_"} = join "",
+                  ( '@', $domain_info->{'ispmanReplicaMaster'} );
+            }
+
+            $transport_map->{$_} = $ispman->getTransportMap($_);
+        }
     }
     write_map( "$smtpServerConfDir/canonical",           $canonical_map );
     write_map( "$smtpServerConfDir/relay_domains",       $relay_map );



-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.