On Wed, 10 Nov 2004, Hardy Merrill wrote:
Comments below.
--- "Scot L. Harris" <webid@xxxxxxxxxx> wrote:
On Wed, 2004-11-10 at 12:46, Hardy Merrill wrote:For every email I receive I'd like to run aprogramand have the program have access to the data intheemail. It's been a while since I've used email onRedHat/Fedora (I got lazy and have been using yahoomail)- I used to use mutt with fetchmail and procmailbutnever used that combination for anything likethis.Can it do that? Can procmail kick off a programandgive the program the contents of the mail asinput?
What other email clients can do that? Canevolution?
Do you want the program to modify the email and pass it on or just analyze data in the email?
I'm thinking of creating a football pool email app - I know this has probably been done a thousand times before, but I'd like to do it myself just for fun.
My thought is to send members of the pool an email listing all the games, and having each member respond to the email with their picks. My app would take in each email and run a script - the script would parse the email and ... etc.
So the answer to your question is I just need the script to analyze the email - at this point I don't think the script needs to modify the email nor pass it on. Actually, I do want the email "filtered" (or sent) to a "football pool" mail box, so the requirement is: 1. pipe email to script, and 2. send email to a specific mailbox
that really is the sort of thing you do in procmail.
take a look at man procmail and man procmailrc and look at the procmailex man page as well.
something like:
:0: * ^Subject:.*football football_pool
would deliver mails containing the subject including the word football to the football_pool folder...
I plan to install and try Evolution. If I can't get that to work I'll go the fetchmail/procmail/perl script/mutt route.
Thanks!
Hardy
If you want to modify the message and pass it along in it's modified form then you probably want to look at using procmail. There are many things you can do to a message in procmail including modifying headers and piping the message through another script or program. You can even pass just the headers or the body of the message to the pipe or the whole thing.
In evolution you can pipe the message to a an external script or program (such as spamassassin) but it will only get a return code, you can not modify the content of the message through evolution filters.
-- Scot L. Harris webid@xxxxxxxxxx
If you would understand your own age, read the works of fiction produced in it. People in disguise speak freely.
-- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
__________________________________ Do you Yahoo!? Check out the new Yahoo! Front Page. www.yahoo.com
--
-------------------------------------------------------------------------- Joel Jaeggli Unix Consulting joelja@xxxxxxxxxxxxxxxxxxxx GPG Key Fingerprint: 5C6E 0104 BAF0 40B0 5BD3 C38B F000 35AB B67F 56B2