# inc(1) - man - phpMan

[INC(1mh)](https://www.chedong.com/phpMan.php/man/INC/1mh/markdown)                                                                                    [INC(1mh)](https://www.chedong.com/phpMan.php/man/INC/1mh/markdown)



## NAME
       inc - incorporate new mail to an nmh folder

## SYNOPSIS
       **inc** [**-help**] [**-version**] [_+folder_] [**-audit** _audit-file_] [**-noaudit**] [**-changecur** | **-nochangecur**]
            [**-form** _formfile_] [**-format** _string_] [**-file** _name_] [**-silent** | **-nosilent**] [**-truncate** |
            **-notruncate**] [**-width** _columns_] [**-host** _hostname_] [**-port** _portname/number_] [**-user** _username_]
            [**-proxy** _command_] [**-sasl** | **-nosasl**] [**-saslmech** _mechanism_] [**-authservice** _service_] [**-ini**‐‐
            **tialtls**] [**-notls**] [**-certverify** | **-nocertverify**] [**-snoop**]

## DESCRIPTION
       **inc**  incorporates  mail  from  the user's incoming mail drop into an **nmh** folder.  If the mail
       drop is a file, it can be in **mbox** or **MMDF** format.  If the mail drop is a directory it is con‐
       sidered to be in **Maildir** format.

       You  may  specify which folder to use with _+folder_.  If no folder is specified, then **inc** will
       use either the folder given by a (non-empty) “_Inbox_” entry in  the  user's  profile,  or  the
       folder  named  “_inbox_”.  If the specified (or default) folder doesn't exist, the user will be
       queried prior to its creation.

       When the new messages are incorporated into the folder, they are  assigned  numbers  starting
       with  the  next highest number for the folder.  As the messages are processed, a **scan** listing
       of the new mail is produced.

       The newly created messages will have a mode of 0600, see [chmod(1)](https://www.chedong.com/phpMan.php/man/chmod/1/markdown), on filesystems  that  sup‐
       port  it.  Alternatively, a “_Msg-Protect:_ _nnn_” profile entry gives the mode to use, in octal.
       For all subsequent operations on these messages, this initially assigned mode  will  be  pre‐
       served.

       If  the switch **-audit** _audit-file_ is specified (usually as a default switch in the user's pro‐
       file), then **inc** will append a header line and a line per message to the specified  audit-file
       with the format:

            <<inc>> date
            <scan line for first message>
            <scan line for second message>
            <etc.>

       This  is  useful  for keeping track of volume and source of incoming mail.  Eventually, **repl**,
       **forw**, **comp**, and **dist** may also output audit information to this  (or  another)  file,  perhaps
       with  “_Message-Id_”  information to keep an exact correspondence history.  “_Audit-file_” is as‐
       sumed to be in the user's nmh directory unless a full path is specified.

       **inc** will incorporate even improperly formatted messages into the user's nmh folder, inserting
       a blank line prior to the offending component and printing a comment identifying the bad mes‐
       sage.

       In all cases, except the use of **-file** _name_ (see below), the user's mail drop will be  zeroed,
       unless the **-notruncate** switch is given.

       If  the  profile  entry “_Unseen-Sequence_” is present and non-empty, then **inc** will add each of
       the newly incorporated messages to each sequence named in the profile entry.   **inc**  will  not
       zero each sequence prior to adding messages.

       The  interpretation  of  the **-form** _formatfile_, **-format** _string_, and **-width** _columns_ switches is
       the same as in [_scan_(1)](https://www.chedong.com/phpMan.php/man/scan/1/markdown).

       By using the **-file** _name_ switch, one can direct **inc** to incorporate messages from a file  other
       than the user's mail drop.  Note that the named file will _not_ be zeroed, unless the **-truncate**
       switch is given.

       The **-file** switch does not support the use of standard input.  Instead, the  **rcvstore**  command
       can be used to incorporate mail from the standard input stream.

       If  the environment variable **$MAILDROP** is set, then **inc** uses it as the location of the user's
       mail drop instead of the default (the **-file** _name_ switch still overrides this,  however).   If
       this  environment variable is not set, then **inc** will consult the profile entry “_MailDrop_” for
       this information.  If the value found is not absolute, then it is interpreted relative to the
       user's  **nmh**  directory.  If the value is not found, then **inc** will look in the standard system
       location for the user's mail drop.

       The **-silent** switch directs **inc** to be quiet and not ask any questions at all.  This is  useful
       for putting **inc** in the background and going on to other things.

### Using POP
       **inc**  will  normally  check  local  mail  drops for mail, as covered above.  But if the option
       “_pophost_” is set in “_mts.conf_”, or if the **-host** _hostname_ switch is given, or if the **$MAILHOST**
       environment  variable  is set, then **inc** will query this POP service host for mail to incorpo‐
       rate.  If **$MAILHOST** is set and **-host** is specified as well, the command-line switch will over‐
       ride  the  environment  variable.  The **-port** switch specifies the port name or number used to
       connect to the POP server.  If unspecified, the default is “pop3”.

       To specify a username for authentication with the POP server, use the **-user** _username_  switch.
       The  credentials  profile  entry in [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown) describes the ways to supply a username and
       password.

       If passed the **-proxy** _command_ switch, **inc** will use the specified command to establish the con‐
       nection  to the POP server.  The string _%h_ in the command will be substituted by the hostname
       to connect to.

       For debugging purposes, you may give the switch **-snoop**, which will allow you to  monitor  the
       POP transaction.  If **-sasl** **-saslmech** **xoauth2** is used, the HTTP transaction is also shown.

       If  **nmh** has been compiled with SASL support, the **-sasl** switch will enable the use of SASL au‐
       thentication.  Depending on the SASL mechanism used, this may require an additional  password
       prompt  from the user (but the _netrc_ file can be used to store this password, as described in
       [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown)).  The **-saslmech** switch can be used to select a particular SASL mechanism.

       If SASL authentication is successful, **inc** will attempt to negotiate a security layer for ses‐
       sion  encryption.   Encrypted  traffic  is labelled with `(encrypted)' and `(decrypted)' when
       viewing the POP transaction with the **-snoop** switch; see the  **post**  man  page  description  of
### -snoop

       If  **nmh**  has  been compiled with OAuth support, the **-sasl** and **-saslmech** **xoauth2** switches will
       enable OAuth authentication.  The **-user** switch must be used, and the  _user-name_  must  be  an
       email  address  the  user  has for the service, which must be specified with the **-authservice**
       _service_ switch.  Before using this, the user must authorize nmh by running **mhlogin** and grant‐
       ing authorization to that account.  See [_mhlogin_(1)](https://www.chedong.com/phpMan.php/man/mhlogin/1/markdown) for more details.

       If  **nmh**  has been compiled with TLS support, the **-initialtls** switch will require the negotia‐
       tion of TLS when connecting to the remote POP server.  **inc** will negotiate TLS immediately af‐
       ter  the  connection has taken place, before any POP commands are sent or received.  Data en‐
       crypted by TLS is labeled `(tls-encrypted)' and `(tls-decrypted)` when viewing the POP trans‐
       action with the **-snoop** switch.  The **-notls** switch will disable all attempts to negotiate TLS.

       When  using  TLS  the default is to verify the remote certificate and SubjectName against the
       local trusted certificate store.  This can be controlled by the **-certverify** and **-nocertverify**
       switches.  See your OpenSSL documentation for more information on certificate verification.

## FILES
       $HOME/.mh_profile   The user's profile.
       /etc/nmh/mts.conf   mts configuration file.
       /var/mail/$USER     Location of the system mail drop.

## PROFILE COMPONENTS
       Path:               To determine the user's nmh directory.
       Alternate-Mailboxes:
                           To determine the user's mailboxes.
       Inbox:              To determine the inbox.
       Folder-Protect:     To set mode when creating a new folder.
       Msg-Protect:        To set mode when creating a new message and audit-file.
       Unseen-Sequence:    To name sequences denoting unseen messages.

## SEE ALSO
       [_mhmail_(1)](https://www.chedong.com/phpMan.php/man/mhmail/1/markdown), [_scan_(1)](https://www.chedong.com/phpMan.php/man/scan/1/markdown), [_mh-mail_(5)](https://www.chedong.com/phpMan.php/man/mh-mail/5/markdown), [_mh-profile_(5)](https://www.chedong.com/phpMan.php/man/mh-profile/5/markdown), [_mhlogin_(1)](https://www.chedong.com/phpMan.php/man/mhlogin/1/markdown), [_post_(8)](https://www.chedong.com/phpMan.php/man/post/8/markdown), [_rcvstore_(1)](https://www.chedong.com/phpMan.php/man/rcvstore/1/markdown)

## DEFAULTS
       +folder             defaulted by “Inbox” above.
### -noaudit
### -changecur
       -format             As described above.
### -nosilent
### -nosasl
       -notruncate         Unless **-file** _name_ is given.
       -width              The width of the terminal.

## CONTEXT
       The  folder  into  which messages are being incorporated will become the current folder.  The
       first message incorporated will become the current message, unless the **-nochangecur** option is
       specified.  This leaves the context ready for a **show** of the first new message.



nmh-1.7.1                                    2016-11-02                                     [INC(1mh)](https://www.chedong.com/phpMan.php/man/INC/1mh/markdown)
