From 2f52692a8b1a08fd5ff9becba0cafe5fadfb2b6a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 17 Jul 2019 12:42:30 +0200 Subject: [PATCH] Fix dedup aliases --- zmldapsync/zmldapsync.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index 4a33680..5cb93c4 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -389,7 +389,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { @{ $ext_users->{$user}->{$conf->{domains}->{$domain}->{users}->{$mail_attr}} }; } - @ext_aliases = sort uniq @ext_aliases; + @ext_aliases = uniq( sort @ext_aliases ); foreach my $alias ( @ext_aliases ) { next if ( not alias_matches_domain( $alias, $domain_entry ) ); @@ -631,7 +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; + @ext_aliases = uniq( sort @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} } );