Amavis fails to handle dropped LDAP connections

Quanah Gibson-Mount quanah at zimbra.com
Tue Jan 22 20:55:08 CET 2013


--On Tuesday, January 22, 2013 11:50 AM -0800 Quanah Gibson-Mount 
<quanah at zimbra.com> wrote:

> The error Amavis gets when this scenario occurs is:
>
> Nov  9 12:02:03 mta amavis[5021]: (05021-02) (!)lookup_ldap: do_search:
> failed:
> LDAP_OPERATIONS_ERROR
>
> Since this does not match any of the above, it never retries.  It should
> also retry when it gets OPERATIONS_ERROR:
>
>     } elsif ($error_name !~
> /^LDAP_(?:BUSY|UNAVAILABLE|UNWILLING_TO_PERFORM|
>  TIMEOUT|SERVER_DOWN|CONNECT_ERROR|OTHER|OPERATIONS_ERROR)\z/x) {

The error seems to vary depending on the version of Net::LDAP. 
Alternatively it may log:

[root at entry log]# tail -f /var/log/zimbra.log | grep -i amavis | grep -i 
error
Nov 14 11:33:14 entry amavis[24329]: (24329-16) (!)lookup_ldap: do_search:
failed: LDAP_LOCAL_ERROR

So it should account for that as well:

    } elsif ($error_name !~ /^LDAP_(?:BUSY|UNAVAILABLE|UNWILLING_TO_PERFORM|
 
TIMEOUT|SERVER_DOWN|CONNECT_ERROR|OTHER|LOCAL_ERROR|OPERATIONS_ERROR)\z/x) {
      die "do_search: failed: $error_name\n";


--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