Fix user alias creation for non default domains

master
Daniel Berteaud 5 years ago
parent 2c4e81f70b
commit 4f96f4d44a
  1. 4
      zmldapsync/zmldapsync.pl

@ -419,8 +419,8 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
foreach my $alias ( @ext_aliases ) {
next if ( not alias_matches_domain( $alias, $domain_entry ) );
next if ( grep { $alias eq $_ } @{ $zim_users->{$user}->{mail} } );
log_verbose( "Creating alias $alias for user $user" );
send_zmprov_cmd( "addAccountAlias $user $alias" );
log_verbose( "Creating alias $alias for user $user\@$domain" );
send_zmprov_cmd( "addAccountAlias $user\@$domain $alias" );
}
# On each sync, we register the list of LDAP aliases into Zimbra's LDAP in the zimbraNotes attribute

Loading…
Cancel
Save