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