Skip to content

Commit

Permalink
Make LDAP querries timeout configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
manu committed Apr 4, 2009
1 parent e63dcba commit d8eada8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,4 +1,5 @@
4.3.1
Make LDAP querries timeout configurable
Make MX sync timeout peer-configurable (Attila Bruncsak)
Fix a crash when LDAP server is down
Update contributor list
Expand Down
13 changes: 11 additions & 2 deletions conf_yacc.y
Expand Up @@ -22,7 +22,7 @@
#ifdef HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#ifdef __RCSID
__RCSID("$Id: conf_yacc.y,v 1.99 2009/04/04 03:09:43 manu Exp $");
__RCSID("$Id: conf_yacc.y,v 1.100 2009/04/04 03:19:39 manu Exp $");
#endif
#endif

Expand Down Expand Up @@ -1398,7 +1398,16 @@ ldapconfdef: LDAPCONF QSTRING ldaptimeout {
#endif
}
;
ldaptimeout: TNUMBER {
ldaptimeout: GLTIMEOUT TDELAY {
#ifdef USE_LDAP
ldapcheck_timeout_set(humanized_atoi(atoi($2)));
#else
mg_log(LOG_INFO,
"LDAP support not compiled in, ignore line %d",
conf_line);
#endif
}
| TNUMBER { /* 4.2.1 backward compatiblity */
#ifdef USE_LDAP
ldapcheck_timeout_set(atoi($1));
#else
Expand Down
9 changes: 3 additions & 6 deletions greylist.conf.5
@@ -1,5 +1,5 @@
.\"
.\" $Id: greylist.conf.5,v 1.97 2009/04/04 03:09:43 manu Exp $
.\" $Id: greylist.conf.5,v 1.98 2009/04/04 03:19:39 manu Exp $
.\"
.\" Copyright (c) 2004-2009 Emmanuel Dreyfus
.\" All rights reserved.
Expand Down Expand Up @@ -811,13 +811,10 @@ except that properties are always collected: the only available option is
.PP
A list of LDAP URL to use can be specified with the
.I ldapconf
keyword:
keyword. The network timeout is optional.
.IP
ldapconf "ldap://localhost ldaps://ldap.example.net"
ldapconf "ldap://localhost ldaps://ldap.example.net" timeout 2s
.PP
If one of the server goes down, milter-greylist will try the next one.
An optional network timeout, in seconds, can be appended after the quoted
string.
When
.I ldaps://
is used, the system's
Expand Down

0 comments on commit d8eada8

Please sign in to comment.