1INC(1) General Commands Manual INC(1)
2
3
4
6 inc - incorporate new mail to an nmh folder
7
9 inc [-help] [-version] [+folder] [-audit audit-file] [-noaudit]
10 [-changecur | -nochangecur] [-form formfile] [-format string]
11 [-file name] [-silent | -nosilent] [-truncate | -notruncate]
12 [-width columns] [-host hostname] [-port portname/number] [-user
13 username] [-proxy command] [-sasl | -nosasl] [-saslmech mechanism]
14 [-authservice service] [-tls] [-initialtls] [-notls] [-certverify
15 | -nocertverify] [-snoop]
16
18 inc incorporates mail from the user's incoming mail drop into an nmh
19 folder. If the mail drop is a file, it can be in mbox or MMDF format.
20 If the mail drop is a directory it is considered to be in Maildir for‐
21 mat.
22
23 You may specify which folder to use with +folder. If no folder is
24 specified, then inc will use either the folder given by a (non-empty)
25 “Inbox” entry in the user's profile, or the folder named “inbox”. If
26 the specified (or default) folder doesn't exist, the user will be
27 queried prior to its creation.
28
29 When the new messages are incorporated into the folder, they are as‐
30 signed numbers starting with the next highest number for the folder.
31 As the messages are processed, a scan listing of the new mail is pro‐
32 duced.
33
34 The newly created messages will have a mode of 0600, see chmod(1), on
35 filesystems that support it. Alternatively, a “Msg-Protect: nnn” pro‐
36 file entry gives the mode to use, in octal. For all subsequent opera‐
37 tions on these messages, this initially assigned mode will be pre‐
38 served.
39
40 If the switch -audit audit-file is specified (usually as a default
41 switch in the user's profile), then inc will append a header line and a
42 line per message to the specified audit-file with the format:
43
44 <<inc>> date
45 <scan line for first message>
46 <scan line for second message>
47 <etc.>
48
49 This is useful for keeping track of volume and source of incoming mail.
50 Eventually, repl, forw, comp, and dist may also output audit informa‐
51 tion to this (or another) file, perhaps with “Message-Id” information
52 to keep an exact correspondence history. “Audit-file” is assumed to be
53 in the user's nmh directory unless a full path is specified.
54
55 inc will incorporate even improperly formatted messages into the user's
56 nmh folder, inserting a blank line prior to the offending component and
57 printing a comment identifying the bad message.
58
59 In all cases, except the use of -file name (see below), the user's mail
60 drop will be zeroed, unless the -notruncate switch is given.
61
62 If the profile entry “Unseen-Sequence” is present and non-empty, then
63 inc will add each of the newly incorporated messages to each sequence
64 named in the profile entry. inc will not zero each sequence prior to
65 adding messages.
66
67 The interpretation of the -form formatfile, -format string, and -width
68 columns switches is the same as in scan(1).
69
70 By using the -file name switch, one can direct inc to incorporate mes‐
71 sages from a file other than the user's mail drop. Note that the named
72 file will not be zeroed, unless the -truncate switch is given.
73
74 The -file switch does not support the use of standard input. Instead,
75 the rcvstore command can be used to incorporate mail from the standard
76 input stream.
77
78 If the environment variable $MAILDROP is set, then inc uses it as the
79 location of the user's mail drop instead of the default (the -file name
80 switch still overrides this, however). If this environment variable is
81 not set, then inc will consult the profile entry “MailDrop” for this
82 information. If the value found is not absolute, then it is inter‐
83 preted relative to the user's nmh directory. If the value is not
84 found, then inc will look in the standard system location for the
85 user's mail drop.
86
87 The -silent switch directs inc to be quiet and not ask any questions at
88 all. This is useful for putting inc in the background and going on to
89 other things.
90
91 Using POP
92 inc will normally check local mail drops for mail, as covered above.
93 But if the option “pophost” is set in “mts.conf”, or if the -host host‐
94 name switch is given, or if the $MAILHOST environment variable is set,
95 then inc will query this POP service host for mail to incorporate. If
96 $MAILHOST is set and -host is specified as well, the command-line
97 switch will override the environment variable. The -port switch speci‐
98 fies the port name or number used to connect to the POP server. If un‐
99 specified, the default is “pop3”.
100
101 To specify a username for authentication with the POP server, use the
102 -user username switch. The credentials profile entry in mh-profile(5)
103 describes the ways to supply a username and password.
104
105 If passed the -proxy command switch, inc will use the specified command
106 to establish the connection to the POP server. The string %h in the
107 command will be substituted by the hostname to connect to.
108
109 For debugging purposes, you may give the switch -snoop, which will al‐
110 low you to monitor the POP transaction. If -sasl -saslmech xoauth2 is
111 used, the HTTP transaction is also shown.
112
113 If nmh has been compiled with SASL support, the -sasl switch will en‐
114 able the use of SASL authentication. Depending on the SASL mechanism
115 used, this may require an additional password prompt from the user (but
116 the netrc file can be used to store this password, as described in
117 mh-profile(5)). The -saslmech switch can be used to select a particu‐
118 lar SASL mechanism.
119
120 If SASL authentication is successful, inc will attempt to negotiate a
121 security layer for session encryption. Encrypted traffic is labelled
122 with `(encrypted)' and `(decrypted)' when viewing the POP transaction
123 with the -snoop switch; see post(8)'s description of -snoop for its
124 other features.
125
126 If nmh has been compiled with OAuth support, the -sasl and -saslmech
127 xoauth2 switches will enable OAuth authentication. The -user switch
128 must be used, and the user-name must be an email address the user has
129 for the service, which must be specified with the -authservice service
130 switch. Before using this, the user must authorize nmh by running
131 mhlogin and granting authorization to that account. See mhlogin(1) for
132 more details.
133
134 If nmh has been compiled with TLS support, the -tls and -initialtls
135 switches will require the negotiation of TLS when connecting to the re‐
136 mote POP server. The -tls switch will direct inc to negotiate TLS as
137 part of the normal POP protocol using the STLS command. The -ini‐
138 tialtls switch will direct inc to negotiate TLS immediately after the
139 connection has taken place, before any POP commands are sent or re‐
140 ceived. Data encrypted by TLS is labeled `(tls-encrypted)' and `(tls-
141 decrypted)' when viewing the POP transaction with the -snoop switch.
142 The -notls switch will disable all attempts to negotiate TLS.
143
144 When using TLS the default is to verify the remote certificate and Sub‐
145 jectName against the local trusted certificate store. This can be con‐
146 trolled by the -certverify and -nocertverify switches. See your
147 OpenSSL documentation for more information on certificate verification.
148
150 $HOME/.mh_profile The user's profile.
151 /etc/nmh/mts.conf mts configuration file.
152 /var/mail/$USER Location of the system mail drop.
153
155 Path: To determine the user's nmh directory.
156 Alternate-Mailboxes:
157 To determine the user's mailboxes.
158 Inbox: To determine the inbox.
159 Folder-Protect: To set mode when creating a new folder.
160 Msg-Protect: To set mode when creating a new message and audit-
161 file.
162 Unseen-Sequence: To name sequences denoting unseen messages.
163
165 mhmail(1), scan(1), mh-mail(5), mh-profile(5), mhlogin(1), post(8),
166 rcvstore(1)
167
169 +folder defaulted by “Inbox” above.
170 -noaudit
171 -changecur
172 -format As described above.
173 -nosilent
174 -nosasl
175 -notruncate Unless -file name is given.
176 -width The width of the terminal.
177
179 The folder into which messages are being incorporated will become the
180 current folder. The first message incorporated will become the current
181 message, unless the -nochangecur option is specified. This leaves the
182 context ready for a show of the first new message.
183
184
185
186nmh-1.8 2016-11-02 INC(1)