getmail [OPTION] ...


getmail can retrieve messages from POP3, IMAP4, and SDPS mailboxes. SSL-wrapped POP3 and IMAP are also supported. Single-user and domain (multi-drop) mailboxes are supported.

getmail has built-in support for delivering to maildirs, mboxrd-format mbox files, and external MDAs.



show program's version number and exit

-h, --help

show a short usage summary and exit

-gDIR, --getmaildir=DIR

look in DIR for config/data files

-rFILE, --rcfile=FILE

load configuration from FILE (may be given multiple times)


dump configuration and exit (debugging)


print extended trace information (extremely verbose)


maintain connection and listen for new messages in FOLDER. This flag will only work if a single rc file is given, and will only work on IMAP connections where the server supports IMAP4 IDLE (RFC 2177).

The following options override any in the configuration file(s).

-v, --verbose

operate more verbosely (can be given multiple times)

-q, --quiet

do not print informational messages

-d, --delete

delete messages from server after retrieving

-l, --dont-delete

do not delete messages from server after retrieving

-a, --all

retrieve all messages

-n, --new

retrieve only unread messages


Written by Charles Cazabon.


Report bugs to <[email protected]>.

IMPORTANT: include the output of getmail [options] --dump with any bug report.


Copyright © 1998-2009 Charles Cazabon

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

RELATED TO getmail…

The full documentation for getmail is maintained in HTML and plaintext formats. See the included files for details.