Home / Alt manpages / frm.mailutils(1)

  • frm.mailutils(1)
  • User command
  • linux

Triage Mailbox Headers from the Shell with frm.mailutils

You want to know who has mailed you without opening a mail client or touching a single message. The frm.mailutils command lists the useful headers in a Mailutils mailbox, adds message numbers, filters by message state and tells you whether unread mail is waiting. The examples use GNU Mailutils 3.17, installed here as Debian package version 1:3.17-1.1build3.

Allow about fifteen minutes. You need a shell and a mailbox that Mailutils can open. Every command below only reads: nothing is deleted, moved, sent or marked as read.

Warning

If your mailbox holds private mail, keep its output out of tickets and shared shell transcripts.

1. Check the installed command

frm is the short name, while frm.mailutils is the canonical installed name on this system. Check which binary your shell will run, then record its version:

$ command -v frm.mailutils
/usr/bin/frm.mailutils
$ frm.mailutils --version
frm.mailutils (GNU Mailutils) 3.17

Checkpoint

You should see version 3.17. If not, note the version on your machine before relying on an example, because Mailutils provides the interface and output details can differ between package versions.

2. Point it at a mailbox

The basic form is frm.mailutils [OPTION...] [URL...]. With no URL, Mailutils resolves its configured default mailbox. That suits daily use, but it can confuse a test when user or site configuration points somewhere unexpected.

For a controlled check, pass an explicit mbox URL. This example assumes a test mailbox at /tmp/example.mbox; swap in a path you may read:

$ frm.mailutils --no-config 'mbox:/tmp/example.mbox'
Alice Example	First test message
Second Example	Second test message

--no-config stops site and user configuration files changing this particular test. It is an ordinary read-only command and needs no elevated privileges.

Warning

Do not use sudo to get round a mailbox permission problem until you have decided whether your account should be able to read that mailbox at all.

Checkpoint

If it fails, check the URL spelling and file permissions first. An empty result can mean an empty mailbox, a filter that matched nothing, or a different mailbox format from the one you expected.

3. Make the listing easier to scan

By default frm.mailutils prints a compact line per selected message, with the sender and subject. Add -n for stable message numbers you can quote in notes or a follow-up conversation:

$ frm.mailutils --no-config -n 'mbox:/tmp/example.mbox'
   1:	Alice Example	First test message
   2:	Second Example	Second test message

If the recipient matters, add -l (long option --to). The short letter looks unrelated, but it means include the To: information:

$ frm.mailutils --no-config -l -n 'mbox:/tmp/example.mbox'
   1:	([email protected])	Alice Example	First test message
   2:	([email protected])	Second Example	Second test message
  • -t or --align tidies subject lines. It changes presentation, not message selection.
  • -Q or --Quiet suppresses the displayed headers. That helps a script that wants a quiet check and is useless when you are trying to inspect mail.

4. Show a different header field

Use -f NAME to display one header field instead of the compact listing. Write header names without the colon:

$ frm.mailutils --no-config -f Subject 'mbox:/tmp/example.mbox'
First test message
Second test message
$ frm.mailutils --no-config -f Date 'mbox:/tmp/example.mbox'
Wed, 23 Sep 2026 09:00:00 +0100
Wed, 23 Sep 2026 10:00:00 +0100

This is a header display tool, not a body viewer. To investigate a message, use a mail client or another Mailutils command built to show content. A missing field does not mean a malformed message: not every message has every optional header.

5. Select messages by state

The -s STATUS option limits which messages are shown. The manpage documents new, unread, old and read, and accepts unambiguous abbreviations. In the installed version old is another spelling of unread.

$ frm.mailutils --no-config -n -s unread 'mbox:/tmp/example.mbox'
   1:	Alice Example	First test message
   2:	Second Example	Second test message
$ frm.mailutils --no-config -n -s read 'mbox:/tmp/example.mbox'

The result depends on the mailbox's message flags, so one mailbox's output proves nothing about another's state.

Tip

If a filter unexpectedly returns nothing, run the unfiltered command first, then look at how the mailbox format records its flags.

6. Turn the unread check into a shell test

-q or --query prints a message if the mailbox contains unread mail. It suits a prompt, status script or monitoring check that does not need the full listing:

$ frm.mailutils --no-config -q 'mbox:/tmp/example.mbox'
There are messages in that folder.

For automation, capture both the output and the exit status rather than treating the printed sentence as a Boolean API. The status is what your shell can branch on:

$ if frm.mailutils --no-config -q 'mbox:/tmp/example.mbox' >/tmp/frm-query.txt; then
>     echo "no unread mail"
> else
>     echo "query reported mail"
> fi
query reported mail

Tip

Use a temporary output path with suitable permissions if the query text could hold private information. This example writes only the short query message, but treat mailbox commands as data handling anyway.

7. Lint the configuration

Mailutils supports configuration files and can lint a chosen one with --config-lint. This does not repair a file or reload a service:

$ frm.mailutils --config-file /path/to/mailutils.conf --config-lint

Replace the placeholder with a real file path first. --config-file implies --no-config, so you get a deliberate configuration input rather than a mix of the chosen file and the normal site and user files.

Security boundary

Configuration can contain mailbox locations and other operational details, so do not make it world-readable while testing. Use an administrator account only when the mailbox or configuration file is intentionally restricted to administrators, and confirm the path before reading it.

There is no undo step, because none of these commands makes a persistent mailbox change.

Done means

  • Version confirmed. You checked the installed GNU Mailutils version and binary.
  • Clean listing. You can list a chosen mailbox without loading ambient configuration.
  • Useful views. You can add numbers, recipient information, a selected header field or a message-state filter.
  • Scriptable query. You can run a quiet unread-mail query and branch on its exit status.
  • Read-only. You know these examples inspect headers and flags, and never delete or send mail.