Pipe test

From Mailutils
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Pipe is a Sieve extension test.

Syntax

  pipe [:envelope] [:header] [:body] 
       [:exit <code: number>] [:signal <sig: number>]
       <program: string>

The pipe test executes a shell command specified by program and pipes the entire message, including its envelope, to its standard input.

Piping only certain parts of the message can be requested by supplying corresponding tagged arguments. For example

  pipe :envelope :body "prog"

will send to prog only envelope and body of each message.

The test evaluates to True if program terminated with the code equal to code, or, if it terminated on a signal, if the number of the signal that caused its termination equals to sig.

If :exit tagged argument is not given, code defaults to 0.

If the program terminates on signal and :signal is not given, error is reported and execution of the script is aborted.

See also