From c80c7fcec222928a1a088a1ad4fa2f685b12f971 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 18 Jul 2019 20:07:49 +0200 Subject: [PATCH] Also exclude system resources from user searches --- zmldapsync/zmldapsync.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zmldapsync/zmldapsync.pl b/zmldapsync/zmldapsync.pl index 733f46a..fa28bd8 100644 --- a/zmldapsync/zmldapsync.pl +++ b/zmldapsync/zmldapsync.pl @@ -266,7 +266,7 @@ DOMAIN: foreach my $domain ( keys $conf->{domains} ) { # Search for Zimbra users, but exclude known system accounts my $zim_user_search = $zim_ldap->ldap->search( base => 'ou=people,' . $domain_entry->{dn}, - filter => '(&(objectClass=zimbraAccount)(!(zimbraIsSystemAccount=TRUE)))', + filter => '(&(objectClass=zimbraAccount)(!(zimbraIsSystemAccount=TRUE))(!(zimbraIsSystemResource=TRUE)))', attrs => [ ( map { $conf->{domains}->{$domain}->{users}->{attr_map}->{$_} } keys $conf->{domains}->{$domain}->{users}->{attr_map} ),