steffen: server/kolab/kolab kolab_smtpdpolicy,1.2,1.3
cvs at intevation.de
cvs at intevation.de
Tue Jun 15 03:52:07 CEST 2004
Author: steffen
Update of /kolabrepository/server/kolab/kolab
In directory doto:/tmp/cvs-serv29080/kolab
Modified Files:
kolab_smtpdpolicy
Log Message:
updated version + resource fixes
Index: kolab_smtpdpolicy
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/kolab_smtpdpolicy,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- kolab_smtpdpolicy 14 Jun 2004 11:05:18 -0000 1.2
+++ kolab_smtpdpolicy 15 Jun 2004 01:52:05 -0000 1.3
@@ -120,9 +120,8 @@
my $sender = $attr{'sender'};
my $recip = $attr{'recipient'};
my $username = $attr{'sasl_username'};
- my $mydomain = $Kolab::config{'postfix-mydomain'};
- mylog($syslog_priority, "Checking sender=\"$sender\", recipient=\"$recip\", username=\"$username\"") if $verbose;
+ mylog($syslog_priority, "Checking sender=\"$sender\", recipient=\"$recip\", username=\"$username\", domains=".join(',',$conf_domain)) if $verbose;
#### This should probably be simplifed to
#### reject sender <anything>@domain.tld if the user is
@@ -131,7 +130,8 @@
# Check for allowed sender
CHECKSENDER:
- if( $sender =~ /.*@$mydomain/ ) {
+ my $reg = '.*@('.join('|', at conf_domain).')';
+ if( $sender =~ /$reg/ ) {
my $mesg = $ldap->search( base=> $conf_ldapbase,
scope=> 'sub', filter=> "(&(mail=$sender)(objectclass=kInetOrgPerson))");
if( !$mesg->code ) {
@@ -221,6 +221,8 @@
$conf_ldapuri = shift(@ARGV);
} elsif ($option eq '-base') {
$conf_ldapbase = shift(@ARGV);
+ } elsif ($option eq '-domain') {
+ push @conf_domain, shift(@ARGV);
} else {
mylog( $syslog_priority, "Invalid option: %s. Usage: %s [-v] -ldap <uri> -base <base_dn>",
$option, $0);
More information about the commits
mailing list