From 700d22f3fc0cc559170e8085a1b799b61dceb738 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Mon, 1 Apr 2013 21:24:14 -0400 Subject: Clean & integrate force_command. Work by J. Nick Koston, for cPanel, Inc. --- doc/doc-docbook/spec.xfpt | 13 ++++++++++--- doc/doc-txt/ChangeLog | 3 +++ doc/doc-txt/NewStuff | 4 ++++ doc/doc-txt/OptionLists.txt | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index c3994a79c..4a9b3b955 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -21712,11 +21712,14 @@ inserted in the argument list at that point &'as a separate argument'&. This avoids any problems with spaces or shell metacharacters, and is of use when a &(pipe)& transport is handling groups of addresses in a batch. -If &(force_command)& is enabled on the transport, Special handling takes place +If &%force_command%& is enabled on the transport, Special handling takes place for an argument that consists of precisely the text &`$address_pipe`&. It -is handled much like &`$pipe_addresses`& above. It is expanded and each +is handled similarly to &$pipe_addresses$& above. It is expanded and each argument is inserted in the argument list at that point -&'as a separate argument'&. +&'as a separate argument'&. The &`$address_pipe`& item does not need to be +the only item in the argument; in fact, if it were then &%force_command%& +should behave as a no-op. Rather, it should be used to adjust the command +run while preserving the argument vector separation. After splitting up into arguments and expansion, the resulting command is run in a subprocess directly from the transport, &'not'& under a shell. The @@ -21883,6 +21886,10 @@ command = /usr/bin/remote_exec myhost -- $address_pipe force_command .endd +Note that &$address_pipe$& is handled specially in &%command%& when +&%force_command%& is set, expanding out to the original argument vector as +separate items, similarly to a Unix shell &`"$@"`& construct. + .option ignore_status pipe boolean false If this option is true, the status returned by the subprocess that is set up to run the command is ignored, and Exim behaves as if zero had been returned. diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index abaee5659..bfef5556d 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -185,6 +185,9 @@ PP/19 Renamed DNSSEC-enabling option to "dns_dnssec_ok", to make it clearer that Exim is using the DO (DNSSEC OK) EDNS0 resolver flag, not performing validation itself. +PP/20 Added force_command boolean option to pipe transport. + Patch from Nick Koston, of cPanel Inc. + Exim version 4.80.1 ------------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index ab8589e53..e349fc855 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -130,6 +130,10 @@ Version 4.82 18. If built with EXPERIMENTAL_PRDR, per-recipient data responses per a proposed extension to SMTP from Eric Hall. +19. The pipe transport has gained the force_command option, to allow + decorating commands from user .forward pipe aliases with prefix + wrappers, for instance. + Version 4.80 ------------ diff --git a/doc/doc-txt/OptionLists.txt b/doc/doc-txt/OptionLists.txt index fa692bfb1..cb5f35eb6 100644 --- a/doc/doc-txt/OptionLists.txt +++ b/doc/doc-txt/OptionLists.txt @@ -235,6 +235,7 @@ forbid_include boolean false redirect forbid_pipe boolean false redirect 4.00 forbid_sieve_filter boolean false redirect 4.44 forbid_smtp_code boolean false redirect 4.63 +force_command boolean false pipe 4.82 freeze_exec_fail boolean false pipe 1.89 freeze_signal boolean false pipe 4.75 freeze_tell boolean false main 4.00 replaces freeze_tell_mailmaster -- cgit v1.2.3