|
|
|
@ -129,10 +129,8 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { |
|
|
|
|
my $domain_entry = ldap2hashref( $zim_domain_search, 'zimbraDomainName' )->{$domain}; |
|
|
|
|
|
|
|
|
|
# Check if auth is set to ad or ldap |
|
|
|
|
if ( |
|
|
|
|
not defined $domain_entry->{zimbraAuthMech} or |
|
|
|
|
$domain_entry->{zimbraAuthMech} !~ m/^ad|ldap$/i |
|
|
|
|
) { |
|
|
|
|
if ( not defined $domain_entry->{zimbraAuthMech} or |
|
|
|
|
$domain_entry->{zimbraAuthMech} !~ m/^ad|ldap$/i ) { |
|
|
|
|
if ( yaml_bool( $conf->{domains}->{$domain}->{zimbra}->{setup_ldap_auth} ) ) { |
|
|
|
|
send_zmprov_cmd( "modifyDomain $domain " . build_domain_attrs( $conf->{domains}->{$domain} ) ); |
|
|
|
|
} else { |
|
|
|
@ -186,7 +184,8 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { |
|
|
|
|
log_verbose( "StartTLS succeeded" ); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ( defined $conf->{domains}->{$domain}->{ldap}->{bind_dn} and defined $conf->{domains}->{$domain}->{ldap}->{bind_pass} ) { |
|
|
|
|
if ( defined $conf->{domains}->{$domain}->{ldap}->{bind_dn} and |
|
|
|
|
defined $conf->{domains}->{$domain}->{ldap}->{bind_pass} ) { |
|
|
|
|
log_verbose( "Trying to bind as " . $conf->{domains}->{$domain}->{ldap}->{bind_dn} ); |
|
|
|
|
my $bind = $ext_ldap->bind( |
|
|
|
|
$conf->{domains}->{$domain}->{ldap}->{bind_dn}, |
|
|
|
|