Compare commits

..

2 Commits

  1. 10
      zmldapsync/zmldapsync.pl

@ -9,6 +9,7 @@ use Getopt::Long;
use Data::UUID;
use String::ShellQuote qw(shell_quote);
use Array::Diff;
use List::MoreUtils qw(uniq);
use Hash::Merge::Simple qw(merge);
use Text::Unidecode;
use Email::MIME;
@ -295,8 +296,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
log_verbose( "Comparing the accounts" );
my $single = map { $conf->{domains}->{$domain}->{users}->{attr_map}->{$_} }
keys $conf->{domains}->{$domain}->{users}->{attr_map};
my @single = keys $conf->{domains}->{$domain}->{users}->{attr_map};
push @single, $conf->{domains}->{$domain}->{users}->{mail_attr};
my $ext_users = ldap2hashref(
$ext_user_search,
@ -389,7 +389,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
@{ $ext_users->{$user}->{$conf->{domains}->{$domain}->{users}->{$mail_attr}} };
}
@ext_aliases = sort @ext_aliases;
@ext_aliases = sort uniq @ext_aliases;
foreach my $alias ( @ext_aliases ) {
next if ( not alias_matches_domain( $alias, $domain_entry ) );
@ -502,8 +502,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
" distribution list(s) in Zimbra" );
log_verbose( "Comparing groups with distribution lists" );
my @single = map { $conf->{domains}->{$domain}->{groups}->{attr_map}->{$_} }
keys $conf->{domains}->{$domain}->{groups}->{attr_map};
my @single = keys $conf->{domains}->{$domain}->{groups}->{attr_map};
push @single, $conf->{domains}->{$domain}->{groups}->{mail_attr};
my $ext_groups = ldap2hashref(
@ -632,6 +631,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) {
push @ext_aliases,
@{ $ext_groups->{$group}->{$conf->{domains}->{$domain}->{groups}->{$mail_attr}} };
}
@ext_aliases = sort uniq @ext_aliases;
foreach my $alias ( @ext_aliases ) {
next if ( not alias_matches_domain( $alias, $domain_entry ) );
next if ( grep { $alias eq $_ } @{ $zim_dl->{$group}->{mail} } );

Loading…
Cancel
Save