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