There is a built-in limitation in hMailServer which occurs when 2 billion messages has passed the server.
Every message in a hMailServer installation has a unique numeric identifier.
This message ID is used in the communication with IMAP clients. The IMAP protocol specifies that this value must never be higher than about 4 billion. This means that if you receive 2 billion messages, you will reach this limit. If you're using IMAP, you'll reach the limit sooner since a message receives a new ID when it's copied to a new folder.
If you want to determine the current situation, you can run the following SQL statement in the hMailServer database. It will show you the currently highest assigned message id in your database.
select max(messageid) from hm_messages
If this value is higher than 4 000 000 000, you will soon run into this probem.