Fork me on GitHub

newmail

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.

News

2008-02-02

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

Getting newmail

Grab the tarball, or do a git clone http://code.burningsoda.com/newmail!

Examples

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

Documentation

SYNOPSIS

newmail [OPTION]... [DIRECTORY]

DESCRIPTION

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.

OPTIONS

-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.

License

newmail is released under the following license:

Copyright© 2006 Robert Lillack, burningsoda.com
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.