amavis ldap trouble in process_request do_search

Quanah Gibson-Mount quanah at zimbra.com
Fri Apr 5 21:19:01 CEST 2013


--On Friday, April 05, 2013 8:47 PM +0200 Mark Martinec 
<Mark.Martinec+amavis at ijs.si> wrote:

> Quanah,
>
>> See also my work on Net::LDAP.  The newest releases allow turning on
>> keepalive (default 2 hours).  I also have a patch for it that, if you are
>> on linux, allows tweaking the keepalive parameters for the Net::LDAP
>> connection so that you can send keepalive probes much more often than
>> those 2 hours.
>
> If it's something that should go into amavisd, please send the patch.

Hi Mark,

Here is my patch:

@@ -18400,9 +18414,12 @@
                             localaddr => $self->{localaddr},
                             port    => $self->{port},
                             scheme  => $self->{scheme},
-                            inet6   => $self->{inet6},
                             version => $self->{version},
                             timeout => $self->{timeout},
+                            keepalive => 1,
+                            keepalive_idle => 240,
+                            keepalive_interval => 30,
+                            keepalive_probe => 10,
                             );


The "keepalive" option is what is new and native to Net::LDAP.  There is no 
effect if someone is running a version that doesn't have it (no error).

I would note that "inet6" is not valid, and may cause problems, with newer 
Net::LDAP installations.

The additional keepalive parameters only do something if someone has 
applied my patch for Net::LDAP during their module build.  That is here:

<https://rt.cpan.org/Ticket/Display.html?id=83039>

There is some disagreement from the Net::LDAP authors about including this 
patch at the moment. ;)


--Quanah


--

Quanah Gibson-Mount
Sr. Member of Technical Staff
Zimbra, Inc
A Division of VMware, Inc.
--------------------
Zimbra ::  the leader in open source messaging and collaboration


More information about the amavis-users mailing list