Procmail to ruby

Discussion in 'Ruby' started by Mislav Kasner, Nov 5, 2007.

  1. 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?
     
    Mislav Kasner, Nov 5, 2007
    #1
    1. Advertising

  2. 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
     
    Jonathan Hudson, Nov 5, 2007
    #2
    1. Advertising

  3. Mislav Kasner

    barjunk Guest

    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?

    Mike B.
     
    barjunk, Nov 5, 2007
    #3
  4. 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
     
    Jonathan Hudson, Nov 6, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    1,857
    Jim Gibson
    Nov 15, 2006
  2. Pet Farrari

    Another procmail configuration

    Pet Farrari, Jan 24, 2007, in forum: Perl
    Replies:
    3
    Views:
    2,136
    Randal L. Schwartz
    Jan 28, 2007
  3. J Cardella
    Replies:
    3
    Views:
    192
    Johan Vromans
    Sep 28, 2004
  4. Pet Farrari

    Another procmail configuration

    Pet Farrari, Jan 24, 2007, in forum: Perl Misc
    Replies:
    4
    Views:
    125
    Dr.Ruud
    Jan 25, 2007
  5. Horst Lemminger
    Replies:
    1
    Views:
    447
    Dr Eberhard Lisse
    Dec 20, 2011
Loading...

Share This Page