Name
formail
Synopsis
formail [options]Filter standard input into mailbox format. Useful for splitting mail digests or passing the contents of a mail file to another program such as a spam filter for additional processing. If no sender is apparent, provide the sender foo@bar. By default, escape bogus From lines with >.
Options
- + skip
Do not split first skip messages.
- - total
Stop after splitting total messages.
- -a headerfield
Append headerfield to header, unless it already exists. If headerfield is Message-ID or Resent-Message-ID with no contents, generate a unique message ID.
- -b
Do not escape bogus From lines.
- -c
When header fields are more than one line long, concatenate the lines.
- -d
Do not assume that input must be in strict mailbox format. This option disables recognition of the Content-Length field so you can split digests or use nonstandard mailbox formats
- -e
Allow messages to begin one immediately after the other; do not require empty space between them.
- -f
Do not edit non-mailbox-format lines. By default, formail prepends From to such lines.
- -i headerfield
Append headerfield whether or not it already exists. Rename each existing headerfield to Old- headerfield, unless it is empty.
- -k
For use only with -r. Keep the body as well as the fields specified by -r.
- -m minfields
Require at least minfields before recognizing the beginning of a new message. Default is 2.
- -n
Allow simultaneous formail processes to run.
- -p prefix
Escape lines with prefix instead of >.
- -q
Do not display ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access