This question about LDAP: Answered

How do I get WebNotify to lookup Ldap email addresses?

We are using LdapContrib with LdapApacheLogin and LdapUserMapping. The Ldap lookups work fine; we've replaced the contents of the RenderLdapUser topic and it shows user information from Ldap on each users page.

On the WebNotify page, we can only get a notification if we put the users wiki name and an explicit email address:

* DavidPullman -

If we only put the wiki name the mailnotify script returns "has no subscribers".

It seems that MailerContrib knows about Ldap, but I can't get this to work. I've put in to LocalSite.cfg:

$Foswiki::cfg{Ldap}{MailAttribute} = 'uidListEmail';

This is the correct attribute for the user accounts; it works fine in RenderLdapUser.

Any suggestions or comments would be appreciated.

-- DavidPullman - 14 Dec 2009

I had a similar problem (i.e. the mailnotify script not sending out mails, not sure if this is 100% the same issue), so I wonder: do you have Foswiki::Users:LdapPasswdUser set up as PasswordManager in your configuration? I only had the LDAP-related option set for LoginManager (using LdapApacheLogin) and UserMappingManager and everything worked fine apart from notifications.

-- WolfgangKarall - 27 Feb 2010

Please try %USERINFO% to get to see which information the core has got about a user, i.e. which email it uses.

-- MichaelDaum - 27 Feb 2010

I have also the problem that mailnotify doesn't find a email address for some users, or it takes the wrong one. However, for some other users it's working.

My LDAP server setup is a little bit special, but I get it working; %USERINFO% shows the correct email address for all users! %USERINFO% works correctly when I provide the $username and it also works correctly when I provide the $wikiname. Further %MAINWEB%.RenderLdapUser also does it right and therefore I guess LdapNgPlugin also works correctly.

But mailnotify does not work for all users. What is the secret behind mailnotify?

Why is MailerContrib not taking %USERINFO%?

How does MailerContrib get the users email address instead?

Any hints are very welcome. A working email notification is essential for a wiki.

-- UrsBeyerle - 25 Sep 2010

I believe that there was a bug in 1.0 where the cli execution of scripts was not running under the admin user. This would prevent the script from accessing the email addresses. mailnotify and %USERINFO% both use the Users API to get the email addresses.

-- GeorgeClark - 02 Dec 2011

QuestionForm edit

Subject LDAP
Extension MailerContrib
Version Foswiki 1.0.8
Status Answered
Related Topics
Topic revision: r6 - 02 Dec 2011, GeorgeClark - This page was cached on 15 Jan 2020 - 17:26.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy