File: inc.man

package info (click to toggle)
nmh 1.8-4
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 7,860 kB
  • sloc: ansic: 50,445; sh: 22,697; makefile: 1,138; lex: 740; perl: 509; yacc: 265
file content (394 lines) | stat: -rw-r--r-- 9,014 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
.TH INC %manext1% 2016-11-02 "%nmhversion%"
.
.\" %nmhwarning%
.
.SH NAME
inc \- incorporate new mail to an nmh folder
.SH SYNOPSIS
.HP 5
.na
.B inc
.RB [ \-help ]
.RB [ \-version ]
.RI [ +folder ]
.RB [ \-audit
.IR audit-file ]
.RB [ \-noaudit ]
.RB [ \-changecur " | " \-nochangecur ]
.RB [ \-form
.IR formfile ]
.RB [ \-format
.IR string ]
.RB [ \-file
.IR name ]
.RB [ \-silent " | " \-nosilent ]
.RB [ \-truncate " | " \-notruncate ]
.RB [ \-width
.IR columns ]
.RB [ \-host
.IR hostname ]
.RB [ \-port
.IR portname/number ]
.RB [ \-user
.IR username ]
.RB [ \-proxy
.IR command ]
.RB [ \-sasl " | " \-nosasl ]
.RB [ \-saslmech
.IR mechanism ]
.RB [ \-authservice
.IR service ]
.RB [ \-tls ]
.RB [ \-initialtls ]
.RB [ \-notls ]
.RB [ \-certverify " | " \-nocertverify ]
.RB [ \-snoop ]
.ad
.SH DESCRIPTION
.B inc
incorporates mail from the user's incoming mail drop into an
.B nmh
folder.
If the mail drop is a file, it can be in
.B mbox
or
.B MMDF
format.
If the mail drop is a directory it is considered to be in
.B Maildir
format.
.PP
You may specify which folder to use with
.IR +folder .
If no folder is specified, then
.B inc
will use either the folder given by a (non-empty)
.RI \*(lq Inbox \*(rq
entry in the user's profile, or the folder named
.RI \*(lq inbox \*(rq.
If the specified (or default) folder doesn't
exist, the user will be queried prior to its creation.
.PP
When the new messages are incorporated into the folder, they are assigned
numbers starting with the next highest number for the folder.
As the messages are processed, a
.B scan
listing of the new mail is produced.
.PP
The newly created messages will have a mode of 0600, see chmod(1),
on filesystems that support it.
Alternatively, a
.RI \*(lq "Msg\-Protect: nnn" \*(rq
profile entry gives the mode to use, in octal.
For all subsequent operations on these messages, this initially assigned
mode will be preserved.
.PP
If the switch
.B \-audit
.I audit-file
is specified (usually as a default switch in the user's profile), then
.B inc
will append a header line and a line per message to the specified
audit-file with the format:
.PP
.RS 5
.nf
<<inc>> date
<scan line for first message>
<scan line for second message>
<etc.>
.fi
.RE
.PP
This is useful for keeping track of volume and source of incoming mail.
Eventually,
.BR repl ,
.BR forw ,
.BR comp ,
and
.B dist
may also output audit information to this (or another) file, perhaps with
.RI \*(lq Message\-Id \*(rq
information to keep an exact correspondence history.
.RI \*(lq Audit-file \*(rq
is assumed to be in the user's nmh directory unless a full path is specified.
.PP
.B inc
will incorporate even improperly formatted messages into the user's
nmh folder, inserting a blank line prior to the offending component
and printing a comment identifying the bad message.
.PP
In all cases, except the use of
.B \-file
.I name
(see below), the user's mail drop will be zeroed, unless the
.B \-notruncate
switch is given.
.PP
If the profile entry
.RI \*(lq Unseen\-Sequence \*(rq
is present and non-empty, then
.B inc
will add each of the newly incorporated messages to each sequence
named in the profile entry.
.B inc
will not zero each sequence prior to adding messages.
.PP
The interpretation of the
.B \-form
.IR formatfile ,
.B \-format
.IR string ,
and
.B \-width
.I columns
switches is the same as in
.IR scan (1).
.PP
By using the
.B \-file
.I name
switch, one can direct
.B inc
to incorporate messages from a file other than the user's mail drop.
Note that the named file will
.I not
be zeroed, unless the
.B \-truncate
switch is given.
.PP
The
.B \-file
switch does not support the use of standard input.
Instead, the
.B rcvstore
command can be used to incorporate mail from the standard input stream.
.PP
If the environment variable
.B $MAILDROP
is set, then
.B inc
uses it as the location of the user's mail drop instead of the default
(the
.B \-file
.I name
switch still overrides this, however).
If this environment variable is not set, then
.B inc
will consult the profile entry
.RI \*(lq MailDrop \*(rq
for this information.  If the value found is not absolute, then it is
interpreted relative to the user's
.B nmh
directory.  If the value is not found, then
.B inc
will look in the standard system location for the user's mail drop.
.PP
The
.B \-silent
switch directs
.B inc
to be quiet and not ask any questions at all.  This is useful for putting
.B inc
in the background and going on to other things.
.SS "Using POP"
.B inc
will normally check local mail drops for mail, as covered above.
But if the option
.RI \*(lq pophost \*(rq
is set in
.RI \*(lq mts.conf \*(rq,
or if the
.B \-host
.I hostname
switch is given, or if the
.B $MAILHOST
environment variable is set, then
.B inc
will query this POP service host for mail to incorporate.  If
.B $MAILHOST
is set and
.B \-host
is specified as well, the command-line switch will override
the environment variable.  The
.B \-port
switch specifies the port name or number used to connect to the POP
server.  If unspecified, the default is \*(lqpop3\*(rq.
.PP
To specify a username for authentication with the POP server, use the
.B \-user
.I username
switch.  The credentials profile entry in
.IR mh\-profile (5)
describes the ways to supply a username and password.
.PP
If passed the
.B \-proxy
.I command
switch,
.B inc
will use the specified command to establish the connection to the POP
server.  The string
.I %h
in the command will be substituted by the hostname to connect to.
.PP
For debugging purposes, you may give the switch
.BR \-snoop ,
which will allow you to monitor the POP transaction.  If
.B \-sasl \-saslmech xoauth2
is used, the HTTP transaction is also shown.
.PP
If
.B nmh
has been compiled with SASL support, the
.B \-sasl
switch will enable the use of SASL authentication.
Depending on the SASL mechanism used, this may require an
additional password prompt from the user (but the
.I netrc
file can be used to store this password, as described in
.IR mh\-profile (5)).
The
.B \-saslmech
switch can be used to select a particular SASL mechanism.
.PP
If SASL authentication is successful,
.B inc
will attempt to negotiate a security layer for session encryption.
Encrypted traffic is labelled with `(encrypted)' and `(decrypted)'
when viewing the POP transaction with the
.B \-snoop
switch; see
.IR post (8)'s
description of
.B \-snoop
for its other features.
.PP
If
.B nmh
has been compiled with OAuth support, the
.B \-sasl
and
.B \-saslmech xoauth2
switches will enable OAuth authentication.  The
.B \-user
switch must be used, and the
.I user-name
must be an email address the user has for the service, which must
be specified with the
.B \-authservice
.I service
switch.  Before using this, the user must authorize nmh by running
.B mhlogin
and granting authorization to that account.  See
.IR mhlogin (1)
for more details.
.PP
If
.B nmh
has been compiled with TLS support, the
.B \-tls
and
.B \-initialtls
switches will require the negotiation of TLS when connecting
to the remote POP server. The
.B \-tls
switch will direct
.B inc
to negotiate TLS as part of the normal POP protocol using
the STLS command.  The
.B \-initialtls
switch will direct
.B inc
to negotiate TLS immediately after the connection has taken place,
before any POP commands are sent or received.  Data encrypted by TLS is
labeled `(tls-encrypted)' and `(tls-decrypted)' when viewing the POP
transaction with the
.B \-snoop
switch.  The
.B \-notls
switch will disable all attempts to negotiate TLS.
.PP
When using TLS the default is to verify the remote certificate and SubjectName
against the local trusted certificate store.  This can be controlled by
the
.B \-certverify
and
.B \-nocertverify
switches.  See your OpenSSL documentation for more information on certificate
verification.
.SH FILES
.PD 0
.TP 20
$HOME/.mh_profile
The user's profile.
.TP
%nmhetcdir%/mts.conf
mts configuration file.
.TP
%mailspool%/$USER
Location of the system mail drop.
.PD
.SH "PROFILE COMPONENTS"
.PD 0
.TP 20
Path:
To determine the user's nmh directory.
.TP
Alternate\-Mailboxes:
To determine the user's mailboxes.
.TP
Inbox:
To determine the inbox.
.TP
Folder\-Protect:
To set mode when creating a new folder.
.TP
Msg\-Protect:
To set mode when creating a new message and audit-file.
.TP
Unseen\-Sequence:
To name sequences denoting unseen messages.
.PD
.SH "SEE ALSO"
.IR mhmail (1),
.IR scan (1),
.IR mh\-mail (5),
.IR mh\-profile (5),
.IR mhlogin (1),
.IR post (8),
.IR rcvstore (1)
.SH DEFAULTS
.PD 0
.TP 20
+folder
defaulted by \*(lqInbox\*(rq above.
.TP
\-noaudit
.TP
\-changecur
.TP
\-format
As described above.
.TP
\-nosilent
.TP
\-nosasl
.TP
\-notruncate
Unless
.B \-file
.I name
is given.
.TP
\-width
The width of the terminal.
.PD
.SH CONTEXT
The folder into which messages are being incorporated will become the
current folder.  The first message incorporated will become the current
message, unless the
.B \-nochangecur
option is specified.  This leaves the context ready for a
.B show
of the first new message.