[GH-ISSUE #1133] [FEATURE REQUEST] Search multi-valued custom attributes #405

Open
opened 2026-02-27 08:17:07 +03:00 by kerem · 6 comments
Owner

Originally created by @nitnelave on GitHub (Mar 29, 2025).
Original GitHub issue: https://github.com/lldap/lldap/issues/1133

Motivation
Examples: mail aliases for stalwart.
Substring searches in aliases for domain matching.

Describe the solution you'd like
Ability to search multi valued attributes, as well as doing substring matches, or date/integer comparisons.

Describe alternatives you've considered
Sometimes you can use alias1, alias2 and so on. But some systems have unbounded number of aliases, or require wildcards, which are not feasible.
We could also auto-create the attributes with a plugin, and modify the filters with the plugin, but it's a hacky way.

Originally created by @nitnelave on GitHub (Mar 29, 2025). Original GitHub issue: https://github.com/lldap/lldap/issues/1133 **Motivation** Examples: mail aliases for stalwart. Substring searches in aliases for domain matching. **Describe the solution you'd like** Ability to search multi valued attributes, as well as doing substring matches, or date/integer comparisons. **Describe alternatives you've considered** Sometimes you can use alias1, alias2 and so on. But some systems have unbounded number of aliases, or require wildcards, which are not feasible. We could also auto-create the attributes with a plugin, and modify the filters with the plugin, but it's a hacky way.
Author
Owner

@rhclayto commented on GitHub (Apr 10, 2025):

Oh wow, I just saw this. Just came here to ask about a problem I've been trying to debug. It's this. I'm hoping to switch from OpenLDAp to lldap, but my Postfix configuration uses LDAP queries for aliases stored in multi-value attributes. So I guess this isn't going to work for me just yet.

Any timeline on this?

PS: I also used substring searches, but I managed to work around not having those (which I saw was the case in another issue). Would be a great bonus to have those too.

<!-- gh-comment-id:2794850592 --> @rhclayto commented on GitHub (Apr 10, 2025): Oh wow, I just saw this. Just came here to ask about a problem I've been trying to debug. It's this. I'm hoping to switch from OpenLDAp to lldap, but my Postfix configuration uses LDAP queries for aliases stored in multi-value attributes. So I guess this isn't going to work for me just yet. Any timeline on this? PS: I also used substring searches, but I managed to work around not having those (which I saw was the case in another issue). Would be a great bonus to have those too.
Author
Owner

@nitnelave commented on GitHub (Apr 10, 2025):

Are you sure you can't make it work with alias1, alias2 and so on? It's not the prettiest, but it works.

As for the timeline, I could tell you it would take a week of free time to do this, but I can't tell you when that would be :)

<!-- gh-comment-id:2795370129 --> @nitnelave commented on GitHub (Apr 10, 2025): Are you sure you can't make it work with alias1, alias2 and so on? It's not the prettiest, but it works. As for the timeline, I could tell you it would take a week of free time to do this, but I can't tell you when that would be :)
Author
Owner

@rhclayto commented on GitHub (Apr 11, 2025):

I will contribute configuration instructions for Postfix & Dovecot whenever you have time to add this in.

<!-- gh-comment-id:2798064588 --> @rhclayto commented on GitHub (Apr 11, 2025): I will contribute configuration instructions for Postfix & Dovecot whenever you have time to add this in.
Author
Owner

@rhclayto commented on GitHub (Jan 21, 2026):

Hi. Just following up. I would still love to see this, but of course, not meaning to pester. I wish I knew Rust so I could help out.

<!-- gh-comment-id:3776938129 --> @rhclayto commented on GitHub (Jan 21, 2026): Hi. Just following up. I would still love to see this, but of course, not meaning to pester. I wish I knew Rust so I could help out.
Author
Owner

@jprjr commented on GitHub (Jan 25, 2026):

Hi there, I ran into this issue as well. My use-case is I'm building an app that allows users to upload client TLS certificates and authenticate with those.

My plan was to use a multi-value attribute to store certificate fingerprints. I think I could do a work-around of something like (|(certfp1=xxx)(certfp2=xxx)) but - it would be very convenient to search on just a single attribute.

<!-- gh-comment-id:3796724804 --> @jprjr commented on GitHub (Jan 25, 2026): Hi there, I ran into this issue as well. My use-case is I'm building an app that allows users to upload client TLS certificates and authenticate with those. My plan was to use a multi-value attribute to store certificate fingerprints. I think I could do a work-around of something like `(|(certfp1=xxx)(certfp2=xxx))` but - it would be very convenient to search on just a single attribute.
Author
Owner

@necroware commented on GitHub (Jan 31, 2026):

Same problem here. Added mailalias as List attribute to my users. Now if I have up to 1 alias and use ldapsearch with filter mailalias=alias@example.com it works fine. As soon as I add second mailalias entry the filter stops working completely. Not even for the first entry. I guess, this is a bug :)

<!-- gh-comment-id:3828415683 --> @necroware commented on GitHub (Jan 31, 2026): Same problem here. Added mailalias as List<String> attribute to my users. Now if I have up to 1 alias and use ldapsearch with filter mailalias=alias@example.com it works fine. As soon as I add second mailalias entry the filter stops working completely. Not even for the first entry. I guess, this is a bug :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/lldap-lldap#405
No description provided.