Computing.Net > Forums > Programming > Procmail? Perl? parse emails

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Procmail? Perl? parse emails

Reply to Message Icon

Name: Dewed
Date: April 26, 2003 at 00:01:03 Pacific
OS: linux ensim
CPU/Ram: unsure
Comment:

Hopefully someone can steer me in the right direction here.

I'd like to extract information from emails,
on a virtual domain, running pop3/sendmail. It seems I need to do this before they are retreived by the client, since I have no clue how to parse them once their in Outlook

I have a few options, or combinations of solutions to work with. cron, bash, .forward/procmail, and of course perl.

Idealy, this routine would look at the incoming mail, if its a payment confirmation like paypal for example, extract the shipping address, buyer's name & email address, balance etc.. Write the shipping info to one file, write the buyer's name & email address to another file. Eventually this data will migrate to a MySQL db.

There's so many ways to do it. I fear I can't see the forest for the trees.

My options, as I see them.

#1 The .forward/procmail approach seems the most efficent to me, but also the most difficult. Complex regexes frighten and amaze me. Searching, I'm not finding info on using procmail for purposes other than spam blocking.

#2 .forward/perl.routine Writing this would still be a challenge for me, but at least familiar territory.

#3 Cron running every few minutes, calling perl routine to lock & parse whole mail spool. This seems more do-able to me, but dumb, compared to the previous choices. Also runs the risk of misbehaving due to bad timing.

Which would you do, and where would you look for info on doing such a thing? Any insights would be greatly apreciated.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Procmail? Perl? parse emails

Perl, parsing & regex www.computing.net/answers/programming/perl-parsing-amp-regex/15419.html

web page addition www.computing.net/answers/programming/web-page-addition/333.html

Javascript Menu - Call to PL/SQL www.computing.net/answers/programming/javascript-menu-call-to-plsql/9915.html