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