Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Which split delimiter to use for mailbox
- Bart Van der Donck
March 13, 2008, 8:41 am
rate this thread
I'm reading an email inbox file in Perl like /usr/boxes/mydomain.com/
info. This file consists of 1 or more mails that are waiting to be
delivered. Which mechanism is safe enough to split this file in order
to know the number of waiting emails ?
The format looks like this:
From firstname.lastname@example.org Wed Mar 12 19:14:17 2008
From email@example.com Wed Mar 12 19:50:11 2008
From firstname.lastname@example.org Wed Mar 12 21:47:07 2008
I don't understand how Perl can split this input reliably, so that it
knows where a next mail starts. I mean, every message could also
contain blanc lines or "From email@example.com" itself.