imtest − interactive IMAP test program


imtest [ −t keyfile ] [ −p port ] [ −m mechanism ]
[ −a userid ] [ −u userid ] [ −k num ] [ −l num ]
[ −r realm ] [ −f file ] [ −n num ] [ −s ] [ −q ]
[ −c ] [ −i ] [ −z ] [ −v ] [ −I file ] [ −x file ]
[ −X file ] [ −o option=value ] hostname


imtest is a utility that allows you to authenticate to a IMAP or IMSP server and interactively issue commands to it. Once authenticated you may issue any IMAP or IMSP command by simply typing it in. It is capable of multiple SASL authentication mechanisms and handles encryption layers transparently. This utility is often used for testing the operation of a imsp or imap server. Also those developing IMAP clients find it useful.


−t keyfile

Enable TLS. keyfile contains the TLS public and private keys. Specify "" to negotiate a TLS encryption layer but not use TLS authentication.

−p port

Port to connect to. If left off this defaults to imap as defined in /etc/services.

-m mechanism

Force imtest to use mechanism for authentication. If not specified the strongest authentication mechanism supported by the server is chosen. Specify login to use the LOGIN command instead of AUTHENTICATE.

-a userid

Userid to use for authentication; defaults to the current user. This is the userid whose password or credentials will be presented to the server for verification.

-u userid

Userid to use for authorization; defaults to the current user. This is the userid whose identity will be assumed after authentication. NOTE: This is only used with SASL mechanisms that allow proxying (e.g. PLAIN, DIGEST-MD5).

-k num

Minimum protection layer required.

-l num

Maximum protection layer to use (0=none; 1=integrity; etc). For example if you are using the KERBEROS_V4 authentication mechanism specifying 0 will force imtest to not use any layer and specifying 1 will force it to use the integrity layer. By default the maximum supported protection layer will be used.

-r realm

Specify the realm to use. Certain authentication mechanisms (e.g. DIGEST-MD5) may require one to specify the realm.

-f file

Pipe file into connection after authentication.

-n num

Number of authentication attempts; default = 1. The client will attempt to do SSL/TLS session reuse and/or fast reauth (e.g. DIGEST-MD5), if possible.


Enable IMAP over SSL (imaps).


Enable IMAP COMPRESSion (before the last authentication attempt).


Enable challenge prompt callbacks. This will cause the OTP mechanism to ask for the the one-time password instead of the secret pass-phrase (library generates the correct response).


Don’t send an initial client response for SASL mechanisms, even if the protocol supports it.

-I file

Echo the PID of the running process into file (This can be useful with -X).

-x file

Open the named socket for the interactive portion

-X file

Like -x, only close all file descriptors & daemonize the process.

-o option=value

Set the SASL option to value.


Verbose. Print out more information than usual.


Timing test.



More Linux Commands

ntp_misc(5) Miscellaneous Options - Linux manual page.......
The broadcast and multicast modes require a special calibration to determine the network delay between the local and remote servers. Ordinarily, this is done...

shred(1) - overwrite a file to hide its contents, and option
Overwrite the specified FILE(s) repeatedly, in order to make it harder for even very expensive hardware probing to recover the data. Mandatory arguments to long

error_one_per_line(3) - glibc error reporting functions.....
error() is a general error-reporting function. It flushes stdout, and then outputs to stderr the program name, a colon and a space, the message specified by the

asn1_der_decoding(3) - Fill the structure *ELEMENT with valu
Fill the structure * element with values of a DER encoding string. The structure must just be created with function asn1_create_element(). Note that the * eleme

FcInitReinitialize(3) - re-initialize library (Man Page)....
Forces the default configuration file to be reloaded and resets the default configuration. Returns FcFalse if the configuration cannot be reloaded (due to confi

perlfreebsd(1) - Perl version 5 on FreeBSD systems (ManPage)
This document describes various features of FreeBSD that will affect how Perl version 5 (hereafter just Perl) is compiled and/or runs. FreeBSD core dumps from r

grolbp(1) - groff driver for Canon CAPSL printers (LBP-4 and
grolbp is a driver for groff that produces output in CAPSL and VDM format suitable for Canon LBP-4 and LBP-8 printers. For compatibility with grolj4 there is an

XkbAllocGeomShapes(3) - Allocate space for an arbitrary numb
XkbAllocGeomShapes.3 - Xkb provides a number of functions to allocate and free subcomponents of a keyboard geometry. Use these functions to create or modify key

aio_init(3) - POSIX asynchronous I/O initialization.........
The GNU-specific aio_init() function allows the caller to provide tuning hints to the glibc POSIX AIO implementation. Use of this function is optional, but to b

ip6tables-save(8) - dump iptables rules to stdout (ManPage)
iptables-save and ip6tables-save are used to dump the contents of IP or IPv6 Table in easily parseable format to STDOUT. Use I/O-redirection provided by your sh

services(5) - Internet network services list (Man Page).....
services is a plain ASCII file providing a mapping between human-friendly textual names for internet services, and their underlying assigned port numbers and pr

yaz-marcdump(1) - MARC record dump utility - Linux man page
yaz-marcdump reads MARC records from one or more files. It parses each record and supports output in line-format, ISO2709, MARCXML, MarcXchange as well as Hex o

We can't live, work or learn in freedom unless the software we use is free.