Storing e-mail messages could have some advantages. For example, it would be easier to backup hMailServer if all data was stored in the database. However, it would also have some serious drawbacks:
When a message is being delivered by hMailServer to a client or to another email server, hMailServer delivers the email in 50kb-parts. hMailServer reads 50kb worth of data from the email message stored on disk to memory. It sends it to the client and then frees the 50KB from memory. So, when hMailServer delivers an email message, the memory usage never needs to exceed 50KB per message. There is no good way to read 50KB-parts of an email message from the database. If the email was stored in the database, hMailServer would have to read the entire email from database and cache that in memory, which would dramatically increase memory usage.
Storing the message in the database would involve several additional tasks, which would all consume CPU cycles:
insert into table (column) values ('the-puremessage-data'). Before doing this, hMailServer would have to search through the entire message and "escape" special characters, for example, escape ' to \'.To circumvent this, you could use stored procedures but not all database engines which hMailServer supports supports stored procedures.
Storing email messages on the disk gives the administrator a good overview of the messages on the server. It is possible to view an email message just by doubleclicking it, and to delete it just by pressing Delete on the keyboard. If the messages were stored in the database, the administrator would have to know how to run SQL statements.