7e7a787a4c615c2e0a766bd3bd9deace859b5676
[mmh] / man / inc.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH INC %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
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 %nmhbeginpop%
27 .RB [ \-host
28 .IR hostname ]
29 .RB [ \-user
30 .IR username ]
31 .RB [ \-pack
32 .IR file ]
33 .RB [ \-nopack ]
34 .RB [ \-proxy
35 .IR command ]
36 .RB [ \-apop " | " \-noapop ]
37 .RB [ \-kpop ]
38 .RB [ \-sasl ]
39 .RB [ \-saslmech
40 .IR mechanism ]
41 .RB [ \-snoop ]
42 %nmhendpop%
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 .PP
53 You may specify which folder to use with
54 .IR +folder .
55 If no folder is specified, then
56 .B inc
57 will use either the folder given by a (non\-empty)
58 .RI \*(lq Inbox \*(rq
59 entry in the user's profile, or the folder named
60 .RI \*(lq inbox \*(rq.
61 If the specified (or default) folder doesn't
62 exist, the user will be queried prior to its creation.
63 .PP
64 When the new messages are incorporated into the folder, they are assigned
65 numbers starting with the next highest number for the folder.  As the
66 messages are processed, a
67 .B scan
68 listing of the new mail is produced.
69 .PP
70 If the user's profile contains a
71 .RI \*(lq "Msg\-Protect: nnn" \*(rq
72 entry, it
73 will be used as the protection on the newly created messages, otherwise
74 the
75 .B nmh
76 default of 0644 will be used.  For all subsequent operations
77 on these messages, this initially assigned protection will be preserved.
78 .PP
79 If the switch
80 .B \-audit
81 .I audit\-file
82 is specified (usually as a default
83 switch in the profile), then
84 .B inc
85 will append a header line and a
86 line per message to the end of the specified audit\-file with the format:
87 .PP
88 .RS 5
89 .nf
90 <<inc>> date
91 <scan line for first message>
92 <scan line for second message>
93 <etc.>
94 .fi
95 .RE
96 .PP
97 This is useful for keeping track of volume and source of incoming mail.
98 Eventually,
99 .BR repl ,
100 .BR forw ,
101 .BR comp ,
102 and
103 .B dist
104 may also produce audits to this (or another) file, perhaps with
105 .RI \*(lq Message\-Id \*(rq
106 information to keep an exact correspondence
107 history.
108 .RI \*(lq Audit\-file \*(rq
109 will be in the user's nmh directory unless a full path is specified.
110 .PP
111 .B Inc
112 will incorporate even improperly formatted messages into the
113 user's nmh folder, inserting a blank line prior to the offending component
114 and printing a comment identifying the bad message.
115 .PP
116 In all cases, the user's mail drop will be zeroed, unless the
117 .B \-notruncate
118 switch is given.
119 .PP
120 If the profile entry
121 .RI \*(lq Unseen\-Sequence \*(rq
122 is present and non\-empty, then
123 .B inc
124 will add each of the newly incorporated messages to
125 each sequence named by the profile entry.
126 .B Inc
127 will not zero each sequence prior to adding messages.
128 .PP
129 The interpretation of the
130 .B \-form
131 .IR formatfile ,
132 .B \-format
133 .IR string ,
134 and
135 .B \-width
136 .I columns
137 switches is the same as in
138 .BR scan .
139 .PP
140 By using the
141 .B \-file
142 .I name
143 switch, one can direct
144 .B inc
145 to incorporate messages from a file other than the user's maildrop.
146 Note that the name file will NOT be zeroed, unless the
147 .B \-truncate
148 switch is given.
149 .PP
150 If the environment variable
151 .B $MAILDROP
152 is set, then
153 .B inc
154 uses it as the location of the user's maildrop instead of the default
155 (the
156 .B -file
157 .I name
158 switch still overrides this, however).  If this
159 environment variable is not set, then
160 .B inc
161 will consult the profile entry
162 .RI \*(lq MailDrop \*(rq
163 for this information.  If the value found is
164 not absolute, then it is interpreted relative to the user's
165 .B nmh
166 directory.  If the value is not found, then
167 .B inc
168 will look in the standard system location for the user's maildrop.
169 .PP
170 The
171 .B \-silent
172 switch directs
173 .B inc
174 to be quiet and not ask any questions at all.  This is useful for putting
175 .B inc
176 in the background and going on to other things.
177 %nmhbeginpop%
178 .PP
179 .SS "Using POP"
180 .B inc
181 will normally check local mail drops for mail, as covered above.  But
182 if the option
183 .RI \*(lq pophost \*(rq
184 is set in
185 .RI \*(lq mts.conf \*(rq,
186 or if the
187 .B \-host
188 .I hostname
189 switch is given, or if the
190 .B $MAILHOST
191 environment variable is set, then
192 .B inc
193 will query this POP service host for mail to incorporate.  If
194 .B $MAILHOST
195 is set and
196 .B \-host
197 is specified as well, the commandline switch will override
198 the environment variable.
199 .PP
200 The default is for
201 .B inc
202 to assume that your account name on
203 the POP server is the same as your current username.  To specify
204 a different username, use the
205 .B \-user
206 .I username
207 switch.
208 .PP
209 When using POP, you will normally need to type the password for
210 your account on the POP server, in order to retrieve your messages.
211 It is possible to automate this process by creating a
212 .RI \*(lq .netrc \*(rq
213 file containing your login account information for this POP server.
214 For each POP server, this file should have a line of the following
215 form.  Replace the words
216 .IR mypopserver ,
217 .IR mylogin ,
218 and
219 .I mypassword
220 with your own account information.
221 .PP
222 .RS 5
223 .B machine
224 .I mypopserver
225 .B login
226 .I mylogin
227 .B password
228 .I mypassword
229 .RE
230 .PP
231 This
232 .RI \*(lq .netrc \*(rq
233 file should be owned and readable only by you.
234 .PP
235 If passed the
236 .B \-proxy
237 .I command
238 switch,
239 .B inc
240 will use the specified command to establish the connection to the POP
241 server. The string
242 .IR %h
243 in the command will be substituted by the hostname to connect to.
244 .PP
245 If
246 .B inc
247 uses POP, then the
248 .B \-pack
249 .I file
250 switch is considered. If given, then
251 .B inc
252 simply uses the POP to
253 .B packf
254 the user's maildrop from the POP service host to the named file.  This switch
255 is provided for those users who prefer to use
256 .B msh
257 to read their maildrops.
258 .PP
259 For debugging purposes, you may give the switch
260 .BR \-snoop ,
261 which will allow you to watch the POP transaction take place
262 between you and the POP server.
263 .PP
264 If
265 .B nmh
266 has been compiled with APOP support, the
267 .B \-apop
268 switch will cause
269 .B inc
270 to use APOP rather than standard POP3 authentication.  Under APOP, a
271 unique string (generally of the format
272 .RI < pid . timestamp @ hostname >
273 ) is announced by the POP server.
274 Rather than `USER
275 .IR user ',
276 `PASS
277 .IR password ',
278 .B inc
279 sends `APOP
280 .I user
281 .IR digest ',
282 where digest is the MD5 hash of the unique string followed by a
283 `secret' shared by client and server, essentially equivalent to the user's
284 password (though an APOP-enabled POP3 server could have separate APOP and plain
285 POP3 passwords for a single user).
286 .B \-noapop
287 disables APOP in cases where it'd otherwise be used.
288 .PP
289 If
290 .B nmh
291 has been compiled with KPOP support, the
292 .B \-kpop
293 switch will allow
294 .B inc
295 to use Kerberized POP rather than standard POP3 on a given invocation.
296 If POPSERVICE was also #defined to "kpop",
297 .B inc
298 will be hardwired to always use KPOP.
299 .PP
300 If
301 .B nmh
302 has been compiled with SASL support, the
303 .B \-sasl
304 switch will enable
305 the use of SASL authentication.  Depending on the SASL mechanism used, this
306 may require an additional password prompt from the user (but the
307 .RI \*(lq .netrc \*(rq
308 file can be used to store this password).  The
309 .B \-saslmech
310 switch can be used to select a particular SASL mechanism.
311 .PP
312 If SASL authentication is successful,
313 .B inc
314 will attempt to negotiate a security layer for session encryption.
315 Encrypted traffic is labelled with `(encrypted)' and `(decrypted)'
316 when viewing the POP transaction with the
317 .B \-snoop
318 switch.
319 %nmhendpop%
320
321 .SH FILES
322 .fc ^ ~
323 .nf
324 .ta \w'%etcdir%/ExtraBigFileName  'u
325 ^$HOME/\&.mh\(ruprofile~^The user profile
326 ^%etcdir%/mts.conf~^nmh mts configuration file
327 ^%mailspool%/$USER~^Location of mail drop
328 .fi
329
330 .SH "PROFILE COMPONENTS"
331 .fc ^ ~
332 .nf
333 .ta 2.4i
334 .ta \w'ExtraBigProfileName  'u
335 ^Path:~^To determine the user's nmh directory
336 ^Alternate\-Mailboxes:~^To determine the user's mailboxes
337 ^Inbox:~^To determine the inbox, default \*(lqinbox\*(rq
338 ^Folder\-Protect:~^To set mode when creating a new folder
339 ^Msg\-Protect:~^To set mode when creating a new message and audit\-file
340 ^Unseen\-Sequence:~^To name sequences denoting unseen messages
341 .fi
342
343 .SH "SEE ALSO"
344 mhmail(1), scan(1), mh\-mail(5), post(8)
345
346 .SH DEFAULTS
347 .nf
348 .RB ` +folder "' defaulted by \*(lqInbox\*(rq above"
349 .RB ` \-noaudit '
350 .RB ` \-changecur '
351 .RB ` \-format "' defaulted as described above"
352 .RB ` \-nosilent '
353 .RB ` \-truncate "' if `" \-file " name' not given, `" \-notruncate "' otherwise"
354 .RB ` \-width "' defaulted to the width of the terminal"
355 %nmhbeginpop%
356 .RB ` \-nopack '
357 %nmhendpop%
358 .fi
359
360 .SH CONTEXT
361 The folder into which messages are being incorporated will become the
362 current folder.  The first message incorporated will become the current
363 message, unless the
364 .B \-nochangecur
365 option is specified.  This leaves the context ready for a
366 .B show
367 of the first new message.
368
369 .SH BUGS
370 The argument to the
371 .B \-format
372 switch must be interpreted as a single
373 token by the shell that invokes
374 .BR inc .
375 Therefore, one must usually place the argument to this switch inside
376 double\-quotes.