Opened 19 years ago
Last modified 13 months ago
#3162 new enhancement
LDAP support for e-mail notification
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | next-major-releases | 
| Component: | notification | Version: | 0.9.5 | 
| Severity: | normal | Keywords: | ldap | 
| Cc: | tolsen@… | Branch: | |
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
When using trac with LDAP authorization it would be nice if LDAP is also used for getting the e-mail address of logged in users (this feature should probably be settable using some trac.ini parameters).
I do not know howto read trac.ini parameters so I added a few lines to Notify.py Maybe somebody can use this.
Attachments (1)
Change History (22)
by , 19 years ago
comment:1 by , 19 years ago
| Owner: | changed from to | 
|---|---|
| Status: | new → assigned | 
This will be implemented in the h:wiki:LdapPlugin when the IUserDirectory interface is implemented in Trac core.
comment:2 by , 19 years ago
| Keywords: | notification email ldap added | 
|---|
comment:4 by , 19 years ago
Btw, you could check the latest patch from Waldemar on #2456 to see if that would meet the requirements for this ticket…
comment:5 by , 19 years ago
| Component: | general → notification | 
|---|---|
| Keywords: | notification email removed | 
comment:7 by , 17 years ago
| Cc: | added | 
|---|
comment:8 by , 12 years ago
Guys what's the status? Last update 5 years ago. Ticket still not closed. Anybody knows?
comment:9 by , 12 years ago
This feature is useful…
Anyone knows how to enable it in version 0.12.5? Which plugins?
comment:10 by , 11 years ago
| Owner: | removed | 
|---|---|
| Status: | assigned → new | 
comment:11 by , 9 years ago
We're still using a custom modification of the notify code to do this, any new way to do it in Trac 1.2 ?
comment:12 by , 9 years ago
You could give this a try: wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailAddressResolver#Examples
comment:13 by , 9 years ago
I did install a plugin based on the given example, and added 
email_address_resolvers = LdapEmailAddressResolver under the [notification] section of trac.ini, but I do not see any trace of the plugin's get_address_for_session method being called (I have self.log.info("XXX") line in - what am I doing wrong ?
comment:14 by , 9 years ago
As I continue to try at debugging the problem, I've added debug lines in the EmailDistributor class (notification/mail.py) — there I can see the class __init__ and transports being called but never see the distribute function called.  The log show INFO: Email address w/ou domain: xxx a few times (once per partecipating user in a ticket) before logging the __init__ and transports hits.
Why is it that distribute isn't called ?
Following the code, the NotificationSystem.distribute_event is called witn an empty list as the subscriptions parameter. What determines that? Shouldn't the ticket owner and people in Cc be always subscribed to ticket update events ?
comment:15 by , 9 years ago
Setting an email in the user's session preferences makes the subscription non-empty, but the whole point of my customization was to automatically figure out emails from usernames, w/out requiring the specification of an email in session preferences
comment:16 by , 9 years ago
Setting use_short_addr = enabled fixes the Email address user w/o domain warning *and* the empty subscription, moving on now
comment:17 by , 9 years ago
I would note that use_short_addr = enabled is discouraged by docs so maybe it's not a good idea to use. Shouldn't the EmailResolver kick-in before getting there ? Or when is it supposed to resolve ?
comment:18 by , 9 years ago
Please try to keep discussion about plugin development on the MailingList.
comment:19 by , 9 years ago
Moved here (not sure if it's the correct place): https://groups.google.com/forum/#!topic/trac-users/xVLMcnIO20c
comment:20 by , 9 years ago
The problem I was having with the custom LDAP EmailResolver plugin is fixed by applying the patch in #12658
comment:21 by , 13 months ago
For the record, we rolled our own plugin for this: https://git.osgeo.org/gitea/sac/TracLDAPEmailResolverPlugin



  
Notify.py example to get LDAP support