I need to read and parse my sendmail inbox and write the parsed data to a file then rename the inbox. I am open to other ideas on how to do this.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
need to read and parse my sendmail inbox and write the parsed data to a file then rename the inbox. I am open to other ideas on how to do this.
1 - cron will run perl script and parse email inbox
2 - write parsed data to a flat file(s).
Confirmation number, Flight number (number portion only)
First Name,Last Name,Flight Date, Flight Time.
file name = lastname_firstname_conf_flightdate_flighttime
3 - mv inbox to inbox_date_ran
Data will be similar to this.
----cut here------
******************** RECEIPT AND ITINERARY *********************
Beginning 24 hours prior to your scheduled departure, you may
check in online for your flight and print a boarding pass at
[login to view URL] by visiting:
<[login to view URL]>
Receipt and Itinerary as of 02/08/06 1:32PM
*********************************
* *
* Confirmation Number *
* ABC123 *
* *
*********************************
Confirmation Date: 02/08/06
CID: 12345678
Received: FNAME L
Passenger(s):
LASTNAME/FIRSTNAME 123-1234567890-1
Account Number: 00000012345678
Itinerary:
Thursday, February 09 - SAN JOSE CA(SJC) to BURBANK CA(BUR)
Flight 348 Y
Depart SAN JOSE CA(SJC) at 7:35PM and
Arrive in BURBANK CA(BUR) at 8:35PM
***************************** COST *****************************
stuff deleted
--cut here----
The Intinerary may also look like this in which case I need
2 flat files.
Itinerary:
Wednesday, November 23 - BURBANK CA(BUR) to PORTLAND OR(PDX)
Flight 1355 Y
Depart BURBANK CA(BUR) at 11:45AM and
Arrive in PORTLAND OR(PDX) at 02:55PM
Saturday, November 26 - PORTLAND OR(PDX) to BURBANK CA(BUR)
Flight 1301 Y
Depart PORTLAND OR(PDX) at 04:00PM and
Arrive in BURBANK CA(BUR) at 07:00PM
## Platform
linux, sendmail