Difference between revisions of "Pipe test"
From Mailutils
Jump to navigationJump to search (Initial revision) |
m (→See also) |
||
Line 27: | Line 27: | ||
[[Category:Sieve]] | [[Category:Sieve]] | ||
− | [[Category:Sieve | + | [[Category:Sieve Tests]] |
[[Category:Sieve Extensions]] | [[Category:Sieve Extensions]] |
Latest revision as of 00:09, 19 December 2010
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.