Procmail to Send Email to Programs for Processing

This is a discussion on Procmail to Send Email to Programs for Processing within the Linux Administration forums, part of the Linux Forums category; I have an problem that I can probably solve by using procmail to save an Email attachment to disk, run ...


Go Back   Usenet Forums > Linux Forums > Linux Administration

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-17-2007
Gary Morrison
 
Posts: n/a
Default 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.)
Reply With Quote
  #2 (permalink)  
Old 09-17-2007
Gary Morrison
 
Posts: n/a
Default 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.)
Reply With Quote
  #3 (permalink)  
Old 09-17-2007
Jolly Roger
 
Posts: n/a
Default Re: Procmail to Send Email to Programs for Processing

On 2007-09-16 20:21:51 -0500, Gary Morrison <mr88cet@texas.net> 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

Reply With Quote
  #4 (permalink)  
Old 09-17-2007
Nollaig MacKenzie
 
Posts: n/a
Default Re: Procmail to Send Email to Programs for Processing


On 2007.09.17 01:21:51,
the amazing <mr88cet@texas.net> 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
Reply With Quote
  #5 (permalink)  
Old 09-20-2007
Gary Morrison
 
Posts: n/a
Default 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.)
Reply With Quote
  #6 (permalink)  
Old 09-20-2007
Jolly Roger
 
Posts: n/a
Default Re: Procmail to Send Email to Programs for Processing

On 2007-09-19 19:51:23 -0500, Gary Morrison <mr88cet@texas.net> 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

Reply With Quote
  #7 (permalink)  
Old 09-21-2007
Gary Morrison
 
Posts: n/a
Default 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 With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:54 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0