### 3.4 `frm` and `from` — List Headers from a Mailbox ¶

Editor’s note: The information in this node may be obsolete or otherwise inaccurate. This message will disappear, once this node revised.

GNU mailutils provides two commands for listing messages in a mailbox. These are `from` and `frm`.

The behavior of both programs is affected by the following configuration file statements:

Statement | Reference
--- | ---
debug | See The `debug` Statement.
tls | See The `tls` Statement.
mailbox | See The `mailbox` Statement.
locking | See The `locking` Statement.

#### `frm` ¶

The `frm` utility outputs a header information of the selected messages in a mailbox. By default, `frm` reads user’s system mailbox and outputs the contents of `From` and `Subject` headers for each message. If a folder is specified in the command line, the program reads that folder rather than the default mailbox.

The following command line options alter the behavior of the program:

`-d`
`--debug`

  Enable debugging output.

`-f string`
`--field string`

  Display the header named by string instead of `From` `Subject` pair.

`-l`
`--to`

  Include the contents of `To` header to the output. The output field order is then: `To` `From` `Subject`.

`-n`
`--number`

  Prefix each line with corresponding message number.

`-Q`
`--Quiet`

  Be very quiet. Nothing is output except error messages. This is useful in shell scripts where only the return status of the program is important.

`-q`
`--query`

  Print a message only if there are unread messages in the mailbox.

`-S`
`--summary`

  Print a summary line.

`-s attr`
`--status attr`

  Only display headers from messages with the given status. Attr may be one of the following: ‘`new`’, ‘`read`’, ‘`unread`’. It is sufficient to specify only first letter of an attr. Multiple `-s` options are allowed.

`-t`
`--align`

  Tidy mode. In this mode `frm` tries to preserve the alignment of the output fields. It also enables the use of BIDI algorithm for displaying subject lines that contain text in right-to-left orientation (such as Arabic or Hebrew).

#### `from` ¶

The `from` utility displays sender and subject of each message in a mailbox. By default, it reads the user’s system mailbox. If the program is given a single argument, it is interpreted as a name of the user whose mailbox is to be read. Obviously, permissions are required to access that user’s mailbox, so such invocations may be used only by superuser.

The option `-f` (`--file`) instructs `from` to read the given mailbox.

The full list of options, supported by `from` follows:

`-c`
`--count`

  Prints only a count of messages in the mailbox and exit.

`-d`
`--debug`

  Prints additional debugging output.

`-s string`
`--sender=string`

  Prints only mail with ‘`From:`’ header containing the supplied string.

`-f url`
`--file=url`

  Examine mailbox from the given url.