Opened 17 years ago
Last modified 2 years ago
#3162 new enhancement
LDAP support for e-mail notification
|Reported by:||Owned by:|
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.
Change History (21)
by , 17 years ago
comment:1 by , 17 years ago
|Status:||new → assigned|
This will be implemented in the h:wiki:LdapPlugin when the IUserDirectory interface is implemented in Trac core.
comment:2 by , 17 years ago
|Keywords:||notification email ldap added|
comment:3 by , 17 years ago
See #2456 for the !IUserDirectory work.
comment:4 by , 16 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 , 16 years ago
|Component:||general → notification|
|Keywords:||notification email removed|
comment:6 by , 16 years ago
(coupling with #2456)
comment:7 by , 15 years ago
comment:8 by , 10 years ago
Guys what's the status? Last update 5 years ago. Ticket still not closed. Anybody knows?
comment:9 by , 9 years ago
This feature is useful…
Anyone knows how to enable it in version 0.12.5? Which plugins?
comment:10 by , 8 years ago
|Status:||assigned → new|
comment:11 by , 6 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 , 6 years ago
You could give this a try: wiki:TracDev/PluginDevelopment/ExtensionPoints/trac.notification.api.IEmailAddressResolver#Examples
comment:13 by , 6 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 , 6 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
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
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 , 6 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 , 6 years ago
use_short_addr = enabled fixes the
Email address user w/o domain warning *and* the empty subscription, moving on now
comment:17 by , 6 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 , 6 years ago
Please try to keep discussion about plugin development on the MailingList.
comment:19 by , 6 years ago
Moved here (not sure if it's the correct place): https://groups.google.com/forum/#!topic/trac-users/xVLMcnIO20c
comment:20 by , 6 years ago
The problem I was having with the custom LDAP EmailResolver plugin is fixed by applying the patch in #12658
Notify.py example to get LDAP support