inc - Incorporates new mail (only available within the message handling
inc [+folder] [options]
The -audit option specifies that a record be kept in the named file of
all new mail that is incorporated. The inc command places a scan line
in the named audit file for each message it incorporates. This is use-
ful for keeping track of the volume and source of incoming mail.
Auditing is often set up in the .mh_profile file rather than through
the -audit option on the command line. See the mh_profile(4) reference
page for more information on how to add entries to .mh_profile.
If auditing is enabled through the .mh_profile file, you can disable it
by using the -noaudit option on the command line.
The -changecur option makes the first new message the current message.
This is the default operation of inc. If you want the current message
to remain as it was, use the -nochangecur option.
The -conv option converts the mail exchange codeset of the incoming
message to the user application codeset at the time an incoming message
is stored. By default, conversion to user application code is done
when mail is displayed. If the incoming message contains a Content-Type
header with a charset value, the inc -conv command modifies this value
to be the name of the application codeset. The command uses the value
in the /usr/lib/mail-codesets file as the mail interchange codeset. If
this file is absent or if the appropriate converter is not installed in
the /usr/lib/nls/loc/iconv directory, codeset conversion does not
occur. If the /usr/lib/mail-codesets file specifies a value that does
not match the mail interchange codeset of the incoming message, the
conversion operation may corrupt the contents of the message. Refer to
mh(1) for more information about the /usr/lib/mail-codesets file.
You can specify the inshdr parameter with the -conv option if you
receive many messages without the "Content-Type" header entry and you
need to include it at the time the message is converted and stored.
The header consists of the following lines:
Content-Type: TEXT/PLAIN; charset="<application-codeset>"
The -noconv option, which is the default, specifies that the exchange
codeset of the incoming message is not converted to the user applica-
tion codeset at the time a message is stored.
Incorporates mail from a named file. This is usually a file other than
your default maildrop. Note that the mail system does not zero the
named file unless the -truncate option is given.
Controls the format of the display produced by the inc command. The
output of inc is formatted according to the instructions in the named
file. The file must be an mhl format file; see the mh-format(4) refer-
ence for more information.
Controls the format of the display produced by the inc command. The
output of inc is formatted according to the instructions given by the
specified string. This must be a standard format string; see the mh-
format(4) reference page for more information. If the string contains
blank spaces, the whole string must be enclosed in double quotes.
Prints a list of the valid options for this command.
The -silent option directs inc to be quiet and not ask any questions at
all. The -silent option is useful when you want to run inc in the back-
ground and go on to other tasks. By default, the -nosilent option is in
Specifies the source file from which mail is retrieved. The only value
allowed is the keyword file, which specifies the standard mail system.
Alternative values are supported only for use with other mail systems.
The -truncate option zeroes your maildrop file when mail is fetched
from it. This is the default operation for /usr/spool/mail/$USER but
not for an alternative maildrop specified by the -file option.
Specify the -notruncate option if you do not want the
/usr/spool/mail/$USER file to be zeroed. Specify the -truncate option
if you do want the file specified with the -file option to be zeroed.
Controls the width of the display produced by inc. By default, or if no
value is specified, the inc command produces a display as wide as the
terminal screen allows.
Specifies the folder into which new mail is incorporated. By default,
the inc command incorporates mail into your +inbox folder.
Use the inc command to incorporate mail from your incoming maildrop into a
The new messages being incorporated are numbered sequentially, starting
with the next highest available number in the folder. If the specified (or
default) folder does not exist, inc will ask you whether you want to create
it. As the messages are processed, the command produces a scan listing of
the new mail messages. See the scan(1) reference page for details of the
The folder into which messages are being incorporated becomes the current
If your .mh_profile contains a Msg-Protect: entry, the mail system uses
this entry as the protection on the newly created messages; otherwise, it
uses the protection 0600. When the 0600 default protection is used, it
means that messages created have read and write permission for the user
only. During all operations on messages, the mail system preserves this
initially assigned protection for each message. You can also use the chmod
command to set a different protection on an individual message; in this
case, the mail system preserves the new protection.
Note that the inc command incorporates improperly formatted messages into
your folder, inserting a blank line prior to the offending component and
printing a comment identifying the bad message.
If the entry Unseen-Sequence is present in your profile, then inc adds each
of the newly incorporated messages to each sequence named by the profile
entry. This is similar to the Previous-Sequence profile entry supported by
all the MH commands that take the msg or msgs arguments. Note that inc does
not zero each sequence prior to adding messages.
If the environment variable $MAILDROP is set, then inc uses the value of
this variable as the location of your maildrop instead of the default. If
this variable is not set, then inc consults the profile entry Maildrop for
this information. If the value found is not absolute, then it is inter-
preted relative to your Mail directory, which is usually $HOME/Mail. If the
value is not found, then inc looks in the standard system location for your
maildrop. The -file option overrides all these defaults.
If you specify no parameters or options on the inc command line, the fol-
lowing defaults are in effect:
+ +folder defaults to +inbox
+ -truncate if the -file option is not given; otherwise, -notruncate
+ -width defaults to the width of the terminal
The following entries in the $HOME/.mh_profile file affect inc command
To determine your Mail directory.
To determine your mailboxes.
To set protection mode when creating a new folder.
To determine the location of your maildrop.
To set protection mode when creating a new message or an audit file.
To name sequences denoting unseen messages.
For this version of MH, the -source option supports only the value file.
Additional values are supported for use only with other mail systems.
The following example fetches incoming mail and places it in the folder
% inc +not_read
The user profile
The system customization file
The user's maildrop
Commands: chmod(1), mhl(1), mhmail(1), scan(1), post(8)
Files: mh-mail(4), mh-format(4), mh_profile(4)