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 “(email@example.com) 1 results found.” Unfortunately, we were getting false positives on our searches. firstname.lastname@example.org does not exist on our BES system. However, email@example.com does. So if you search for firstname.lastname@example.org, what you are really search for is *email@example.com* 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 “(firstname.lastname@example.org) 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 email@example.com!
The solution was to now search the verbose (-v) results for SMTP:firstname.lastname@example.org and we would now get the desired result back. We would no longer find email@example.com when we really wanted to see if firstname.lastname@example.org 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 email@example.com and NOT *firstname.lastname@example.org*