]> diplodocus.org Git - nmh/blob - man/inc.man
Added context_find_prefix().
[nmh] / man / inc.man
1 .TH INC %manext1% "April 18, 2014" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 inc \- incorporate new mail
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B inc
11 .RI [ +folder ]
12 .RB [ \-audit
13 .IR audit\-file ]
14 .RB [ \-noaudit ]
15 .RB [ \-changecur " | " \-nochangecur ]
16 .RB [ \-form
17 .IR formfile ]
18 .RB [ \-format
19 .IR string ]
20 .RB [ \-file
21 .IR name ]
22 .RB [ \-silent " | " \-nosilent ]
23 .RB [ \-truncate " | " \-notruncate ]
24 .RB [ \-width
25 .IR columns ]
26 .RB [ \-host
27 .IR hostname ]
28 .RB [ \-port
29 .IR portname/number ]
30 .RB [ \-user
31 .IR username ]
32 .RB [ \-pack
33 .IR file ]
34 .RB [ \-nopack ]
35 .RB [ \-proxy
36 .IR command ]
37 .RB [ \-sasl " | " \-nosasl ]
38 .RB [ \-saslmech
39 .IR mechanism ]
40 .RB [ \-snoop ]
41 .RB [ \-version ]
42 .RB [ \-help ]
43 .ad
44 .SH DESCRIPTION
45 .B Inc
46 incorporates mail from the user's incoming mail drop into
47 an
48 .B nmh
49 folder.
50 If the mail drop is a file, it can be in
51 .B mbox
52 or
53 .B MMDF
54 format.
55 If the mail drop is a directory it will considered to be a
56 .B Maildir
57 format mail drop.
58 .PP
59 You may specify which folder to use with
60 .IR +folder .
61 If no folder is specified, then
62 .B inc
63 will use either the folder given by a (non\-empty)
64 .RI \*(lq Inbox \*(rq
65 entry in the user's profile, or the folder named
66 .RI \*(lq inbox \*(rq.
67 If the specified (or default) folder doesn't
68 exist, the user will be queried prior to its creation.
69 .PP
70 When the new messages are incorporated into the folder, they are assigned
71 numbers starting with the next highest number for the folder. As the
72 messages are processed, a
73 .B scan
74 listing of the new mail is produced.
75 .PP
76 If the user's profile contains a
77 .RI \*(lq "Msg\-Protect: nnn" \*(rq
78 entry, it will be used as the protection on the newly created
79 messages, otherwise the
80 .B nmh
81 default of 0600 will be used (on filesystems that support it). For
82 all subsequent operations on these messages, this initially assigned
83 protection will be preserved.
84 .PP
85 If the switch
86 .B \-audit
87 .I audit\-file
88 is specified (usually as a default
89 switch in the profile), then
90 .B inc
91 will append a header line and a
92 line per message to the end of the specified audit\-file with the format:
93 .PP
94 .RS 5
95 .nf
96 <<inc>> date
97 <scan line for first message>
98 <scan line for second message>
99 <etc.>
100 .fi
101 .RE
102 .PP
103 This is useful for keeping track of volume and source of incoming mail.
104 Eventually,
105 .BR repl ,
106 .BR forw ,
107 .BR comp ,
108 and
109 .B dist
110 may also produce audits to this (or another) file, perhaps with
111 .RI \*(lq Message\-Id \*(rq
112 information to keep an exact correspondence
113 history.
114 .RI \*(lq Audit\-file \*(rq
115 will be in the user's nmh directory unless a full path is specified.
116 .PP
117 .B Inc
118 will incorporate even improperly formatted messages into the
119 user's nmh folder, inserting a blank line prior to the offending component
120 and printing a comment identifying the bad message.
121 .PP
122 In all cases, the user's mail drop will be zeroed, unless the
123 .B \-notruncate
124 switch is given.
125 .PP
126 If the profile entry
127 .RI \*(lq Unseen\-Sequence \*(rq
128 is present and non\-empty, then
129 .B inc
130 will add each of the newly incorporated messages to
131 each sequence named by the profile entry.
132 .B Inc
133 will not zero each sequence prior to adding messages.
134 .PP
135 The interpretation of the
136 .B \-form
137 .IR formatfile ,
138 .B \-format
139 .IR string ,
140 and
141 .B \-width
142 .I columns
143 switches is the same as in
144 .BR scan .
145 .PP
146 By using the
147 .B \-file
148 .I name
149 switch, one can direct
150 .B inc
151 to incorporate messages from a file other than the user's maildrop.
152 Note that the name file will NOT be zeroed, unless the
153 .B \-truncate
154 switch is given.
155 .PP
156 The
157 .B \-file
158 switch does not support use of standard input. Instead,
159 the
160 .B rcvstore
161 command can be used to incorporate mail from the standard input stream.
162 .PP
163 If the environment variable
164 .B $MAILDROP
165 is set, then
166 .B inc
167 uses it as the location of the user's maildrop instead of the default
168 (the
169 .B -file
170 .I name
171 switch still overrides this, however). If this
172 environment variable is not set, then
173 .B inc
174 will consult the profile entry
175 .RI \*(lq MailDrop \*(rq
176 for this information. If the value found is
177 not absolute, then it is interpreted relative to the user's
178 .B nmh
179 directory. If the value is not found, then
180 .B inc
181 will look in the standard system location for the user's maildrop.
182 .PP
183 The
184 .B \-silent
185 switch directs
186 .B inc
187 to be quiet and not ask any questions at all. This is useful for putting
188 .B inc
189 in the background and going on to other things.
190 .PP
191 .SS "Using POP"
192 .B inc
193 will normally check local mail drops for mail, as covered above. But
194 if the option
195 .RI \*(lq pophost \*(rq
196 is set in
197 .RI \*(lq mts.conf \*(rq,
198 or if the
199 .B \-host
200 .I hostname
201 switch is given, or if the
202 .B $MAILHOST
203 environment variable is set, then
204 .B inc
205 will query this POP service host for mail to incorporate. If
206 .B $MAILHOST
207 is set and
208 .B \-host
209 is specified as well, the commandline switch will override
210 the environment variable. The
211 .B \-port
212 switch specifies the port name or number used to connect to the POP
213 server. If unspecified the default is \*(lqpop3\*(rq.
214 .PP
215 To specify a username for authentication with the POP server, use the
216 .B \-user
217 .I username
218 switch. The credentials profile entry in the mh\-profile(5) man page
219 describes the ways to supply a username and password.
220 .PP
221 If passed the
222 .B \-proxy
223 .I command
224 switch,
225 .B inc
226 will use the specified command to establish the connection to the POP
227 server. The string
228 .IR %h
229 in the command will be substituted by the hostname to connect to.
230 .PP
231 If
232 .B inc
233 uses POP, then the
234 .B \-pack
235 .I file
236 switch is considered. If given, then
237 .B inc
238 simply uses the POP to
239 .B packf
240 the user's maildrop from the POP service host to the named file.
241 .PP
242 For debugging purposes, you may give the switch
243 .BR \-snoop ,
244 which will allow you to watch the POP transaction take place
245 between you and the POP server.
246 .PP
247 If
248 .B nmh
249 has been compiled with SASL support, the
250 .B \-sasl
251 switch will enable
252 the use of SASL authentication. Depending on the SASL mechanism used, this
253 may require an additional password prompt from the user (but the
254 .I netrc
255 file can be used to store this password, as described in the
256 mh-profile(5) man page). The
257 .B \-saslmech
258 switch can be used to select a particular SASL mechanism.
259 .PP
260 If SASL authentication is successful,
261 .B inc
262 will attempt to negotiate a security layer for session encryption.
263 Encrypted traffic is labelled with `(encrypted)' and `(decrypted)'
264 when viewing the POP transaction with the
265 .B \-snoop
266 switch.
267 .SH FILES
268 .PD 0
269 .TP 20
270 $HOME/.mh_profile
271 The user's profile.
272 .TP
273 %nmhetcdir%/mts.conf
274 mts configuration file.
275 .TP
276 %mailspool%/$USER
277 Location of the system mail drop.
278 .PD
279 .SH "PROFILE COMPONENTS"
280 .PD 0
281 .TP 20
282 Path:
283 To determine the user's nmh directory.
284 .TP
285 Alternate\-Mailboxes:
286 To determine the user's mailboxes.
287 .TP
288 Inbox:
289 To determine the inbox.
290 .TP
291 Folder\-Protect:
292 To set mode when creating a new folder.
293 .TP
294 Msg\-Protect:
295 To set mode when creating a new message and audit\-file.
296 .TP
297 Unseen\-Sequence:
298 To name sequences denoting unseen messages.
299 .PD
300 .SH "SEE ALSO"
301 .IR mhmail (1),
302 .IR scan (1),
303 .IR mh\-mail (5),
304 .IR mh\-profile (5),
305 .IR post (8),
306 .IR rcvstore (1)
307 .SH DEFAULTS
308 .PD 0
309 .TP 20
310 +folder
311 defaulted by \*(lqInbox\*(rq above.
312 .TP
313 \-noaudit
314 .TP
315 \-changecur
316 .TP
317 \-format
318 As described above.
319 .TP
320 \-nosilent
321 .TP
322 \-nosasl
323 .TP
324 \-truncate
325 If
326 .B \-file
327 .I name
328 not given,
329 \-notruncate otherwise.
330 .TP
331 \-width
332 The width of the terminal.
333 .TP
334 \-nopack
335 .PD
336 .SH CONTEXT
337 The folder into which messages are being incorporated will become the
338 current folder. The first message incorporated will become the current
339 message, unless the
340 .B \-nochangecur
341 option is specified. This leaves the context ready for a
342 .B show
343 of the first new message.