Customise Header Display#
Header Display#
When displaying a message in the pager, NeoMutt folds long header lines at $wrap columns. Though there are precise rules about where to break and how, NeoMutt always folds headers using a tab for readability.
Note
The sending side is not affected by this β NeoMutt tries to implement standards-compliant folding.
Despite not being a real header, NeoMutt will also display an mbox βFrom_β line in the pager along with other headers.
This line can be manipulated with :ignore/:unignore and :header-order/:unheader-order commands.
Selecting Headers#
Usage:
ignore string [string ...]
unignore { * | string ... }
Messages often have many header fields added by automatic processing systems, or which may not seem useful to display on the screen. This command allows you to specify header fields which you donβt normally want to see in the pager.
You do not need to specify the full header field name.
For example, ignore content- will ignore all header fields that begin with the string βcontent-β.
ignore * will ignore all headers.
To remove a previously added token from the list, use the unignore command.
The unignore command will make NeoMutt display headers matching the given string.
For example, if you do ignore x- it is possible to unignore x-mailer.
unignore * will remove all tokens from the ignore list.
Example: Header weeding
# Sven's draconian header weeding
ignore *
unignore from date subject to cc
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:
π· Screenshot Needed
Subject: Before/after header weeding
Description: Two pager views side by side (or stacked): one showing a message with all default headers visible, the other showing the same message after applying ignore * and selective unignore β only From, Date, Subject, To, Cc, and a few X- headers remain.
Highlights: The dramatic reduction in header clutter β the weeded view shows only the essential headers the user chose to keep.
The above example will show From: headers as well as mbox βFrom_β lines.
To hide the latter, instead use unignore from: date subject to cc on the second line.
Ordering Displayed Headers#
Usage:
header-order header [header ...]
unheader-order { * | header ... }
Note
Before 2026-01-13, these commands were called hdr_order and unhdr_order.
With the :header-order command you can specify an order in which NeoMutt will attempt to present these headers to you when viewing messages.
unheader-order * will clear all previous headers from the order list, thus removing the header order effects set by the system-wide startup file.
Example: Configuring header display order
header-order From Date: From: To: Cc: Subject:
π· Screenshot Needed
Subject: Custom header display order
Description: Pager view of a message where :header-order has been applied β headers appear in the configured sequence (From_, Date:, From:, To:, Cc:, Subject:) rather than the order they appear in the raw message.
Highlights: The logical reading order of headers β the most important fields (sender, date, subject) appear first, matching the configured :header-order.
User-Defined Headers#
Usage:
my-header string
unmy-header { * | field ... }
Note
Before 2026-01-13, these commands were called :my-header and :unmy-header.
The :my-header command allows you to create your own header fields which will be added to every message you send and appear in the editor if $edit_headers is set.
For example, if you would like to add an Organization: header field to all of your outgoing messages, you can put something like the following in your .neomuttrc:
my-header Organization: A Really Big Company, Anytown, USA
Note
Space characters are not allowed between the keyword and the colon (β:β). The standard for electronic mail (RFC2822) says that space is illegal there, so NeoMutt enforces the rule.
If you would like to add a header field to a single message, you should either set the $edit_headers variable, or use the <edit-headers> function (default: βEβ) in the compose menu so that you can edit the header of your message along with the body.
To remove user defined header fields, use the :unmy-header command.
You may specify an asterisk (β*β) to remove all header fields, or the fields to remove.
For example, to remove all βToβ and βCcβ header fields, you could use:
unmy-header to cc
Editing Raw Messages#
NeoMutt provides four related functions for accessing the raw RFC2822 source of a message:
Function |
Description |
|---|---|
Open the raw message source in the pager (read-only). |
|
Open the raw message in |
|
Alias for |
|
Uses |
Note
<edit-raw-message> modifies the message in place in the mailbox.
Use <view-raw-message> if you only want to inspect the source without making changes.