MAILBOX-PREVIEW(1) | General Commands Manual | MAILBOX-PREVIEW(1) |
mailbox-preview - list new email messages in an IMAP mailbox
mailbox-preview [[server][:mailbox]] [
--option ... ]
mailbox-preview mail_spool_file_name [ --option ... ]
mailbox-preview [[server][:mailbox]] --check
oldsize [ --option ... ]
mailbox-preview mail_spool_file_name --check
oldsize [ --option ... ]
The mailbox-preview program reads an IMAP mailbox and uses scan(1) to display a summary, one line per new message. It can be used stand-alone on the command line or as the back-end of a graphical, literate new-mail notification program such as xlbiff(1).
The optional first argument is an optional name of an IMAP server (default “imap”), optionally followed by a colon and a mailbox name (default “inbox”). Unless the default name imap resolves on your network to the name of your IMAP server, you will need this argument. It is likely that the default mailbox name inbox will work for you.
Your ~/.netrc file is consulted for the login and password for the IMAP server. See the FILES section, below, for the format of this file.
If the first argument to mailbox-preview is instead the name of a file under a top-level directory that exists, it is treated as the name of a local mail drop, and that file is used instead of doing IMAP.
With --check, the program conforms to the checkCommand protocol of xlbiff(1). The output is the new mailbox size to pass next time as the argument to --check. (The contents of the mailbox are not output.) The exit value of the program describes how the mailbox size has changed, as documented under the -checkCommand option in xlbiff(1).
machine server_name login account_name password your_pw
When reporting interoperability problems with an IMAP server, include the output of
mailbox-preview srvr --imap-debug=4 --quiet 2>&1 | grep -v " LOGIN "
Example command lines:
mailbox-preview imap.example.com mailbox-preview imap.example.com --check 12
Stephen Gildea, November 2021
2022-12-01 |