# Nginx pop imap and ldap

**URL:** <https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937>\
**Category:** NGINX\
**Created:** [July 23, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937 "2008-07-23T23:55:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [July 23, 2008, 11:55pm UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/1 "2008-07-23T23:55:05Z")

</div>

hi

I would like to know if it’s possible to configure Nginx as  
Perdition with ldap. Because i have one Webmail IMP/HORDE and two  
store with mailbox. I  
want to be able to choose a back-end server based on the user’s  
identity on the LDAP

For example with perdition in configuration file Perdition.conf  
M /usr/lib/libperditiondb\_ldap.so  
m  
“ldap://ldap.domain.fr:389/o=domain,c=fr?uid,mailHost,port?sub?(uid=%s)”

The same with Nginx is it possible??Or an other solution

Thanks in advance

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [July 24, 2008, 12:22am UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/2 "2008-07-24T00:22:40Z")

</div>

Hello!

On Wed, Jul 23, 2008 at 11:47:40PM +0200, Leveau Stanislas wrote:

> m “ldap://ldap.domain.fr:389/o=domain,c=fr?uid,mailHost,port?sub?(uid=%s)”
> 
> The same with Nginx is it possible??Or an other solution

The nginx itself doesn’t know anything about your users  
database/directory, it just talks to auth script. So you  
just have to write auth script that talks to your ldap directory.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [July 24, 2008, 12:46am UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/3 "2008-07-24T00:46:39Z")

</div>

thanks  
Maybe that someone has already done it? ;)) a script for ldap??

Stan

Maxim D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) a ecrit:

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [August 4, 2008, 9:27am UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/4 "2008-08-04T09:27:59Z")

</div>

On 2008-07-24 at 00:37, Leveau Stanislas wrote:

> Maybe that someone has already done it? ;)) a script for ldap??

Hi

Sorry for the late answer, but I’ve attached the perl auth daemon we  
use.

You probably want to change IMAPserver to mailHost, and look up the port  
as  
well, but the changes should be quite straight forward.

In the mail section, add “auth\_http localhost:9000/cgi-bin/auth;”

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [March 17, 2010, 10:06am UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/5 "2010-03-17T10:06:30Z")

</div>

Ã˜yvind Kolbu wrote:

> Sorry for the late answer, but I’ve attached the perl auth daemon we  
> use.

Sorry, but I can not see the attachment.  
I know this article has been posted for a long time but the topic is so  
interesting for me.

Could you please check and share me the configuration details.

Thanks,  
Tuan

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [March 17, 2010, 9:45pm UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/6 "2010-03-17T21:45:11Z")

</div>

On 2010-03-17 at 10:06, Anh tuan Truong wrote:

> Sorry, but I can not see the attachment.  
> I know this article has been posted for a long time but the topic is so  
> interesting for me.
> 
> Could you please check and share me the configuration details.

OK, they are attached again.

---

<div class="post-metadata">

**Author:** ![Leveau\_Stanislas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/54ee81/32.png) [@Leveau\_Stanislas](https://www.ruby-forum.com/u/Leveau_Stanislas)\
**Post date:** [March 18, 2010, 1:22am UTC](https://www.ruby-forum.com/t/nginx-pop-imap-and-ldap/143937/7 "2010-03-18T01:22:15Z")

</div>

Ã˜yvind Kolbu wrote:

> OK, they are attached again.

Thank you very much.  
I will try and tell you back.

Yours sincerely,  
Tuan
