Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added function for ldap-identities plugin to filter by mail prefixes (allow compatibility for e.g. Exchange and others) #1454

Merged
merged 6 commits into from
Feb 27, 2024

Conversation

S-A-L13
Copy link

@S-A-L13 S-A-L13 commented Feb 27, 2024

The problem: Exchange saves the mail identities in the ldap attribut "proxyAddresses". This attribut is not only used for mail addresses, but also for SIP, X400 and others (every program can add addresses here with a custom prefix ... or no prefix).
Exchange for example saves the addresses with "smtp:" as prefix e.g. "smtp:[email protected]".
If ldap-identities plugin greps the addresses from the proxyAddresses attribut, it gets all addresses listed there (with prefixes), not only the mail addresses. These identities can't be used to sent mail.

The solution: This solution adds a new entry to the config and a function to cleanup the addresses: If a prefix is set in the config, it removes all addresses without the prefix from the search result (not from the ldap attribut ;) ) and then removes the prefix from the remaining addresses. This way you have only clean mail addresses as identities.

Mail prefix is needed to filter mailidentities. For example suche set by Exchange in the ProxyAddresses field, which can hold different address types
Added function (and additional code to start it) that helps to clean up the mail addresses array. It removes the prefix (if set in config) and removes all addresses with no or a different prefix.
@S-A-L13 S-A-L13 marked this pull request as draft February 27, 2024 13:28
@S-A-L13 S-A-L13 marked this pull request as ready for review February 27, 2024 13:31
@the-djmaze the-djmaze merged commit 1722d88 into the-djmaze:master Feb 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants