

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
20 messages in net.sourceforge.lists.courier-usersRe: [courier-users] authldap failing ...| From | Sent On | Attachments |
|---|---|---|
| Bowie Bailey | Jan 24, 2006 11:36 am | |
| Dirk Kulmsee | Jan 24, 2006 1:02 pm | |
| Sam Varshavchik | Jan 24, 2006 3:57 pm | |
| Sam Varshavchik | Jan 24, 2006 3:58 pm | |
| Sebastian Lechte | Jan 25, 2006 3:22 am | |
| Alessandro Vesely | Jan 25, 2006 5:07 am | |
| Bowie Bailey | Jan 25, 2006 10:46 am | |
| Sam Varshavchik | Jan 25, 2006 3:24 pm | |
| Sam Varshavchik | Jan 25, 2006 3:30 pm | |
| Bowie Bailey | Jan 26, 2006 5:53 am | |
| Sam Varshavchik | Jan 26, 2006 3:02 pm | |
| Bowie Bailey | Jan 27, 2006 6:17 am | |
| Georg Lutz | Jan 27, 2006 2:56 pm | |
| Sam Varshavchik | Jan 27, 2006 3:27 pm | |
| Sam Varshavchik | Jan 27, 2006 3:32 pm | |
| Bowie Bailey | Jan 30, 2006 10:50 am | |
| Sam Varshavchik | Jan 30, 2006 3:29 pm | |
| Bowie Bailey | Jan 31, 2006 6:10 am | |
| ecu...@encontacto.net | Mar 16, 2006 3:20 am | |
| Georg Lutz | Mar 16, 2006 12:08 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [courier-users] authldap failing randomly | Actions... |
|---|---|---|
| From: | Sam Varshavchik (mrs...@courier-mta.com) | |
| Date: | Jan 27, 2006 3:27:50 pm | |
| List: | net.sourceforge.lists.courier-users | |
Bowie Bailey writes:
Can you give me a bit of insight into how the authdaemon processes are handling the LDAP connections? Do they ever close them or do they assume the connection will remain open indefinitely? What I would assume is this:
- Each process opens a connection and holds it open. - When an authentication request comes in, it tries to use the connection. - If it fails, the process generates a 450 error and then opens a new connection for the next request.
This would mean that whenever an authdaemon process is idle for more than the LDAP timeout period, I should expect to get an error on the next incoming email that attempts to use that process. Is that accurate?
That's pretty much it. When no authentication requests arrive for five minutes, all open LDAP connections are closed. For this to happen, though, absolutely nothing needs to happen for five minutes.
The thing is that even if requests trickle in every once in a while, each request will go to only one daemon at random; the others will continue to remain idle and hold open connections.
I'm curious if the following patch will work, try it with the timeout set back to 30 seconds:
diff -U3 -r1.53 authldaplib.c --- authldaplib.c 1 Oct 2005 03:45:06 -0000 1.53 +++ authldaplib.c 27 Jan 2006 23:25:51 -0000 @@ -915,11 +915,30 @@
static char *escape_str(const char *);
+static int auth_ldap_retry(const char *service, + const char *user, const char *pass, + int (*callback)(struct authinfo *, void *), + void *arg, const char *newpass); + static int auth_ldap_do(const char *service, const char *user, const char *pass, int (*callback)(struct authinfo *, void *), void *arg, const char *newpass) { + int rc=auth_ldap_retry(service, user, pass, callback, arg, newpass); + + if (rc > 0) + rc=auth_ldap_retry(service, user, pass, callback, arg, + newpass); + + return rc; +} + +static int auth_ldap_retry(const char *service, + const char *user, const char *pass, + int (*callback)(struct authinfo *, void *), + void *arg, const char *newpass) +{ char *q; int i;







