Fork me on GitHub


a mail tool.

newmail is a command line utility to check for new/unread mail in a recursive Maildir++ folder structure. It is written in pure ANSI C, should work on any POSIX compatible system, and can be used for other stuff—like, for example, in combination with Mutt—too.



The darcs repository is gone for a while, but newmail is available via git now. See below!


Initial release of newmail 1.0.

Getting newmail

Grab the tarball, or do a git clone and run `make install`


These are some “usage scenarios” of newmail. For the complete documentation refer to the man page or see below.



newmail [OPTION]... [DIRECTORY]


For the Maildir++ structure DIRECTORY ($HOME/Maildir by default), newmail lists all folders containing unread mail alphabetically as well as the number of unread mails.


-a, --all
Count the total number of mails for every folder in DIRECTORY.

-m, --mutt
Output folder names in a mutt friendly way. Using this option the output of newmail can be used by the mailboxes command in mutt (see below).

This options has no effect, if --total is specified.

-n, --no-unseen
Do not treat unseen mails as new. This may be used to speed up newmail, especially on slow file systems. Only use this option if you are sure that no other process watches the structure and moves mails out of the new/ to the cur/ directory of the mail folders. IMAP servers typically do this, once they told clients about those mails.

This options has no effect, if --all is specified.

-t, --total
Sum up the total number of mails (according to the other options, of course) and display nothing but this number.