MH-MAIL(5)
π MH-MAIL(5) β the tea on message format for the nmh message system π
okay bestie, sit down, grab a strawberry π, because we're about to talk about the exact shape a message has to be in for nmh to vibe with it. this is mh-mail, from the File Formats Manual, and it's genuinely not that deep once you see it. let's go π
β¨ NAME β¨
mh-mail β the message format for the nmh message system. that's it. that's the whole thing. iconic. π
πΈ DESCRIPTION πΈ
so here's the situation. nmh processes messages in a particular format. and yeah, lowkey, neither the Bell nor the Berkeley mailers produce message files in the format that nmh prefers β but nmh can still read message files in that format. so we're not exclusive, we're just particular. π
Every user possesses a mail drop, which initially receives all the messages processed by post. Then inc will read from that mail drop and incorporate the new messages it finds there into the user's own mail folders (typically +inbox). The mail drop consists of one or more messages.
Messages are expected to consist of lines of text. Graphics and binary data are not handled. No data compression is accepted. All text is clear ASCII 7-bit data. that's the vibe check and binary does NOT pass it, sorry not sorry π
The general "memo" framework of RFC 822 is used. A message consists of a block of information in a rigid format, followed by general text with no specified format. The rigidly formatted first part of a message is called the header, and the free-format portion is called the body. The header must always exist, but the body is optional. These parts are separated by an empty line, i.e., two consecutive newline characters. Within nmh, the header and body may be separated by a line consisting of dashes:
From: Local Mailbox <user@example.com>
To:
cc:
Fcc: +outbox
Subject:
The header is composed of one or more header items. Each header item can be viewed as a single logical line of ASCII characters. If the text of a header item extends across several real lines, the continuation lines are indicated by leading spaces or tabs. (yes bestie, wrap your header and just indent the rest β she'll understand β¨)
Each header item is called a component and is composed of a keyword or name, along with associated text. The keyword begins at the left margin, may not contain spaces or tabs, may not exceed 63 characters (as specified by RFC 822), and is terminated by a colon (`:`). Certain components (as identified by their keywords) must follow rigidly defined formats in their text portions.
The text for most formatted components (e.g., Date: and Message-Id:) is produced automatically. The only ones entered by the user are address fields such as To:, cc:, etc. Internet addresses are assigned mailbox names and host computer specifications. The rough format is local@domain, such as MH@UCI, or MH@UCI-ICSA.ARPA. Multiple addresses are separated by commas. A missing host/domain is assumed to be the local host/domain.
As mentioned above, a blank line (or a line of dashes) signals that all following text up to the end of the file is the body. No formatting is expected or enforced within the body. the body is free range, organic, grass fed. do whatever. π
Following is a list of header components that are considered meaningful to various nmh programs.
π the header components, one by one π
Date:β Added bypost, contains date and time of the message's entry into the mail transport system.From:β This header is filled in by default with the system's idea of the user's local mailbox. This can be changed with the Local-Mailbox profile entry. It contains the address of the author or authors (may be more than one if aSender:field is present). For a standard reply (usingrepl), the reply address is constructed by checking the following headers (in this order):Mail-Reply-To:,Reply-To:,From:,Sender:. AFrom:header MUST exist when the message is sent topost, otherwise the message will be rejected. noFrom:, no send. periodt.Envelope-From:β Used bypostto specify a value for the sender's envelope address to the mail transport system. If omitted,postwill use the value of theSender:or theFrom:header. Seesend(1)for more details.Mail-Reply-To:β For a standard reply (usingrepl), the reply address is constructed by checking the following headers (in this order):Mail-Reply-To:,Reply-To:,From:,Sender:.Mail-Followup-To:β When making a "group" reply (usingrepl -group), any addresses in this field will take precedence, and no other reply address will be added to the draft. If this header is not available, then the return addresses will be constructed from theMail-Reply-To:, orReply-To:, orFrom:, along with adding the addresses from the headersTo:,cc:, as well as adding your personal address.Reply-To:β For a standard reply (usingrepl), the reply address is constructed by checking the following headers (in this order):Mail-Reply-To:,Reply-To:,From:,Sender:.Sender:β Required bypostin the event that the message has multiple addresses on theFrom:line. It is otherwise optional. This line should contain the address of the actual sender.To:β Contains addresses of primary recipients.cc:β Contains addresses of secondary recipients.Bcc:β Still more recipients. However, theBcc:line is not copied onto the message as delivered, so these recipients are not listed. nmh uses an encapsulation method for blind copies, seesend(1). sneaky and valid πDcc:β Still more recipients. However, theDcc:line is not copied onto the messages as delivered. Recipients on theDcc:line receive the same message as recipients on theTo:andcc:lines. Seesend(1)for more details. Dcc is not supported with thesendmail/pipemail transport method.Fcc:β Causespostto copy the message into the specified folder for the sender, if the message was successfully given to the transport system.Message-ID:β A unique message identifier added bypostif the-msgidflag is set.Subject:β Sender's commentary. It is displayed byscan.In-Reply-To:β A commentary line added byreplwhen replying to a message.Resent-Date:β Added when redistributing a message bypost.Resent-From:β Used instead of theFrom:header whenpostredistributes a message. SeeFrom:.Resent-To:β New recipients for a message resent bydist.Resent-cc:β Still more recipients. Seecc:andResent-To:.Resent-Bcc:β Even more recipients. SeeBcc:andResent-To:.Resent-Fcc:β Copy resent message into a folder. SeeFcc:andResent-To:.Resent-Message-Id:β A unique identifier glued on bypostif the-msgidflag is set. SeeMessage-Id:andResent-To:.Resent:β Annotation fordistunder the-annotateoption.Forwarded:β Annotation forforwunder the-annotateoption.Replied:β Annotation forreplunder the-annotateoption.Attach:β Used bymhbuildto specify a filename to attach to this message. Seemhbuild(1)for more information. β¨
π¦ FILES π¦
/var/mail/$USERβ Location of mail drop.
π SEE ALSO π
- Standard for the Format of ARPA Internet Text Messages (RFC 822)
π CONTEXT π
None
and that's the whole page bestie, you ate that π«Ά this was nmh version nmh-1.8, dated 2014-01-08, straight from the MH-MAIL(5) File Formats Manual. go forth and format your mail correctly, main character ππ
π¦ where this page comes from
- alpine 3.24: nmh-doc 1.8-r3 Β· BSD-3-Clause
- epel 10: nmh 1.8-3.el10_1 Β· BSD
- epel 9: nmh 1.8-1.el9 Β· BSD
- fedora 43: nmh 1.8-9.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: nmh 1.8-10.fc44 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: nmh 1.8
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- opensuse-leap 16.0: nmh 1.8-bp160.1.13 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms