diff options
author | rsc <devnull@localhost> | 2005-10-29 16:26:44 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-10-29 16:26:44 +0000 |
commit | 5cdb17983ae6e6367ad7a940cb219eab247a9304 (patch) | |
tree | 8ca1ef49af2a96e7daebe624d91fdf679814a057 /src/cmd/upas/filterkit/pipefrom.sample | |
parent | cd3745196389579fb78b9b01ef1daefb5a57aa71 (diff) | |
download | plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.gz plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.tar.bz2 plan9port-5cdb17983ae6e6367ad7a940cb219eab247a9304.zip |
Thanks to John Cummings.
Diffstat (limited to 'src/cmd/upas/filterkit/pipefrom.sample')
-rwxr-xr-x | src/cmd/upas/filterkit/pipefrom.sample | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/cmd/upas/filterkit/pipefrom.sample b/src/cmd/upas/filterkit/pipefrom.sample new file mode 100755 index 00000000..616bc683 --- /dev/null +++ b/src/cmd/upas/filterkit/pipefrom.sample @@ -0,0 +1,24 @@ +#!/bin/rc + +rfork e +TMP=/tmp/myupassend.$pid + +# collect upas/send options +options=() +while (! ~ $#* 0 && ~ $1 -*) { + options=($options $1); + shift +} + +# collect addresses and add them to my patterns +dests=() +while (! ~ $#* 0) { + dests=($dests $1); + shift +} +echo $dests > $TMP +upas/list add /mail/box/$user/_pattern $TMP >[2] /dev/null +rm $TMP + +# send mail +upas/send $options $dests |