Re: Extract last email from an email file (mbox format)

"John Levine" <[email protected]> 27 May 2016 00:23:22 -0000
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
>I do not want to process all the emails. I still wonder if I can just
>process the last without going through every single one before the
>last. The tac solutions above or tail solutions are more efficient but
>the formail is more safe. ...

No, it's not.  They'll both find the same message boundaries.

Searching for '^From ' (which is not the same as From:) is how formail
and every other mbox processing program finds message boundaries.  It's
what the boundaries are.  Either the "tac" script or the similar tail -r
script I sent will work fine.

R's,
John