Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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 OutlookI 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.

![]() |
![]() |
![]() |

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