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