This is a discussion on Re: [courier-users] ldapaliasd failing randomly - continuation of within the Courier-Imap forums, part of the Mail Servers and Related category; This is a MIME-formatted message. If you see this text it means that your E-mail software does not ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages. --=_commodore.email-scan.com-14003-1139187814-0001-2 Content-Type: text/plain; format=flowed; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Mime-Autoconverted: from 8bit to quoted-printable by mimegpg Aleksander Adamowski writes: > Currently, "400 Service temporarily unavailable" errors are returned to=20 > clients whenever a connection between courierldapaliasd and the LDAP=20 > server breaks. > A patch analogous to the one for authldaplib.c, that would make=20 > ldapaliasd retry the operation, should elmiminate this problem. >=20 > I will be more than happy to test such a patch if Sam provides it... That's fair enough=E2=80=A6 diff -U3 -r1.23 ldapaliasd.c --- courier/ldapaliasd.c=0922 Jan 2006 15:21:52 -0000=091.23 +++ courier/ldapaliasd.c=096 Feb 2006 01:02:00 -0000 @@ -226,7 +226,7 @@ =09return (0); } =20 -static LDAPMessage *search_attr(const char *filter, const char *attr) +static LDAPMessage *search_attr_retry(const char *filter, const char *at= tr) { =09char *attrlist[2]; =09struct timeval timeout; @@ -247,6 +247,16 @@ =09return (result); } =20 +static LDAPMessage *search_attr(const char *filter, const char *attr) +{ +=09LDAPMessage *result=3Dsearch_attr_retry(filter, attr); + +=09if (result =3D=3D NULL && my_ldap_fp =3D=3D NULL && ldapopen() =3D=3D = 0) +=09=09result=3Dsearch_attr_retry(filter, attr); + +=09return result; +} + static int search_maildrop(const char *mail, const char *source, FILE *o= utfp) { =09char *filter; --=_commodore.email-scan.com-14003-1139187814-0001-2 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBD5qBkx9p3GYHlUOIRAjS1AJ9QbzFdyRY9zmaCjbe9xG MPCvm3FwCfbung 9LOFLlxiUfMduC3D6fzzzwQ= =eeeR -----END PGP SIGNATURE----- --=_commodore.email-scan.com-14003-1139187814-0001-2-- ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=...486&dat=121642 _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users |