The PIPE module accepts all messages directed to the pipe domain.
The local part of the message address 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 drect messages sent to the joe@somedomain address to the execjoe application.
<*@somedomain> = "execall\ -u\ *"@pipe
This ROuter record will drect messages sent to the joe@somedomain address to the execall application started with the -u joe parameters.
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, and it specified the name of the application (program) file in the external application directory.
The message text (including the message headers and the message body) is passed to the external application as its standard input. Note: the application must read the entire stdin data stream, otherwise message processing fails.
When the external application completes, the PIPE module reads and discards the application standard output. Make sure that your application does not write anything to its standard output, so it is not blocked when the communication channel (pipe) buffer between the application and the Server is full.
When the external application completes, the PIPE module reads its standard error channel. If it is not empty, the message delivery fails, and the text written to standard error is sent as an error report to the message sender.
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
For PIPE addresses that do not have the queue[name] prefix, the PIPE m