I've worked a few years for a small isp. When the company started, it only had a few users and we simply put them in /etc/passwd. The company also offered free email-accounts and thus we had a growing number of users. When we had about a thousand users, it became obvious that /etc/passwd was a bad idea: our pop-logins started to go extremely slow and even mail-delivery wasn't as smooth as before. Our first solution was to use NIS: a kind of userdatabase and unsecure as hell. POP-logins went fast again but the NIS-software wasn't very stable and we got troubles every time the NIS-server went down, since qmail started to bounce the mails. A solution with a local NIS-slave-server was an improvement but still somewhat troublesome: even the slave sometimes crashed.

We also had a few virtual domains. The qmail-setup for virtual domains went fine, but pop-authentication didn't: we couldn't define two pop-logins with the name 'info'.

At the same time we also wanted to manage the user-administration with a database: every time a user was created, its data was added to the database. So we had a database containg user-info and a passwd-file (NIS) containing the same information: one source too much, since it was hard to get them synchronized. At that point i decided we needed an integrated mail-database- system.

There were two popular database-solutions at that moment: postgresql and mysql. I didn't like mysql, since they were not a fully open source. Postgresql was shipped with RedHat, which would make the upgrade of the database quite easy. There was also an odbc-driver available for postgres, which made it possible to do some adminstration with Microsoft Access. So i chose postgresql.

There was a patch existing to integrate qmail and a relational database: qmail+mysql. My first plan was to port it to pgsql such that it would work exactly as qmail+mysql. Quite soon it turned out that i wanted a lot more than the existing qmail+mysql: I wanted quota on my mailboxes and wanted to get completely rid of /etc/passwd.

On november 14 1999 I released version 0.01. I had working maildeliveries, virtual domains and quota. There was also working pop-authentication for these virtual domains: our users now had to login as username@domain. I wrote in my todo-list that i needed imap-support. I also wrote sqlcreatehomedir: the management no longer had to run scripts on the server every time a user was added since qmail-sql created the homedir itself when receiving the first mail for that user.

Alex Howansky mailed me that he had an imap-patch which did exactly what i wanted the thing to do and we started to work together to improve the system. I also started using a configurationfile: until then all column-names were hardcoded. After adding the necessary features, I maintained the program but didn't add much features: our mailservers were running smoothly and i only added features asked on the mailinglist.

In july 2001 i finally graduated and found time to rewrite big parts of the program and add the dotqmail-feature: forwardings are now also defined in the database and user-administration is now fully controlled with the database. I also reconsidered my database-choice: mysql was now fully open source and very popular. To test the performance between pgsql and mysql i started to write the program for mysql too. Since some small tests prove that mysql is still a lot faster than postgresql i decided to abandon the qmail-pgsql project and start the qmail-sql project. However i'm still using postgresql at my servers since i wrote a lot of scripts for them and i'm still convinced that postgresql is a good database but obviously not the fastest.

Since this project builds on the qmail+pgsql-patch, i decided to continue the version-numbering. Version 0.18 was the first qmail-sql-patch.