email2ncid man page

email2ncid — convert an email to an NCID message


 email2ncid [--configfile|-C <filename>]
            [--ncidserver|-n <[host][:port]>]
            [--test|-t <1-9>]


The email2ncid gateway sends the contents of an email to the NCID server as one line.  It is called from a .procmailrc file when an email contains the line: Subject: NCID Message

The email2ncid gateway has an option to only send an email subject line to the NCID server.  It is called from a .procmailrc file when the email address or name matches on the email "From:" line.

The email must be in either plain text, or HTML and plain text. The output of email2ncid is a one line NCID message sent to an NCID server.


-C, --configfile <filename>

Specifies the configuration file to use.  The program will still run if a configuration file is not found.

-h, --help

Displays the help message and exits.

-m, --man

Displays the manual page and exits.

-N, --notify

This option sends a message to NCID containing only the subject line instead of the email contents as one line.  It is a notification of some type:

    * visitor arrived at a gate in a gated community
    * an important email arrived
-n <[host][:port]>, --ncidserver=<[host][:port]>

Specifies the NCID server. Port may be specified by suffixing the hostname with :<port>.

Input must be <host:port> or <host>, or <:host>

-t, --test <1-9>

Test mode connects to the server and displays some information and the message.  It does not send the message to the server. Set the level to a higher number for more information. Levels range from 1 to 9, but not all levels are used.

    test = 1: show some variables and generated message
    test = 2: additionally show 2 or 3 lines returned by server
    test = 3: additionally show tne email message

Default: no test mode

-V, --version

Displays the version.


The NCID server

A dynamic DNS service:

ChangeIP (

Dynu     (

DynDNS   (

A Mail Transport Agent (MTA):

exim, postfix, sendmail, etc.


Forward port 25 TCP/UDP to the computer running the MTA


$HOME/.procmailrc must be created or updated to call email2ncid.

Execute the following command to automate this process:

ncid-setup procmailrc


perl 5.6 or higher, perl(Config::Simple)




See Also

ncidd.8, email2ncid.conf.5, procmail.1


2016-11-01 perl v5.26.2 User Contributed Perl Documentation