]> diplodocus.org Git - nmh/blob - man/mh-mail.man
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / man / mh-mail.man
1 .TH MH-MAIL %manext5% "January 8, 2014" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 mh-mail \- message format for nmh message system
7 .SH DESCRIPTION
8 .B nmh
9 processes messages in a particular format. It should be noted
10 that although neither Bell nor Berkeley mailers produce message files
11 in the format that
12 .B nmh
13 prefers,
14 .B nmh
15 can read message files in that antiquated format.
16 .PP
17 Each user possesses a mail drop box which initially receives all messages
18 processed by
19 .BR post .
20 .B Inc
21 will read from that drop
22 box and incorporate the new messages found there into the user's own
23 mail folders (typically
24 .RI \*(lq +inbox \*(rq).
25 The mail drop box consists of one or more messages.
26 .PP
27 Messages are expected to consist of lines of text. Graphics and binary
28 data are not handled. No data compression is accepted. All text is
29 clear ASCII 7-bit data.
30 .PP
31 The general \*(lqmemo\*(rq framework of RFC 822 is used. A message
32 consists of a block of information in a rigid format, followed by
33 general text with no specified format. The rigidly formatted first
34 part of a message is called the header, and the free-format portion is
35 called the body. The header must always exist, but the body is optional.
36 These parts are separated by an empty line, i.e., two consecutive newline
37 characters. Within
38 .BR nmh ,
39 the header and body may be separated by a line consisting of dashes:
40 .PP
41 .RS 5
42 .nf
43 From: Local Mailbox <user@example.com>
44 To:
45 cc:
46 Fcc: +outbox
47 Subject:
48 .fi
49 .RE
50 .PP
51 The header is composed of one or more header items. Each header item can
52 be viewed as a single logical line of ASCII characters. If the text of
53 a header item extends across several real lines, the continuation lines
54 are indicated by leading spaces or tabs.
55 .PP
56 Each header item is called a component and is composed of a keyword or
57 name, along with associated text. The keyword begins at the left margin,
58 may NOT contain spaces or tabs, may not exceed 63 characters (as specified
59 by RFC 822), and is terminated by a colon (`:'). Certain components
60 (as identified by their keywords) must follow rigidly defined formats
61 in their text portions.
62 .PP
63 The text for most formatted components (e.g., \*(lqDate:\*(rq and
64 \*(lqMessage\-Id:\*(rq) is produced automatically. The only ones entered
65 by the user are address fields such as \*(lqTo:\*(rq, \*(lqcc:\*(rq,
66 etc. Internet addresses are assigned mailbox names and host computer
67 specifications. The rough format is \*(lqlocal@domain\*(rq, such as
68 \*(lqMH@UCI\*(rq, or \*(lqMH@UCI\-ICSA.ARPA\*(rq. Multiple addresses
69 are separated by commas. A missing host/domain is assumed to be the
70 local host/domain.
71 .PP
72 As mentioned above, a blank line (or a line of dashes) signals that all
73 following text up to the end of the file is the body. No formatting is
74 expected or enforced within the body.
75 .PP
76 Following is a list of header components that are considered
77 meaningful to various
78 .B nmh
79 programs.
80 .PP
81 .BR Date :
82 .RS 5
83 Added by
84 .BR post ,
85 contains date and time of the message's entry
86 into the mail transport system.
87 .RE
88 .PP
89 .BR From :
90 .RS 5
91 This header is filled in by default with the system's idea of the user's local
92 mailbox. This can be changed with the
93 .B Local\-Mailbox
94 profile entry. It
95 contains the address of the author or authors
96 (may be more than one if a \*(lqSender:\*(rq field is present). For a
97 standard reply (using
98 .BR repl ),
99 the reply address is constructed by
100 checking the following headers (in this order): \*(lqMail-Reply\-To:\*(rq,
101 \*(lqReply\-To:\*(rq, \*(lqFrom:\*(rq, \*(lqSender:\*(rq.
102 A \*(lqFrom:\*(rq
103 header MUST exist when the message is sent to
104 .BR post,
105 otherwise the message will be rejected.
106 .RE
107 .PP
108 .BR Envelope\-From :
109 .RS 5
110 Used by
111 .B post
112 to specify a value for the sender's envelope address to the mail transport
113 system. If omitted,
114 .B post
115 will use the value of the \*(lqSender:\*(rq or the \*(lqFrom:\*(rq header.
116 See
117 .IR send (1)
118 for more details.
119 .RE
120 .PP
121 .BR Mail\-Reply\-To :
122 .RS 5
123 For a standard reply (using
124 .BR repl ),
125 the reply address is
126 constructed by checking the following headers (in this order):
127 \*(lqMail-Reply\-To:\*(rq, \*(lqReply\-To:\*(rq, \*(lqFrom:\*(rq,
128 \*(lqSender:\*(rq.
129 .RE
130 .PP
131 .BR Mail\-Followup\-To :
132 .RS 5
133 When making a \*(lqgroup\*(rq reply (using
134 .B repl
135 .BR \-group ),
136 any addresses in this field will take precedence, and no other reply address
137 will be added to the draft. If this header is not available, then the
138 return addresses will be constructed from the \*(lqMail-Reply\-To:\*(rq,
139 or \*(lqReply\-To:\*(rq, or \*(lqFrom:\*(rq, along with adding the
140 addresses from the headers \*(lqTo:\*(rq, \*(lqcc:\*(rq, as well as
141 adding your personal address.
142 .RE
143 .PP
144 .BR Reply\-To :
145 .RS 5
146 For a standard reply (using
147 .BR repl ),
148 the reply address is
149 constructed by checking the following headers (in this order):
150 \*(lqMail-Reply\-To:\*(rq, \*(lqReply\-To:\*(rq, \*(lqFrom:\*(rq,
151 \*(lqSender:\*(rq.
152 .RE
153 .PP
154 .BR Sender :
155 .RS 5
156 Required by
157 .B post
158 in the event that the message has multiple addresses on the
159 \*(lqFrom:\*(rq line. It is otherwise optional. This line should
160 contain the address of the actual
161 sender.
162 .RE
163 .PP
164 .BR To :
165 .RS 5
166 Contains addresses of primary recipients.
167 .RE
168 .PP
169 .BR cc :
170 .RS 5
171 Contains addresses of secondary recipients.
172 .RE
173 .PP
174 .BR Bcc :
175 .RS 5
176 Still more recipients. However, the \*(lqBcc:\*(rq line is not
177 copied onto the message as delivered, so these recipients are not
178 listed.
179 .B nmh
180 uses an encapsulation method for blind copies, see
181 .IR send (1).
182 .RE
183 .PP
184 .BR Dcc :
185 .RS 5
186 Still more recipients. However, the \*(lqDcc:\*(rq line is not
187 copied onto the messages as delivered. Recipients on the \*(lqDcc:\*(rq
188 line receive the same message as recipients on the \*(lqTo:\*(rq and
189 \*(lqcc:\*(rq lines. See
190 .IR send (1)
191 for more details.
192 .B Dcc
193 is not supported with the
194 .B sendmail/pipe
195 mail transport method.
196 .RE
197 .PP
198 .BR Fcc :
199 .RS 5
200 Causes
201 .B post
202 to copy the message into the specified folder for the sender,
203 if the message was successfully given to the transport system.
204 .RE
205 .PP
206 .BR Message\-ID :
207 .RS 5
208 A unique message identifier added by
209 .B post
210 if the
211 .B \-msgid
212 flag is set.
213 .RE
214 .PP
215 .BR Subject :
216 .RS 5
217 Sender's commentary. It is displayed by
218 .BR scan .
219 .RE
220 .PP
221 .BR In\-Reply\-To :
222 .RS 5
223 A commentary line added by
224 .B repl
225 when replying to a message.
226 .RE
227 .PP
228 .BR Resent\-Date :
229 .RS 5
230 Added when redistributing a message by
231 .BR post .
232 .RE
233 .PP
234 .BR Resent\-From :
235 .RS 5
236 Used instead of the \*(lqFrom:\*(rq header when
237 .B post
238 redistributes a message. See \*(lqFrom:\*(rq for more information about
239 this header is used.
240 .RE
241 .PP
242 .BR Resent\-To:
243 .RS 5
244 New recipients for a message resent by
245 .BR dist .
246 .RE
247 .PP
248 .BR Resent\-cc :
249 .RS 5
250 Still more recipients. See \*(lqcc:\*(rq and \*(lqResent\-To:\*(rq.
251 .RE
252 .PP
253 .BR Resent\-Bcc :
254 .RS 5
255 Even more recipients. See \*(lqBcc:\*(rq and \*(lqResent\-To:\*(rq.
256 .RE
257 .PP
258 .BR Resent\-Fcc :
259 .RS 5
260 Copy resent message into a folder.
261 See \*(lqFcc:\*(rq and \*(lqResent\-To:\*(rq.
262 .RE
263 .PP
264 .BR Resent\-Message\-Id :
265 .RS 5
266 A unique identifier glued on by
267 .B post
268 if the
269 .B \-msgid
270 flag is set.
271 See \*(lqMessage\-Id:\*(rq and \*(lqResent\-To:\*(rq.
272 .RE
273 .PP
274 .BR Resent :
275 .RS 5
276 Annotation for
277 .B dist
278 under the
279 .B \-annotate
280 option.
281 .RE
282 .PP
283 .BR Forwarded :
284 .RS 5
285 Annotation for
286 .B forw
287 under the
288 .B \-annotate
289 option.
290 .RE
291 .PP
292 .BR Replied :
293 .RS 5
294 Annotation for
295 .B repl
296 under the
297 .B \-annotate
298 option.
299 .RE
300 .PP
301 .BR Attach :
302 .RS 5
303 Used by
304 .B mhbuild
305 to specify a filename to attach to this message. See
306 .IR mhbuild (1)
307 for more information.
308 .RE
309 .SH FILES
310 .TP 20
311 %mailspool%/$USER
312 Location of mail drop.
313 .SH "SEE ALSO"
314 .I
315 Standard for the Format of ARPA Internet Text Messages
316 (RFC 822)
317 .SH CONTEXT
318 None