[kwlug-disc] using tee to pipe to multiple programs from /etc/valiases

Khalid Baheyeldin kb at 2bits.com
Wed Apr 14 15:12:24 EDT 2010

On Wed, Apr 14, 2010 at 2:55 PM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:

>  so here's the deal -- i have a system where a /etc/valiases file is
> set up to pipe incoming input destined for all email addresses in a
> given domain to a single PHP script:
>  /etc/valiases/<domain name>
>  *:  "| myphpscript.php"
> works great, no problem.  *now* i want to have precisely the same
> incoming emails sent to *multiple* programs/scripts and, based on my
> testing with the "tee" command, i can do it thusly:
>  $ <input generator> | tee >(pgm1) >(pgm2) ... >(pgmn) > /dev/null
> (that last redirection is to stop anything from going further on
> stdout.)
>  i've tested that incantation on the command line and it works fine.
> but when i try the same thing in the /etc/valiases/<domainname> file,
> it fails utterly.  so i'm fairly confident i know how to use tee to do
> this, i just don't know enough about valiases to know what kind of
> restrictions i have to work with.  is what's in there executed in a
> restricted shell so that that tee variation won't work?  thanks.
I don't know much about valiases either ...

But two possibilities:

- valiases need the full path name to the executables.

- valiases does not execute stuff with a normal sh/bash shell so the
redirection syntax does not work?

Khalid M. Baheyeldin
2bits.com, Inc.
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. --  Edsger W.Dijkstra
Simplicity is the ultimate sophistication. --   Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20100414/bb9b6280/attachment.html>

More information about the kwlug-disc mailing list