steffen: server/kolab/kolab kolab.schema, 1.16, 1.17 kolab_smtpdpolicy, 1.10, 1.11

cvs at intevation.de cvs at intevation.de
Mon Aug 9 18:11:04 CEST 2004


Author: steffen

Update of /kolabrepository/server/kolab/kolab
In directory doto:/tmp/cvs-serv22939/kolab/kolab

Modified Files:
	kolab.schema kolab_smtpdpolicy 
Log Message:
optionally allow unauthenticated smtp clients to send mail from other domains

Index: kolab.schema
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab.schema,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- kolab.schema	16 Jul 2004 17:18:03 -0000	1.16
+++ kolab.schema	9 Aug 2004 16:11:02 -0000	1.17
@@ -626,6 +626,10 @@
         NAME 'postfix-enable-virus-scan'
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
 
+attributetype ( 1.3.6.1.4.1.19414.2.1.508
+        NAME 'postfix-allow-unauthenticated'
+        SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 )
+
 # imapd specific attributes
 
 attributetype ( 1.3.6.1.4.1.19414.2.1.601
@@ -727,6 +731,7 @@
  		postfix-relayhost $ 
 		postfix-transport $
                	postfix-enable-virus-scan $
+		postfix-allow-unauthenticated $
                	cyrus-autocreatequota $
                	cyrus-quotawarn $
 	      	cyrus-autocreatequota $ 

Index: kolab_smtpdpolicy
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_smtpdpolicy,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- kolab_smtpdpolicy	3 Aug 2004 23:13:14 -0000	1.10
+++ kolab_smtpdpolicy	9 Aug 2004 16:11:02 -0000	1.11
@@ -131,7 +131,7 @@
   my $username    = $attr{'sasl_username'};
   my $client_addr = $attr{'client_address'};
 
-  mylog($syslog_priority, "Checking sender=\"$sender\", recipient=\"$recip\", username=\"$username\", domains=".join(',', at conf_domain)." permithosts=".join(',', at conf_permithosts)) if $verbose;
+  mylog($syslog_priority, "Checking sender=\"$sender\", recipient=\"$recip\", username=\"$username\", domains=".join(',', at conf_domain)." permithosts=".join(',', at conf_permithosts).", conf_allowunauth=$conf_allowunauth") if $verbose;
 
   #### This should probably be simplifed to 
   #### reject sender <anything>@domain.tld if the user is
@@ -170,6 +170,17 @@
     # LDAP error?
     mylog($syslog_priority, "Query returned error: ".$mesg->error ) if $verbose;	
   }
+  if( $conf_allowunauth ) {
+    # Dont reject mail from other domains
+    $sender =~ /(.*)@(.*)/;
+    my $domain = $2;
+    mylog($syslog_priority, "sender=$sender, domain=$domain") if $verbose;
+    if( !contains( $domain, @conf_domain ) ) {
+      # Ok
+      mylog($syslog_priority, "sending from other domains OK") if $verbose;
+      goto CHECKDISTLIST;
+    }
+  }
   # UPS, fake sender
   mylog($syslog_priority, "Attempt to fake address $sender") if $verbose;	
   return "REJECT Invalid sender";
@@ -236,6 +247,7 @@
 #
 # We don't need getopt() for now.
 #
+$conf_allowunauth = 0;
 while ($option = shift(@ARGV)) {
   if ($option eq "-v") {
     $verbose = 1;
@@ -249,6 +261,8 @@
     $conf_bindpw = shift(@ARGV);
   } elsif ($option eq '-domain') {
     push @conf_domain, shift(@ARGV);
+  } elsif ($option eq '-allow-unauth') {
+    $conf_allowunauth = 1;
   } elsif ($option eq '-permithosts') {
     for my $h (split /\s*,\s*/, shift(@ARGV)) {
       push @conf_permithosts, $h;





More information about the commits mailing list