Friday, June 15, 2007

Hacking into Zimbra

Well, if your job has anything to do with mail servers or collaboration suites, u must have read or atleast heard about Zimbra Collaboration Suite (catch them here). Its an excellent open source project showcasing how open source projects can be leveraged to create an exceptional product which can really challenge Microsoft Exchange's hegemony in corporate mail. Its projects like Zimbra, Firefox, Ubuntu which really make people look up and take notice of open source (i clearly mean no disrespect to other projects but these projects are easy to use for the not-so-techy consumer which is something Microsoft has always been excellent at).

My tryst with zimbra started last year when myself, shreyas and karthik were trying to set-up a mail server for the college so that mail accounts can be given to students. Thats when searching for various options i came across zimbra, it seemed excellent with all the features but it still wasnt ready for all our requirements, one of which was support on Ubuntu. So that time we went ahead with karthik's idea and installed qmail/vpopmail/squirrelmail. Now, Zimbra is available on Ubuntu and is a more feature-rich product with a increasing user-base and a very helpful and knowledgeable community. I wont be writing how good zimbra is coz u can find that by a simple google search.

Now coming to main content of the post, here's a screen shot of the default zimbra login page:

As you can see, its a very clean and beautiful page, but thats not the most important thing when it is to be used for e-mail service in a college environment.

The first and foremost important thing is to be able to put up notices and policies on the login page so that no one misses them. Then, there are dozens of domains and everyone hates entering complete email-addresses (which usually are very long ex: while logging into the system. Zimbra has a good feature called virtual host which can remove the need to enter the domain name part of the username, so that the user needs to enter only the username and can login into the system. That is a great feature when used in a single or at the most in a two domain configuration but when it comes to more than that it fails because it cannot resolve when same username exists in more than one domain, which will surely happen when you have more than 3000 users spread over a dozen domains.

So my first task after a successful installation of zimbra was to put up notices on it and second one was to put a drop-down list of domains. The zimbra web client is designed in JSP and AJAX, technologies which are exceptional to work with but i have never worked on them and this was my first exposure to them, i was really baffled when i first saw there source code. But slowly reading through it and with a lot of help from the zimbra forum (here), i was to able to find that the simplest way to implement it would be to modify the 'simple client' login page which resides as /h/login on the server. Its just straightforward JSP and html code in there, which is easily hackable.

After all the hacking and everything, this is the final page which i have ended with:

Hoping that it passes all the testing and gets the go ahead from the authorities as well. Its just a way too good experience to be on zimbra, hoping to be able to roll it out to the users pretty soon.

Just a little bit of more information, if you want to implement SSO with zimbra, have a look at there preauth library, u will find that its all that you need.

Notice: My postings may make people think that i am against Microsoft or closed source, but its nothing like that, i believe that both methodologies must exist for benefit of one and all. Just that my work is generally related to open-source technologies thats why i blog about them. People who know about me, please dont take this notice otherwise.


Anonymous said...

hi i was wondering how you got that domain name dropdown menu to work. I've searched and posted on the zimbra forum but to no avail.

I'd really appreciate your help.

my email is or

Thank You

Adejar said...

Very good this post, I would like to get more details about this interesting work. In zimbra forum nothing about it.

Me too "really appreciate your help"...

My emails is


Anonymous said...

Same question what people earlier asked.please send details to

Anonymous said...

i did not get mail from you.please do send.

Hugovn said...

It's great. Please help me your instruction detail for this work if possible. Thank you very much.

My email:

Tushar said...

Khup Chhaan....... Mala Tujhi style avadli.. Pan Thodishi aankhi hint deshil ka Please....

Tushar Niras

financial home said...

I need a zimbra email,help send username/password to my email thank you.