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