LDAP not connecting over IPv6

Quanah Gibson-Mount quanah at zimbra.com
Fri May 27 22:55:14 CEST 2011


--On Friday, May 27, 2011 10:09 AM +0200 Christian Roessner 
<c+amavis at roessner-network-solutions.com> wrote:

> Am 27.05.2011 09:53, schrieb Christian Roessner:
>> Hi,
>>
>> latest amavis-pre: LDAP ist not connected over IPv6:
>>
>> amavisd   2348   amavis   14u  IPv6   8676      0t0  TCP
>> [2a01:4f8:131:1081:88:198:80:230]:50422->[2a01:4f8:61:8222:88:198:211:19
>> ]:5432 (ESTABLISHED)
>> amavisd   2348   amavis   15u  IPv4   8678      0t0  TCP
>> 88.198.80.227:50414->88.198.211.19:389 (ESTABLISHED)
>> amavisd   2348   amavis   16u  IPv6   8683      0t0  TCP
>> [2a01:4f8:131:1081:88:198:80:230]:50424->[2a01:4f8:61:8222:88:198:211:19
>> ]:5432 (ESTABLISHED)
>>
>> The postgresql database is connected over IPv6, but not LDAP. Both PgSQL
>> and OpenLDAP are on the same host. The amavisd.conf uses
>> db.roessner-net.de in both cases.
>>
>> Best wishes
>> Christian
>
> Fixed with the following patch:
>
> --- amavisd-orig	2011-05-27 10:06:42.000000000 +0200
> +++ amavisd	2011-05-27 10:07:24.000000000 +0200
> @@ -16994,6 +16994,7 @@
>                              port    => $self->{port},
>                              version => $self->{version},
>                              timeout => $self->{timeout},
> +			    inet6   => 'Y',
>                              );
>    if (!$ldap) {  # connect failed
>      do_log(-1,"connect_to_ldap: unable to connect to host %s",
> $hostlist);

Wouldn't it be better to use the "$have_inet6" variable to if def this?

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