POST(8)

๐Ÿ“ฆ
version 1.8 ยท 4 versions
, in alpine 3.24, epel 10, epel 9, fedora 43, fedora 44

๐Ÿ’Œ post(8) โ€” deliver an nmh message ๐Ÿ’Œ

okay so bestie, we're in POST(8), from the System Manager's Manual (section 8, the big-kid system manager section, yes ma'am ๐Ÿ’…). this is literally the program that makes your mail actually go somewhere. sit down, grab a snack, we're doing this properly ๐Ÿซถ


๐Ÿ“› NAME ๐Ÿ“›

post โ€” deliver an nmh message โœจ


๐ŸŽ€ SYNOPSIS ๐ŸŽ€

/usr/libexec/nmh/post [-help] [-version] [-alias aliasfile] [-filter
     filterfile] [-nofilter] [-format | -noformat] [-mime | -nomime]
     [-msgid | -nomsgid] [-messageid localname | random] [-verbose |
     -noverbose] [-watch | -nowatch] [-width columns] [-mts smtp |
     sendmail/smtp | sendmail/pipe] [-sendmail program] [-server
     servername] [-port portname/number] [-sasl] [-nosasl] [-saslmech
     mechanism] [-user username] [-tls] [-initialtls] [-notls] [-snoop]
     file

๐ŸŒธ DESCRIPTION ๐ŸŒธ

post is the default program that send calls to deliver the message in file to local and remote users. the way that almost everything you'd credit to send in its manual page is actually being done by post, with send just sitting there acting like a relatively simple preprocessor ๐Ÿ˜ญ. so it's post that parses the various header fields, appends a โ€œDate:โ€ line, and interacts with the mail transport system. you will not normally call post directly, but you can replace it yourself with a postproc profile component that will have file as its final argument. go read mh-profile(5) for the tea on postproc ๐Ÿ“

post searches the โ€œTo:โ€, โ€œcc:โ€, โ€œBcc:โ€, โ€œFcc:โ€, and โ€œResent-xxx:โ€ header lines of the specified message for destination addresses, checks those addresses for validity, and formats them so as to conform to ARPAnet Internet Message Format protocol โ€” unless the -noformat flag is set. this will normally cause โ€œ@local-siteโ€ to be appended to each local destination address, as well as any local return addresses. the -width columns switch can be used to indicate the preferred length of the header components that contain addresses ๐Ÿ‘‘

if a โ€œBcc:โ€ field shows up, its addresses will be used for delivery, and the โ€œBcc:โ€ field will be removed from the message sent to sighted recipients. the blind recipients will receive an entirely new message with a minimal set of headers. the body of this new message will contain a copy of the message sent to the sighted recipients, either marked up with the indicator text "Blind-Carbon-Copy" or encapsulated as a MIME digest โœจ

if -filter filterfile is specified, then this copy is filtered (re-formatted) by mhl prior to being sent to the blind recipients. alternately, if the -mime switch is given, then post will use the MIME rules for encapsulation ๐Ÿ’ซ

if a โ€œDcc:โ€ field shows up and the sendmail/pipe mail transport method is not in use, its addresses will be used for delivery, and the โ€œDcc:โ€ field will be removed from the message. the blind recipients will receive exactly the same message as the sighted recipients.

WARNING โ€” recipients listed in the โ€œDcc:โ€ field receive no explicit indication that they have received a โ€œblind copyโ€. this can cause blind recipients to inadvertently reply to all of the sighted recipients of the original message, revealing that they received a blind copy. on the other hand, since a normal reply to a message sent via a โ€œBcc:โ€ field will generate a reply only to the sender of the original message, it takes extra effort in most mailers to reply to the included message, and so would usually only be done deliberately, rather than by accident. ๐Ÿ’€

post rejects any message that contains a โ€œDcc:โ€ field if the sendmail/pipe mail transport method is used ๐Ÿšซ

the -alias aliasfile switch can be used to specify a file that post should read aliases from. more than one file can be specified, with each being preceded by -alias. in any event, the primary alias file is read first ๐ŸŒˆ

the -msgid switch indicates that a โ€œMessage-ID:โ€ or โ€œResent-Message-ID:โ€ field should be added to the header.

the -messageid switch selects the style used for the part appearing after the @ in โ€œMessage-ID:โ€, โ€œResent-Message-ID:โ€, and โ€œContent-ID:โ€ header fields. the two acceptable options are localname (which is the default), and random. with localname, the local hostname is used. with random, a random sequence of characters is used instead. note that the -msgid switch must be enabled for this switch to have any effect โญ

the -verbose switch indicates that the user should be informed of each step of the posting/filing process.

the -watch switch indicates that the user would like to watch the transport system's handling of the message (e.g., local and โ€œfastโ€ delivery) ๐Ÿ‘€

under normal circumstances, post uses the โ€œFrom:โ€ line in the message draft as the identity of the originating mailbox. a โ€œFrom:โ€ line is required in all message drafts. by default the message composition utilities such as comp, repl and mhmail will automatically place a โ€œFrom:โ€ line in the message draft. there are two ways to override this behavior, however. note that they apply equally to โ€œResent-From:โ€ lines in messages sent with dist ๐Ÿฆ‹

  1. the first way is to supply a โ€œSender:โ€ line. the value of this field will be used as the originating mailbox identity when submitting the message to the mail transport system. if multiple addresses are given in the โ€œFrom:โ€ line, a โ€œSender:โ€ line is required. if an โ€œEnvelope-From:โ€ line is supplied when multiple addresses are given in the โ€œFrom:โ€ line, a โ€œSender:โ€ header will be generated using the value of the โ€œEnvelope-From:โ€ line, if the โ€œEnvelope-From:โ€ line is not blank.
  2. the second way is to supply a โ€œEnvelope-From:โ€ line. the value of this field will be used as the originating mailbox identity when submitting the message to the mail transport system. this will override both the value of the โ€œFrom:โ€ line and a โ€œSender:โ€ line (if one is supplied). the โ€œEnvelope-From:โ€ line is allowed to have a blank value; if the value is blank, then the mail transport system will be instructed to not send any bounces in response to the message. not all mail transport systems support this feature ๐Ÿ’œ

the mail transport system default is defined in /etc/nmh/mts.conf but can be overridden here with the -mts switch.

if nmh is using sendmail/pipe or sendmail/smtp as its mail transport system, the -sendmail switch can be used to override the default sendmail program.

if nmh is using the SMTP MTA, the -server and -port switches can be used to override the default mail server and port. the default server is set with servers in /etc/nmh/mts.conf, and the default port is submission, 587 ๐Ÿ”ฅ

if nmh has been compiled with SASL support, the -sasl and -nosasl switches will enable and disable the use of SASL authentication with the SMTP MTA. depending on the SASL mechanism used, this may require an additional password prompt from the user (but the netrc file can be used to store this password, as described in mh-profile(5). the -saslmech switch can be used to select a particular SASL mechanism, and the -user switch can be used to select an authorization userid to provide to SASL, other than the default. the credentials profile entry in mh-profile(5) describes the ways to supply a username and password ๐Ÿ”

if SASL authentication is successful, nmh will attempt to negotiate a security layer for session encryption. encrypted data is labelled with (sasl-encrypted) and (sasl-decrypted) when viewing the SMTP transaction with the -snoop switch. base64-encoded data is wrapped with b64<>. (beware that the SMTP transaction may contain authentication information either in plaintext or easily decoded base64 ๐Ÿ‘€)

if nmh has been compiled with TLS support, the -tls and -initialtls switches will require the negotiation of TLS when connecting to the SMTP MTA. the -tls switch will negotiate TLS as part of the normal SMTP protocol using the STARTTLS command. the -initialtls will negotiate TLS immediately after the connection has taken place, before any SMTP commands are sent or received. encrypted data is labelled with (tls-encrypted) and (tls-decrypted) when viewing the SMTP transaction with the -snoop switch. base64-encoded data is wrapped with b64<>. (beware that the SMTP transaction may contain authentication information either in plaintext or easily decoded base64.) the -notls switch will disable all attempts to negotiate TLS ๐Ÿ”’

if port 465 is specified and none of the TLS switches were enabled, -initialtls will be implied if TLS support was compiled in. though port 465 for SMTPS (SMTP over SSL) was deregistered by IANA in 1998, it is still used for that service ๐Ÿ’€

post filters out header lines with names beginning with โ€œNmh-โ€ (case insensitive) from the message draft. those lines are reserved for internal nmh use ๐Ÿ™ˆ


๐Ÿ“ FILES ๐Ÿ“

  • /etc/nmh/mts.conf โ€” nmh mts configuration file
  • /etc/nmh/MailAliases โ€” global nmh alias file
  • /usr/bin/refile โ€” Program to process Fcc:s
  • /usr/libexec/nmh/mhl โ€” Program to process Bcc:s

๐Ÿงš PROFILE COMPONENTS ๐Ÿงš

post does not consult the user's .mh_profile โ€” nope, not even a little bit ๐Ÿšซ


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

mhmail(1), send(1), mh-mail(5), mh-alias(5), mh-profile(5), mh-tailor(5)

Standard for the Format of ARPA Internet Text Messages (RFC 822)


โญ DEFAULTS โญ

  • -alias defaults to /etc/nmh/MailAliases
  • -format
  • -nomime
  • -nomsgid
  • -messageid localname
  • -noverbose
  • -nowatch
  • -width 72
  • -nofilter

๐ŸŒˆ CONTEXT ๐ŸŒˆ

None โ€” nothing to see here bestie, it's giving nothing ๐Ÿ’…


๐Ÿ’€ BUGS ๐Ÿ’€

โ€œReply-To:โ€ fields are allowed to have groups in them according to the RFC 822 specification, but post won't let you use them. it said no ๐Ÿ˜ญ


and that's the whole page, bestie โ€” this was nmh-1.8, dated 2016-10-17, page POST(8) ๐ŸŽ€โœจ go deliver some mail, you absolute icon ๐Ÿซถ๐Ÿ’–

๐Ÿ“ฆ where this page comes from