Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Pro

 AfterLogic Forum : AfterLogic WebMail Pro
Subject Topic: LDAP only global and private address book Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 17 May 2016 at 4:08am | IP Logged Quote ineva

Hey,

I would like to ask for some help.
I need to make WebMail Pro's Global and Private Address Book functionality to work. Users can authenticate on ldap, but address books are not working. I have created the ldap_book_global.xml and the ldap_book_private.xml files, configured them but it still not working. The only thing that has not been set up is the address book field, if I need to use it at all. The documentation get obscured a bit around there. For any help, I would be grateful!

Update #1: I use the PHP variant of WebMail Pro, on Debian 8.1
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 17 May 2016 at 4:12am | IP Logged Quote Igor

Can you please confirm whether this is about ASP.NET or PHP version of WebMail Pro? Thank you.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 17 May 2016 at 4:13am | IP Logged Quote ineva

Yes, I can. sorry, I forgot about it. I use the PHP version of Webmail Pro, on Debian 8.1
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 17 May 2016 at 4:23am | IP Logged Quote Igor

I see. Well, the files you mentioned only apply to ASP.NET version.

For Global address book, LDAP configuration is described at:

Configuring global address book for LDAP and Active Directory

There's no out-of-box way to use private address book, but the following plugin allows to use custom address books in WebMail:

Add contacts from external address books

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 06 June 2016 at 1:29am | IP Logged Quote ineva

Sorry for the late reply. I was on a sick leave.

I have managed the global contacts to work. Thank you!

On the plugin you have linked to make the personal contacts works, Is there a more detailed decumentation? Search Engines give links but no single one is relevant. I can't figure out, how to make it work.
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 06 June 2016 at 2:02am | IP Logged Quote Igor

That plugin is basically a stub, it's assumed that you provide the actual code for retrieving contacts from LDAP or any other source, and supply that code in the plugin instead of the placeholder code:

Code:
$oRemoteDb = CRemoteApi::GetDB();
$aResultContacts = $oRemoteDb->GetContacts($oAccount->Email, $sSearch);


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 08 June 2016 at 2:44am | IP Logged Quote ineva

I've written a code that executes a "query" against our LDAP server.
Now I try to parse the result in to the correct form.

Once the plugin works, the results should show up the same, as the global contacts do, when I type?

In the plugin I can find the following line:

$this->AddHook('webmail.change-suggest-list', 'WebmailChangeSuggestList');

I assume that the first paramter is the client side function name, the one thats linked on recipients textboxes ~textchange event. The second parameter is the PHP function name. Due to the minified JS and big amount of code I am unsure of the afrementioned, can you confirm my assumption?

Am I allowed to post the complete, working code here?
Maybe there are some people with the same needs on the personal contacts from ldap thingie.
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 08 June 2016 at 3:08am | IP Logged Quote Igor

WebMail Pro contains a number of hooks which can be used by plugins. The approach allows for performing custom code and altering data on-the-fly. This particular hook is there for amending suggestions list and can be found at line ~4273 of libraries/ProjectCore/Actions.php file:

Code:
\CApi::Plugin()->RunHook('webmail.change-suggest-list', array($oAccount, $sSearch, &$aList, &$aCounts));


As you can see, it's not about JavaScript. But just in case if you wish to use non-minified JavaScript - that's possible, you need to add the following item to the array defined in data/settings/config.php file:

Code:
'labs.use-app-min-js' => false,


That would result in using app.js file instead of app.min.js.

And of course, you can post your code or a public link to it here.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 08 June 2016 at 4:59am | IP Logged Quote ineva

I had to hardcode my user into my LDAP search string. For testing it was fine, for production I need to get the currently signed in user email address. Is there a function for that? What options do I have for this?
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 08 June 2016 at 5:03am | IP Logged Quote Igor

$oAccount->Email mentioned in plugin stub is what you need.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
ineva
Newbie
Newbie
Avatar

Joined: 17 May 2016
Location: Hungary
Online Status: Offline
Posts: 6
Posted: 08 June 2016 at 11:57pm | IP Logged Quote ineva

Oh yeah, we made it work. Thank you!
I get the contacts, correctly. As I see, LDAP personal contacts now works in one way.
Are there any plans for a feature that enable users to store their personal contacts on LDAP?
Back to Top View ineva's Profile Search for other posts by ineva
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 09 June 2016 at 2:44am | IP Logged Quote Igor

Currently, our primary focus assumes moving from adding new features to converting the product into a platform which would allow third-party developers to add functionality they need.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide