IMAP Tester

imaptest was originally written for stress testing [ Dovecot] IMAP server. Its primary testing method is still stress testing, but now it also parses the incoming IMAP replies and complains if anything looks broken.


  1. Download and compile Dovecot v1.1 sources. imaptest uses its library functions.
    1. Get the latest beta from

    2. Compiling goes the usual way: ./configure && make (there's no need for make install)

  2. Download to Dovecot sources' root directory (i.e. where the configure script exists)

  3. imaptest's header comment shows the compile command for gcc, use it or something similar.

You may want to modify the default configuration from #defines at the top of the file. This isn't required, but if you run imaptest often this way you don't have to give the same parameters every time.


The most important parameters (and their defaults) are:

Other useful parameters include:

Selecting what to test:

Append mbox

When saving messages, imaptest needs to get the messages from somewhere. mbox=path parameter specifies path to a file in mbox format that's used. Messages are sequentially appended from there. Once imaptest reaches the last message, it wraps back to appending the first message.

Currently imaptest's state tracking expects that Message-IDs are unique within the mbox, otherwise it gives bogus errors. If you really want to avoid changing the Message-IDs, use no_tracking setting to disable state tracking.

You can get a test mbox file from for example Note that it contains non-unique Message-IDs so you'll have to write some script to change those.