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

Robert P. J. Day rpjday at crashcourse.ca
Wed Apr 14 14:55:44 EDT 2010


  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.

rday
--

========================================================================
Robert P. J. Day                               Waterloo, Ontario, CANADA

            Linux Consulting, Training and Kernel Pedantry.

Web page:                                          http://crashcourse.ca
Twitter:                                       http://twitter.com/rpjday
========================================================================



More information about the kwlug-disc_kwlug.org mailing list