For our Hosted Exchange 2007 environment, we offer a BlackBerry Enterprise Server that allows users to connect their crackberries and have the full functionality that one expects with these devices.
Various automation scripts have been put in place that make it easy for the user to see who has BlackBerry enabled for their account, add additional users and so on. Today, we discovered a rather annoying feature that exposed a bug in our code. Not a horrible bug, but one that did affect the user and their experience with the customer portal.
Here is the basics of the bug. We use the BESUserAdminClient.exe program with the find option to find users. We then search the results for something along the lines of “(firstname.lastname@example.org) 1 results found.” Unfortunately, we were getting false positives on our searches. email@example.com does not exist on our BES system. However, firstname.lastname@example.org does. So if you search for email@example.com, what you are really search for is *firstname.lastname@example.org* I can’t say the last wild card is there, but the first definitely is.
What we found was that in order to improve our search, we needed to add a -v flag to the search string. That returned our “(email@example.com) 1 results found.” as before. But this time we found the results also returns a CSV result that had a whole bunch of information such as: “User name,MailBoxDN,ServerDN,PIN,Device Type,State,Message Server,Forwarded,Sent,Pending,Filtered,Expired,….” This also exposed that the result that we were getting was actually firstname.lastname@example.org!
The solution was to now search the verbose (-v) results for SMTP:email@example.com and we would now get the desired result back. We would no longer find firstname.lastname@example.org when we really wanted to see if email@example.com exists.
I can’t really call this a bug per se. But I consider it an over site in the documentation of the function. It would be nice if there was a flag that I could pass it that would force it to only search for firstname.lastname@example.org and NOT *email@example.com*