Unlike many open source projects, which individual developers begin working on to scratch a personal itch, IndiMail arose out of a business need. Project leader Manvendra Bhangui says, “I started writing IndiMail in December 2000 when my boss asked me to move out of a proprietary messaging solution we were using to serve our users at a private ISP in India.” Today, IndiMail has grown into comprehensive messaging server that borrows ideas, code, and techniques from other open source applications.
Bhangui says, “I started off using qmail as the MTA for IndiMail, and courier-imap for providing IMAP and POP3. In the early days, I also used vpopmail for managing virtual domains. When the dot-com bubble burst in 2001, I had to keep on improving the efficiency of IndiMail so that we could serve more users without increasing hardware. IndiMail is a result of multiple incremental changes we made to increase scalability and speed.
“Over the years I’ve added around 140,000 lines of code to add features like Authenticated SMTP, DomainKeys, DKIM, and BATV. It took me around six years to make it easy enough for someone not well acquainted with Unix to install with very little assistance.
“When I started, I had to struggle. I did not know anything about messaging at the protocol level (SMTP, IMAP, POP3, etc.). While implementing qmail, I was helped by multiple individuals from the qmail mailing list, free of cost. That inspired me, and I said to myself that one day, I would share what I learned about dealing with millions of users, terabytes of daily messages, and handling spam and virus mails. In 2008 I created my project on SourceForge.net. I waited for August 15, which marks India’s independence from British rule. The date is to symbolically mark independence from proprietary software and vendors who take away your freedom, your ability to realize your potential, your money, and your peace of mind.
“I get immensely motivated when people move away from a proprietary messaging solution to IndiMail.”
What can IndiMail do? Bhangui says, “The biggest capability IndiMail provides is the ability to act as an intermediate postmaster. You can distribute your users on any server using the same domain. The servers can be placed anywhere. For instance, the messaging server serving lists.sourceforge.net could have a server located in Brazil to serve the Brazil users and another sever in India for the India users, and every location can scale independently. And if some of your users love Microsoft Exchange or Lotus Domino, you can have those servers too serving the same domain.
“One cool tip is that IndiMail can be used as an intermediate solution if you are planing to migrate your messaging server away from a proprietary solution. All you need to do is to install indimail, add the foreign users using a utility called hostcntrl, set up IMAP and POP3 proxy on port 143/110, point your outgoing SMTP to indimail, and point the MX to indimail.
“I also have to speak about speed. IndiMail uses multiple queues, with each queue running a qmail-send / qmail-todo process. This allows IndiMail to avoid what is known as the ‘silly qmail syndrome’ and significantly improves performance. In my company we have been able to serve more than 6 million messages per day using four Dell servers. The same servers were maxing out at 4 million messages per day using postfix.”
IndiMail leverages the fine work of other open source developers. Bhangui says, “My aim was to never to reinvent the wheel. I have used and built on work done by others. IndiMail makes significant modifications to qmail to provide MTA functionality. I use courier-imap-3.0.8 (an older version) because its IMAP and POP3 executables were modular and easy to integrate with an IMAP/POP3 proxy that is part of IndiMail.
“The bulk of the code is in C for performance reasons. Some of the code was extreme engineered. The philosophy was that disk writes are costly, do not connect frequently to MySQL to get the same information again and again, any code which runs inside loops should be optimised, etc. I also wrote a few shell scripts to provide minor functionalities.
“The first release did not come with any RPM. The source installation is a bit complicated as it involves downloading multiple sources (qmail, ucspi-tcp, courier-imap, bogofilter, etc.), applying patches to provide additional functionality, and final compilation. It took me some time to understand RPM packing, so the first RPM was released in February 2009. Since I don’t have access to multiple hardware, I use the openSUSE Build Service to provide RPMs for multiple Linux distributions. To write the application I use the gcc compiler, gnu autoconf, vi as my editor, and cscope when making large changes to find the impact of changing functions or parts of code. I had been using RCS for revision control. When I started using SourceForge I came across git, and with help of few folks in the Linux India Mailing list, I learned how to use it.”
IndiMail is very actively developed. Bhangui says, “I keep myself updated with what is going on in the messaging world. I have been coming out with two releases every month. I added QMTP support for remote outgoing mails in the latest 1.7.2 release, which came out last week. I’m going to add a cool tester for SMTP in the next release.
“However, I require plenty of help. IndiMail provides multiple command-line tools, an ncurses-based interface, and a Tcl/Tk-based interface for administering IndiMail, but I do not have a single web interface – my knowledge of scripting for web is absolute zero. It would be great if someone could help build a web interface for administering IndiMail.” You can contact either the project or Bhangui via e-mail.