Thursday, February 11, 2010

SquirrelMail LDAP address books

Another day, another interesting bug. A user noticed that in the SquirrelMail LDAP address book, when he listed all users, one person was missing. When you search for the person by name, they do appear. Strange...

ldapsearch shows that person in the list, so it was clearly a SquirrelMail issue. In fact, it turned out that only 250 people were listed by "List All" - a curiously precise limitation. So I grepped for 250 in config.php - nothing! Then I grepped for 250 in SquirrelMail source code, and found this:

functions/abook_ldap_server.php: var $maxrows = 250;

If you don't define maxrows for an LDAP server, it gets this default. Easy solution: edit config.php and add this line:

'maxrows' => 400,

And hey presto, there he is when you list all.

I guess this is one way to know when your company is growing.

No comments:

Post a Comment