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