Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!infonode!fordke From: fordke@infonode.ingr.com (Keith Ford x8614) Newsgroups: comp.mail.elm Subject: Re: filters Message-ID: <1991Jan21.182312.12920@infonode.ingr.com> Date: 21 Jan 91 18:23:12 GMT References: <1991Jan21.160107.14157@en.ecn.purdue.edu> Organization: Intergraph Corp. Huntsville, AL Lines: 29 In article <1991Jan21.160107.14157@en.ecn.purdue.edu> nichols@en.ecn.purdue.edu (Scott P Nichols) writes: >Is there a way to have the filter do more than one job on a letter? I use filter rules to pipe the letter to a temporary file, then call a script file to do futher processing. if ( subject "junk" ) then execute "cat - >/tmp/junk.$$; /usr/joe/bin/doJUNK $$" The $$ in a ksh indicates the pid of the program. Since multiple copies of filter could be running simultaneously, this prevents your temporary files from being over-written. The /usr/joe/bin/doJUNK program is something like this: # where are we? cd /tmp # send this to jane elm -s "Junk" jane >/usr/joe/Mail/junk # put a copy out for the server mv junk.$1 /usr/server/junk.$1 Hope this helps. -- | ...!uunet!ingr!fordke OR fordke@ingr.com | Micro Magic BBS (Fidonet: 1:373/12, MaBell: +1 205 830 2362) | "and the Trees are all kept equal by hatchet, axe, and saw." -Rush