Easiest way to test Dovecot is to use ImapTest.
It can be used to flood a server with random commands and it can also attempt to mimic a large number of real-world clients.
Revision db9d193fbc0a