Exclude User with kopanoAccount=0 from distribution lists via Postfix LDAP Query
-
Dear all,
we are using Kopano with ActiveDirectory. Some of our security groups we are using as Kopano Distribution groups too. Currently now I have the situation, that some of this groups has users as member, who has no Kopano Account (KopanoAccount=0).
If I send an email to this distribution list via Kopano WebApp, then everything is fine. The email is only send to the users who has KopanoAccount=1 and no bounces will be generated.
But if I send a email to this distribution list from an external mailserver or via an email client like Thunderbird, then this email is delivered via Postfix. I used this documentation for the configuration: https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#postfix-integration
My LDAP query for the groups is this one:
query_filter = (&(objectclass=group)(kopanoAccount=1)(|(mail=%s)(otherMailbox=%s)))
leaf_result_attribute = mail
special_result_attribute = memberBut this query give me all users who are in this distribution list. Independent of the KopanoAccount flag from the user. I just want to have users who has KopanoAccount=1.
So the question is: Is there maybe any chance to have a sub-query in this query?
Thanks and regards
Tobias
-
@TGM said in Exclude User with kopanoAccount=0 from distribution lists via Postfix LDAP Query:
So the question is: Is there maybe any chance to have a sub-query in this query?
Only if your LDAP server offers such a syntax extension.