PIPE Module

Intro
Installation
SysAdmin
Objects
Transfer 
Router 
Rules 
SMTP 
UUCP 
Local 
RPOP 
LIST 
PIPE
Access
Directory
Data Files
Clusters
WebMail
Miscellaneous
Licensing
HowTo
  • The Submitted Folder
  • Delivering to External Applications
  • Configuring the PIPE module
  • The PIPE module allows external applications running on the Server computer to submit messages to the Communigate Pro Server bypassing TCP/IP connections and Internet protocols, and it allows the Server to deliver messages to external applications.

    The PIPE module is also used to submit messages composed with the mail and sendmail programs that come with the CommuniGate Pro server software. These programs are designed as drop-in substitutions for legacy mail and sendmail programs.

    The Submitted Folder

    The CommuniGate Pro PIPE module creates the Submitted folder inside the CommuniGate Pro base folder.

    The PIPE module scans this folder periodically, and processes the files with the .sub file name extension. When such a file is found, the module copies it into a message queue file and submits that file to the Server kernel for processing.

    The .sub text files should contain messages in the RFC822 format. The module uses the data in the RFC822 header fields to compose the message envelope.

    If processing of a .sub file fails (for example, if the file does not have any recipient address), the module places a record into the System Log, and changes the file extension to .bad.

    If the .sub file is submitted successfully, the file is deleted from the Submitted folder.

    Because of the way the PIPE module processes the Submitted folder, it is recommended either to compose messages in a different folder and then move the composed .sub files to the Submitted folder, or to compose messages in the Submitted folder, in files with the .tmp file name extension, and then change the file name extension to .sub.

    Messages submitted via the PIPE module are marked as "received from a trusted source", so they can be relayed without restrictions.

    The Submitted folder is used for Legacy Mail Emulation.


    Delivering to External Applications

    The PIPE module accepts all messages directed to the pipe domain.

    The local part of the message address is specifies the external application to launch. The part can contain parameters, and can be enclosed into the quotation marks.

    Example:
    A message directed to the "execjoe -l store"@pipe address will be sent to the application execjoe started with the -l store parameters.

    You usually use the PIPE delivery via the Router:

    <*@somedomain> = exec*@pipe
    this Router record will direct messages sent to the joe@somedomain address to the execjoe application.

    <*@somedomain> = "execall\ -u\ *"@pipe
    this Router record will direct messages sent to the joe@somedomain address to the execall application started with the -u joe parameters.

    Unlike the Automated Rules Execute operation, the PIPE delivery operation starts ANY program specified outside the server (in the message address).

    To limit the set of applications that can be started via the PIPE module, the external application directory is specified as one of the PIPE module settings. The application names specified in message addresses can not include the slash (/) or the backslash (\\) symbols, and they cannot start with the dot (.) symbol.

    The message text (including the message headers and the message body) is passed to the external application as its standard input.

    The PIPE module discards the external application standard output.

    If the external application has written any text to its standard error channel, the message delivery fails, and the standard error text is sent to the message sender.

    Serialized Delivery

    In order to allow several PIPE processors to deliver messages simultaneously, the PIPE module creates a separate queue for each message it has to deliver. If you want to serialize processing, you can use the following form of the PIPE address:

    "queue[name] application parameters"@pipe

    All messages directed to these addresses will be placed into the name queue, and a single PIPE processor will send the enqueued messages to the application(s) specified in those addresses. You can use any alphanumeric string as a queue name, and you can specify as many queues as you need.

    The following Router records can be used to maintain two serialized PIPE queues (the PROC1 and ARCH queues):
    <incoming> = "queue[PROC1] procin -mark"@pipe
    <control>  = "queue[PROC1] procin1 -control"@pipe
    <archiver> = "queue[ARCH] appendfile /var/archive"@pipe

    All messages sent to the <incoming@maindomain.com> and <control@maindomain.com> will be processed one-by-one using one PIPE processor.

    For PIPE addresses that do not have the queue[name] prefix, the PIPE module creates separate queues with numeric names.


    Configuring the PIPE module

    Use a Web browser to open the PIPE page in the Settings realm of the WebAdmin Interface.
      Log:
    Log
    Use the Log setting to specify what kind of information the PIPE module should put in the Server Log. Usually you should use the Major (message transfer reports) or Problems (message transfer and non-fatal errors) levels. But when you experience problems with the PIPE module, you may want to set the Log Level setting to Low-Level or All Info: in this case protocol-level or link-level details will be recorded in the System Log as well. When the problem is solved, set the Log Level setting to its regular value, otherwise your System Log files will grow in size very quickly.
    The PIPE module records in the System Log are marked with the PIPE tag.

    Submitting
    Check Submitted Directory Every:
    Check Submitted Directory
    This option specifies how often the PIPE module should scan the Submitted directory and deliver the .sub files stored there.

    Delivering Processes:
    Application Directory:
    Processing Time Limit:

    Processes
    This option specifies the number of threads used to deliver messages. If some of your external applications are slow, you may want to use several PIPE delivery threads, so several messages can be processed at the same time.

    Application Directory
    This option specifies the directory with the applications the PIPE module can launch. If an empty string is specified for this option, all messages directed to the PIPE module are rejected.

    Processing Time Limit
    This option limits the time an external application uses to process a message. If an external application does not complete within the specified period of time, the application process is interrupted and the message is rejected.

    CommuniGate® Pro Guide. Copyright © 1998-1999, Stalker Software, Inc.