]> git.lizzy.rs Git - plan9front.git/blob - sys/man/1/marshal
paint(1): english
[plan9front.git] / sys / man / 1 / marshal
1 .TH MARSHAL 1
2 .SH NAME
3 marshal \- formatting and sending mail
4 .SH SYNOPSIS
5 .B upas/marshal
6 [
7 .B -[aA]
8 .I attachment
9 ] [
10 .B -C
11 .I copyaddr
12 ] [
13 .B -nrx#
14 ] [
15 .B -R
16 .I reply-msg
17 ] [
18 .B -s
19 .I subject
20 ] [
21 .B -t
22 .I mime-type
23 ] [
24 .I mailaddr ...
25 ]
26 .SH DESCRIPTION
27 .I Marshal
28 builds a mail message from standard input and passes it,
29 if the body is non-empty,
30 for transmission or delivery to
31 .BI /mail/box/ username /pipefrom
32 if it exists, otherwise to
33 .BR /bin/upas/send .
34 The message format is both RFC 822 and
35 MIME conformant, so
36 .I marshal
37 adds any required headers not already in the message, prefixed by
38 the contents of
39 .BI /mail/box/ username /headers\f1.
40 This allows the addition of personal headers like
41 .B From:
42 lines with a full name or a different
43 return address.
44 Command line options direct marshal to add a subject line
45 and append attachments.  The arguments to
46 .I marshal
47 are the addresses of the recipients.
48 .PP
49 When running in a
50 .IR rio (1)
51 window,
52 .I marshal
53 automatically puts the window into hold mode (see
54 .IR rio (1));
55 this means that the message can be edited freely,
56 because nothing will be sent to
57 .I marshal
58 until the ESC key is hit to exit hold mode.
59 .PP
60 The options are:
61 .TF "-a file"
62 .TP
63 .BI -a file
64 directs
65 .I marshal
66 to append 
67 .I file
68 as a mime attachment.
69 Unless explicitly specified by the
70 .B -t
71 option, the type of the attachment is determined
72 by running the
73 .IR file (1)
74 command.
75 .TP
76 .BI -A file
77 is like
78 .B -a
79 but the message disposition is marked as
80 .I inline
81 directing any mail reader to display the attachment
82 (if it can) when the mail message is read.
83 .TP
84 .BI -C copyaddr
85 adds a
86 .B Cc:
87 header with
88 .I copyaddr
89 and also adds
90 .I copyaddr
91 as a recipient.
92 .TP
93 .BI -n
94 intentionally no standard input
95 .TP
96 .B -#xr
97 are all passed as command line options to the
98 .I send
99 that
100 .I marshal
101 invokes.
102 .TP
103 .BI -R replymsg
104 tells marshal what message this one is in reply to.
105 .I Replymsg
106 is an
107 .IR upasfs (4)
108 directory containing the message.
109 .I Marshal
110 uses any message id in this message in its
111 .B In-Reply-To
112 field.  It also passes the directory to
113 .BI /mail/box/ username /pipefrom
114 in the
115 .B replymsg
116 environment variable.  Thus,
117 .B pipefrom
118 can alter the message to somehow match
119 the reply to the message it is replying to.
120 .TP
121 .BI -s subject
122 adds a
123 .B Subject:
124 header line to the message if one does not
125 already exist.
126 .TP
127 .BI -t type
128 sets the content type for the attachments from
129 all subsequent
130 .B -a
131 and
132 .B -A
133 options.
134 .PD
135 .PP
136 .I Marshal
137 also expands any user mail aliases contained in
138 .BI /mail/box/ username /names.
139 The format of the alias file is the same as that
140 for system aliases, see
141 .IR aliasmail (8).
142 .PP
143 .I Marshal
144 uses the login name as the reply address.  This
145 can be overriden using the environment variable
146 .BR upasname .
147 Its value will become both the envelope
148 and
149 .B From:
150 mailbox name.
151 For example:
152 .IP
153 .EX
154 upasname=natasha@kremvax.com upas/mail boris@squirrel.com
155 .EE
156 .SH FILES
157 .TP
158 .B /mail/box/*/dead.letter
159 .SH SOURCE
160 .TP
161 .B /sys/src/cmd/upas/marshal
162 .SH "SEE ALSO"
163 .IR aliasmail (8),
164 .IR faces (1),
165 .IR filter (1),
166 .IR mail (1),
167 .IR mlmgr (1),
168 .IR nedmail (1),
169 .IR qer (8),
170 .IR rewrite (6),
171 .IR send (8),
172 .IR smtp (8),
173 .IR upasfs (4)