Procmail to Send Email to Programs for Processing - Linux

This is a discussion on Procmail to Send Email to Programs for Processing - Linux ; I have an problem that I can probably solve by using procmail to save an Email attachment to disk, run a program to act upon that attachment, and then Email the resulting output (probably also as an attachment) back to ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Procmail to Send Email to Programs for Processing

  1. Procmail to Send Email to Programs for Processing

    I have an problem that I can probably solve by using procmail to save an
    Email attachment to disk, run a program to act upon that attachment, and
    then Email the resulting output (probably also as an attachment) back to
    the sender of the message.

    Do any of you know of any books or web pages (or man pages) that talk
    about how to do that?

    I've seen mention of being able to do such a thing, but I haven't seen
    much clear information on how to actually do it.

    Most of what I've found so far on procmail has been about using it to
    filter Email, do a vacation reply, or rebroadcast to a distribution
    list, which isn't quite the same thing.

    Thanks for the ideas!

    --

    (Preferably reply to the newsgroup, please. If you reply by Email, I
    will sincerely try to receive your message, but it will probably get
    buried in spam.)

  2. Re: Procmail to Send Email to Programs for Processing

    Interesting, after looking around a while, I thought up another Google
    search that found this, which ... well, may help (I'm not sure yet):

    http://www.panix.com/~elflord/unix/procmail.html#output

    Any other suggested sources would still be welcome. Thanks.

    Gary Morrison wrote:

    > I have an problem that I can probably solve by using procmail to save an
    > Email attachment to disk, run a program to act upon that attachment, and
    > then Email the resulting output (probably also as an attachment) back to
    > the sender of the message.
    >
    > Do any of you know of any books or web pages (or man pages) that talk
    > about how to do that?
    >
    > I've seen mention of being able to do such a thing, but I haven't seen
    > much clear information on how to actually do it.
    >
    > Most of what I've found so far on procmail has been about using it to
    > filter Email, do a vacation reply, or rebroadcast to a distribution
    > list, which isn't quite the same thing.
    >
    > Thanks for the ideas!


    --

    (Preferably reply to the newsgroup, please. If you reply by Email, I
    will sincerely try to receive your message, but it will probably get
    buried in spam.)

  3. Re: Procmail to Send Email to Programs for Processing

    On 2007-09-16 20:21:51 -0500, Gary Morrison said:

    > I have an problem that I can probably solve by using procmail to save
    > an Email attachment to disk, run a program to act upon that attachment,
    > and then Email the resulting output (probably also as an attachment)
    > back to the sender of the message.


    Have you considered doing it with perl instead? In other words, if
    procmail absolutely necessary?

    --
    Apply rot13 to this e-mail address before using it.

    JR


  4. Re: Procmail to Send Email to Programs for Processing


    On 2007.09.17 01:21:51,
    the amazing declared:

    > I have an problem that I can probably solve by using procmail to save an
    > Email attachment to disk, run a program to act upon that attachment, and
    > then Email the resulting output (probably also as an attachment) back to
    > the sender of the message.


    It occurred to me that I might want something like this.
    But I don't know how to extract attachments from email.
    So I googled around and found something called 'ripmime',
    which looks very nice:

    http://www.pldaniels.com/ripmime/

    That might be a piece of what you want.

    Cheers, N.

    --
    Nollaig MacKenzie
    http://www.yorku.ca/nollaig

  5. Re: Procmail to Send Email to Programs for Processing

    Jolly Roger wrote:

    > Have you considered doing it with perl instead? In other words, if
    > procmail absolutely necessary?


    I'd most likely have procmail invoke a Perl script, but I don't know of
    any way to make reception of Email trigger a Perl script to run, other
    than to have procmail invoke it. Do you?

    --

    (Preferably reply to the newsgroup, please. If you reply by Email, I
    will sincerely try to receive your message, but it will probably get
    buried in spam.)

  6. Re: Procmail to Send Email to Programs for Processing

    On 2007-09-19 19:51:23 -0500, Gary Morrison said:

    > Jolly Roger wrote:
    >
    >> Have you considered doing it with perl instead? In other words, if
    >> procmail absolutely necessary?

    >
    > I'd most likely have procmail invoke a Perl script, but I don't know of
    > any way to make reception of Email trigger a Perl script to run, other
    > than to have procmail invoke it. Do you?


    If this isn't for a large system, I would probably look into doing it
    *all* in Perl (receive the email, grab the attachment, do whatever to
    it, send it off again).

    What are you needing to do to these attachments, exactly?

    --
    (Apply rot13 to this e-mail address before using it.)

    JR


  7. Re: Procmail to Send Email to Programs for Processing

    Jolly Roger wrote:

    > If this isn't for a large system, I would probably look into doing it
    > *all* in Perl (receive the email, grab the attachment, do whatever to
    > it, send it off again).


    Ah, I see.

    I don't think I have control over reception of Email. In other words,
    yes, it's fair to say that it's a large system.

    >
    > What are you needing to do to these attachments, exactly?


    Unfortunately, I can't give a lot of detail on that (sorry, that's
    proprietary information of my company and the other company we're
    working with). In short though, the attachment to the in-coming Email
    would be input to a simulation and the output of the simulation would
    become the attachment to the returned Email.

    --

    (Preferably reply to the newsgroup, please. If you reply by Email, I
    will sincerely try to receive your message, but it will probably get
    buried in spam.)

+ Reply to Thread