2011-03-30 13:49:47 +00:00
|
|
|
.TH MARSHAL 1
|
|
|
|
.SH NAME
|
|
|
|
marshal \- formatting and sending mail
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B upas/marshal
|
|
|
|
[
|
|
|
|
.B -[aA]
|
|
|
|
.I attachment
|
|
|
|
] [
|
|
|
|
.B -C
|
|
|
|
.I copyaddr
|
|
|
|
] [
|
2012-11-27 20:10:55 +00:00
|
|
|
.B -B
|
|
|
|
.I copyaddr
|
|
|
|
] [
|
2012-10-01 22:37:17 +00:00
|
|
|
.B -Fr#xn
|
|
|
|
] [
|
2020-11-07 02:15:15 +00:00
|
|
|
.B -S
|
|
|
|
.I saveto
|
|
|
|
] [
|
2012-10-01 22:37:17 +00:00
|
|
|
.B -p[es]
|
2011-03-30 13:49:47 +00:00
|
|
|
] [
|
|
|
|
.B -R
|
|
|
|
.I reply-msg
|
|
|
|
] [
|
|
|
|
.B -s
|
|
|
|
.I subject
|
|
|
|
] [
|
|
|
|
.B -t
|
|
|
|
.I mime-type
|
|
|
|
] [
|
2012-10-01 22:37:17 +00:00
|
|
|
.B -8
|
|
|
|
|
|
2011-03-30 13:49:47 +00:00
|
|
|
.I mailaddr ...
|
|
|
|
]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
.I Marshal
|
|
|
|
builds a mail message from standard input and passes it,
|
|
|
|
if the body is non-empty,
|
|
|
|
for transmission or delivery to
|
|
|
|
.BI /mail/box/ username /pipefrom
|
|
|
|
if it exists, otherwise to
|
|
|
|
.BR /bin/upas/send .
|
|
|
|
The message format is both RFC 822 and
|
|
|
|
MIME conformant, so
|
|
|
|
.I marshal
|
|
|
|
adds any required headers not already in the message, prefixed by
|
|
|
|
the contents of
|
|
|
|
.BI /mail/box/ username /headers\f1.
|
|
|
|
This allows the addition of personal headers like
|
|
|
|
.B From:
|
|
|
|
lines with a full name or a different
|
|
|
|
return address.
|
|
|
|
Command line options direct marshal to add a subject line
|
|
|
|
and append attachments. The arguments to
|
|
|
|
.I marshal
|
|
|
|
are the addresses of the recipients.
|
|
|
|
.PP
|
|
|
|
When running in a
|
|
|
|
.IR rio (1)
|
|
|
|
window,
|
|
|
|
.I marshal
|
|
|
|
automatically puts the window into hold mode (see
|
|
|
|
.IR rio (1));
|
|
|
|
this means that the message can be edited freely,
|
|
|
|
because nothing will be sent to
|
|
|
|
.I marshal
|
|
|
|
until the ESC key is hit to exit hold mode.
|
|
|
|
.PP
|
|
|
|
The options are:
|
|
|
|
.TF "-a file"
|
|
|
|
.TP
|
|
|
|
.BI -a file
|
|
|
|
directs
|
|
|
|
.I marshal
|
|
|
|
to append
|
|
|
|
.I file
|
|
|
|
as a mime attachment.
|
|
|
|
Unless explicitly specified by the
|
|
|
|
.B -t
|
|
|
|
option, the type of the attachment is determined
|
|
|
|
by running the
|
|
|
|
.IR file (1)
|
|
|
|
command.
|
|
|
|
.TP
|
|
|
|
.BI -A file
|
|
|
|
is like
|
|
|
|
.B -a
|
|
|
|
but the message disposition is marked as
|
|
|
|
.I inline
|
|
|
|
directing any mail reader to display the attachment
|
|
|
|
(if it can) when the mail message is read.
|
|
|
|
.TP
|
|
|
|
.BI -C copyaddr
|
2012-11-27 20:10:55 +00:00
|
|
|
or
|
|
|
|
.BI -B copyaddr
|
2011-03-30 13:49:47 +00:00
|
|
|
adds a
|
|
|
|
.B Cc:
|
2012-11-27 20:10:55 +00:00
|
|
|
or
|
|
|
|
.B Bcc:
|
2011-03-30 13:49:47 +00:00
|
|
|
header with
|
|
|
|
.I copyaddr
|
|
|
|
and also adds
|
|
|
|
.I copyaddr
|
|
|
|
as a recipient.
|
|
|
|
.TP
|
2012-10-01 22:37:17 +00:00
|
|
|
.BI -F
|
|
|
|
file the message
|
|
|
|
.TP
|
2020-11-07 02:15:15 +00:00
|
|
|
.BI -S saveto
|
|
|
|
file the message into the
|
|
|
|
.I saveto
|
|
|
|
mailbox.
|
|
|
|
.TP
|
2011-03-30 13:49:47 +00:00
|
|
|
.BI -n
|
|
|
|
intentionally no standard input
|
|
|
|
.TP
|
|
|
|
.B -#xr
|
|
|
|
are all passed as command line options to the
|
|
|
|
.I send
|
|
|
|
that
|
|
|
|
.I marshal
|
|
|
|
invokes.
|
|
|
|
.TP
|
|
|
|
.BI -R replymsg
|
|
|
|
tells marshal what message this one is in reply to.
|
|
|
|
.I Replymsg
|
|
|
|
is an
|
|
|
|
.IR upasfs (4)
|
|
|
|
directory containing the message.
|
|
|
|
.I Marshal
|
|
|
|
uses any message id in this message in its
|
|
|
|
.B In-Reply-To
|
|
|
|
field. It also passes the directory to
|
|
|
|
.BI /mail/box/ username /pipefrom
|
|
|
|
in the
|
|
|
|
.B replymsg
|
|
|
|
environment variable. Thus,
|
|
|
|
.B pipefrom
|
|
|
|
can alter the message to somehow match
|
|
|
|
the reply to the message it is replying to.
|
|
|
|
.TP
|
|
|
|
.BI -s subject
|
|
|
|
adds a
|
|
|
|
.B Subject:
|
|
|
|
header line to the message if one does not
|
|
|
|
already exist.
|
|
|
|
.TP
|
|
|
|
.BI -t type
|
|
|
|
sets the content type for the attachments from
|
|
|
|
all subsequent
|
|
|
|
.B -a
|
|
|
|
and
|
|
|
|
.B -A
|
|
|
|
options.
|
2012-10-01 22:37:17 +00:00
|
|
|
.TP
|
|
|
|
.B -ps
|
|
|
|
pgp sign the message
|
|
|
|
.TP
|
|
|
|
.B -pe
|
|
|
|
pgp encrypt the message
|
|
|
|
.TP
|
|
|
|
.B -8
|
|
|
|
reads recipients (
|
|
|
|
.B To:
|
|
|
|
.B Cc:
|
2013-01-01 14:56:36 +00:00
|
|
|
and
|
2013-01-01 15:27:01 +00:00
|
|
|
.B Bcc:
|
2012-10-01 22:37:17 +00:00
|
|
|
) from RFC 822 header of the message
|
2011-03-30 13:49:47 +00:00
|
|
|
.PD
|
|
|
|
.PP
|
|
|
|
.I Marshal
|
|
|
|
also expands any user mail aliases contained in
|
|
|
|
.BI /mail/box/ username /names.
|
|
|
|
The format of the alias file is the same as that
|
|
|
|
for system aliases, see
|
|
|
|
.IR aliasmail (8).
|
|
|
|
.PP
|
|
|
|
.I Marshal
|
|
|
|
uses the login name as the reply address. This
|
|
|
|
can be overriden using the environment variable
|
|
|
|
.BR upasname .
|
|
|
|
Its value will become both the envelope
|
|
|
|
and
|
|
|
|
.B From:
|
|
|
|
mailbox name.
|
|
|
|
For example:
|
|
|
|
.IP
|
|
|
|
.EX
|
2021-01-03 23:24:39 +00:00
|
|
|
upasname=natasha@kremvax.com mail boris@squirrel.com
|
2011-03-30 13:49:47 +00:00
|
|
|
.EE
|
2013-01-01 15:27:01 +00:00
|
|
|
.PP
|
|
|
|
.I Marshal
|
|
|
|
interprets file attachment headers
|
|
|
|
.B Attach:
|
|
|
|
and
|
|
|
|
.B Include:
|
|
|
|
as if the
|
|
|
|
.B -A
|
|
|
|
or
|
|
|
|
.B -a
|
|
|
|
options would have been given.
|
2011-03-30 13:49:47 +00:00
|
|
|
.SH FILES
|
|
|
|
.TP
|
|
|
|
.B /mail/box/*/dead.letter
|
|
|
|
.SH SOURCE
|
|
|
|
.TP
|
|
|
|
.B /sys/src/cmd/upas/marshal
|
|
|
|
.SH "SEE ALSO"
|
|
|
|
.IR aliasmail (8),
|
|
|
|
.IR faces (1),
|
|
|
|
.IR filter (1),
|
|
|
|
.IR mail (1),
|
|
|
|
.IR mlmgr (1),
|
|
|
|
.IR nedmail (1),
|
|
|
|
.IR qer (8),
|
|
|
|
.IR rewrite (6),
|
|
|
|
.IR send (8),
|
|
|
|
.IR smtp (8),
|
|
|
|
.IR upasfs (4)
|