From: Jonathan Hudson Date: 2007-11-07T02:05:10+09:00 Subject: Re: Procmail to ruby On Mon, 05 Nov 2007 14:50:30 -0800 barjunk wrote: > On Nov 5, 8:01 am, Jonathan Hudson wrote: > > On Mon, 5 Nov 2007 15:05:36 +0100 > > > > Mislav Kasner wrote: > > > Hello, > > > > > I want to write a Procmail recipe that pipes a message to a > > > Ruby script as ARGV argument. > > > I wrote this recipe but it doesn't work. > > > > > :0 > > > * ^TO_* > > > | ruby main.rb > > > > > How can I pass a message as argument to the script? > > > > e.g. > > > > :0 fw > > * ^X-MS-Has-Attach: yes > > | ${HOME}/bin/fixup_b0rken_tnef.rb > > The above implies a properly formated bang line, correct? As quoted yes, but the following works as well, assuming ruby in on the PATH known to procmail. :0 fw * ^X-MS-Has-Attach: yes | ruby ${HOME}/bin/fixup_b0rken_tnef.rb -jh