On Wed, 11 Mar 1998, Rob Lingelbach wrote:
> is this filter syntax correct:
>
> if $header_from contains hotmail.com
> then log "$tod_log Shunted $message_id for: $header_from"
> save /export/home/rob/Folders/spam.exim
> pipe "/usr/local/bin/cannedreply $sender_address"
> seen finish
> endif
>
> ...and cannedreply might be:
>
> #!/bin/sh
> /bin/mailx -s "spam filtration response" </usr/local/lib/cannedreply.txt
>
>
> ...when testing the above exim returned "The address_pipe transport
> has not set a uid for local delivery of |/usr/local/bin/cannedreply
> $sender_address" so I set the pipe transport in exim's configure
> thusly:
>
> address_pipe:
> driver = pipe;
> user = root,
> group = other,
> return_output
>
>
> ...but I suspect I've done something wrong because a test message
> doesn't cause the "cannedreply" script to execute.
You should try running a delivery with -d9 to see what is going on.
However, I think I can guess. Exim won't normally run pipes as root, as
a security precaution. This is controlled by the never_users option,
set to root in the default configuration.
BUT: don't just remove that setting! By setting user=root on the
address_pipe file, you force that user for *all* pipes that come from
filter or forward files, *including those set up by users*.
In Exim 1.82 you can specify a different transport for users' .forward
file pipes by setting pipe_transport on the forwardfile director,
thereby getting them to avoid the default transport used by the system
filter (for which you set the user).
In the next release of Exim you can directly set a specific transport
for pipes generated by the system filter.
--
Philip Hazel University Computing Service,
ph10@??? New Museums Site, Cambridge CB2 3QG,
P.Hazel@??? England. Phone: +44 1223 334714
--
*** Exim information can be found at
http://www.exim.org/ ***