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