1

Topic: internal server error when typing recipient's address

as the topic, i got this problem when typing an address on the recipient's field. Usually, if I have a user named Bob on OpenLDAP, when I type 'b', it will suggest Bob's email address. But instead I got this 'internal server error' message. Where to check? I could not find any relevent error in /var/log/httpd/error.log

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: internal server error when typing recipient's address

Is OpenLDAP running? If so, set "loglevel 256" in slapd.conf, restart openldap and monitor it's log file while you typing recipient address in roundcube.

Also, roundcube logs into /var/log/maillog by default, don't forget to check it.

3

Re: internal server error when typing recipient's address

when i did that, i got these messages from openldap.log

Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 fd=14 ACCEPT from IP=127.0.0.1:37821 (IP=0.0.0.0:389)
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=0 BIND dn="cn=vmail,dc=mydomain,dc=com,dc=my" method=128
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=0 BIND dn="cn=vmail,dc=mydomain,dc=com,dc=my" mech=SIMPLE ssf=0
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=0 RESULT tag=97 err=0 text=
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=1 SRCH base="o=domains,dc=mydomain,dc=com,dc=my" scope=2 deref=0 filter="(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=imapsecured)(|(mail=test03@mydomain.com.my)(&(enabledService=shadowaddress)(shadowAddress=test03@mydomain.com.my))))"
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=1 SEARCH RESULT tag=101 err=0 nentries=1 text=
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=2 BIND anonymous mech=implicit ssf=0
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=2 BIND dn="mail=test03@mydomain.com.my,ou=Users,domainName=mydomain.com.my,o=domains,dc=mydomain,dc=com,dc=my" method=128
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=2 BIND dn="mail=test03@mydomain.com.my,ou=Users,domainName=mydomain.com.my,o=domains,dc=mydomain,dc=com,dc=my" mech=SIMPLE ssf=0
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=2 RESULT tag=97 err=0 text=
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=3 BIND anonymous mech=implicit ssf=0
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=3 BIND dn="cn=vmail,dc=mydomain,dc=com,dc=my" method=128
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=3 BIND dn="cn=vmail,dc=mydomain,dc=com,dc=my" mech=SIMPLE ssf=0
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=3 RESULT tag=97 err=0 text=
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=4 SRCH base="o=domains,dc=mydomain,dc=com,dc=my" scope=2 deref=0 filter="(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=imapsecured)(|(mail=test03@mydomain.com.my)(&(enabledService=shadowaddress)(shadowAddress=test03@mydomain.com.my))))"
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=4 SRCH attr=storageBaseDirectory mailMessageStore mailQuota
Dec  9 14:45:09 mydomain-mail slapd[10288]: conn=0 op=4 SEARCH RESULT tag=101 err=0 nentries=1 text=

4

Re: internal server error when typing recipient's address

According to the ldap search filter, seems not caused by roundcube address auto-complete.

What's the detail setting of global address book in your roundcube? you can find it in "/path/to/roundcubemail-x.y.z/config/main.inc.php".

5 (edited by grepmaster 2010-12-09 15:51:13)

Re: internal server error when typing recipient's address

ZhangHuangbin wrote:

According to the ldap search filter, seems not caused by roundcube address auto-complete.

What's the detail setting of global address book in your roundcube? you can find it in "/path/to/roundcubemail-x.y.z/config/main.inc.php".

here is my setting for addressbook & global addressbook

$rcmail_config['address_book_type'] = 'sql';

$rcmail_config['ldap_public']["mydomain.com.my"] = array(
    'name'          => 'Global Address Book',
    'hosts'         => array("127.0.0.1"),
    'port'          => 389,
    'use_tls'       => false,
    'user_specific' => true, // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
    'base_dn'       => "domainName=%d,o=domains,dc=mydomain,dc=com,dc=my",
    'bind_dn'       => "mail=%u@%d,ou=Users,domainName=%d,o=domains,dc=mydomain,dc=com,dc=my",
    'writable'      => false, // Indicates if we can write to the LDAP directory or not.
    'ldap_version'  => "3",       // using LDAPv3
    'search_fields' => array('mail', 'cn', 'givenName', 'sn'),  // fields to search in
    'name_field'    => 'cn',    // this field represents the contact's name
    'email_field'   => 'mail',  // this field represents the contact's e-mail
    'surname_field' => 'sn',    // this field represents the contact's last name
    'firstname_field' => 'givenName',  // this field represents the contact's first name
    'sort'          => 'cn',    // The field to sort the listing by.
    'scope'         => 'sub',   // search mode: sub|base|list
    'filter'        => "(&(enabledService=mail)(enabledService=deliver)(enabledService=displayedInGlobalAddressBook)(|(objectClass=mailList)(objectClass=mailAlias)(objectClass=mailUser)))", // Search mail users, lists, aliases.
    'fuzzy_search'  => true);   // server allows wildcard search

6

Re: internal server error when typing recipient's address

Do you have this setting in main.inc.php:

$rcmail_config['autocomplete_addressbooks'] = array("sql", "mydomain.com.my");

I can't see this issue is related to openldap address book. maybe you should check other log files. e.g. MySQL, and roundcube logs into /var/log/maillog, don't forget to check it.

7 (edited by grepmaster 2010-12-09 16:24:05)

Re: internal server error when typing recipient's address

i checked roundcube's log after enabling it and found this in error log


[09-Dec-2010 16:21:45 +0800]: LDAP Error: No ldap support in this installation of PHP (GET /webmail/?_task=addressbook&_action=list&_source=mydomain.com.my&_remote=1&_=1291882855638&_unlock=1)

so i install php-ldap and that solved it

8

Re: internal server error when typing recipient's address

That's strange. iRedMail should install it for you.

9

Re: internal server error when typing recipient's address

someone installed iredmail on that server before and i just ran the cleaning/uninstall script, finger crossed and install another version