Bug with $default_ldap setting

Zhang Huangbin zhbmaillistonly at gmail.com
Mon Mar 14 09:44:07 CET 2011


Hi, list.

I get an unexpected result with $default_ldap setting: If base dn doesn't exist, amavisd
should bypass/dunno this check and continue sending mail out, instead of defer this mail.

My settings in amavisd.conf

# ----
$enable_ldap    = 1;
$default_ldap   = {
    [...]
    base            => "domainName=%d,o=domains,dc=example,dc=com",
    [...]
};
# ----

I have several virtual domains under "o=domains,dc=example,dc=com", i want to make it
query "domainName=%d,o=domains,dc=example,dc=com" instead of "o=domains,dc=example,dc=com"
for better performance.

The problem is, when i send mail to an external mail address, e.g. gmail, yahoo, hotmail,
Amavisd raises below error log and mails can **NOT** be sent out:

# ----
amavis[3207]: (03207-01) ldap begin_work
amavis[3207]: (03207-01) lookup_ldap: searching base="domainName=gmail.com,o=domains,dc=example,dc=com", scope="sub", filter="[FILTER]"
amavis[3207]: (03207-01) NOTICE: do_search: trying again: LDAP_NO_SUCH_OBJECT
amavis[3207]: (03207-01) disconnecting from LDAP
amavis[3207]: (03207-01) Connecting to LDAP server
amavis[3207]: (03207-01) connect_to_ldap: trying 127.0.0.1
amavis[3207]: (03207-01) connect_to_ldap: connected to 127.0.0.1
amavis[3207]: (03207-01) connect_to_ldap: bind cn=vmail,dc=example,dc=com succeeded
amavis[3207]: (03207-01) lookup_ldap: searching (again) base="domainName=gmail.com,o=domains,dc=example,dc=com", scope="sub", filter="[FILTER]"
amavis[3207]: (03207-01) disconnecting from LDAP
amavis[3207]: (03207-01) (!)lookup_ldap: do_search: failed again, LDAP_NO_SUCH_OBJECT at (eval 104) line 159, <DATA> line 392.
amavis[3207]: (03207-01) (!!)TROUBLE in process_request: do_search: failed again, LDAP_NO_SUCH_OBJECT at (eval 104) line 159, <DATA> line 392. at (eval 104) line 445, <DATA> line 392.
amavis[3207]: (03207-01) Amavis::LDAP::Connection DESTROY called
amavis[3207]: (03207-01) Amavis::Lookup::LDAP DESTROY called
# ----

Amavisd should bypass/dunno this mail and continue sending it out, isn't it?

----
Zhang Huangbin

iRedMail: Open Source Mail Server Solution for Red Hat Enterprise Linux,
CentOS, Debian, Ubuntu, OpenSuSE, FreeBSD: http://www.iredmail.org/



More information about the amavis-users mailing list