procmail
[Top] [All Lists]

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

2016-05-29 22:14:16
On Sun, May 29, 2016 at 8:59 PM, @lbutlr <kremels(_at_)kreme(_dot_)com> wrote:
On Sun May 29 2016 14:11:24 Xu Wang     <xuwang762(_at_)gmail(_dot_)com> said:

3.   It is fast.

Unfortunately not for me.

time formail  -s  tee oneMessageOnly < theBigBox

real 0m24.019s
user 0m3.376s
sys 0m4.484s

As mentioned, my file is huge:
$ wc -l theBigBox
2171183 theBigBox

Well, 24 seconds to process 2 million lines of largely unstructured text is 
pretty fast. You could make it faster with a faster disk, of course.

The REAL solution is not to have an mbox file with over 2 million lines.

I do not want to process 2 million lines (by the way I think most of
these occur because of large attachments). I just want to process the
last hundred or so, which is not so crazy. The tac solutions take this
approach.


There is *no* reason to use mbox over maildir. It is inefficient and fragile.

Well, I believe there is a simple reason: the mutt default is to have
~/sent use mbox. And I want to write a script for general users. When
producing software for others, it is best not to make choices for
them. Otherwise you become Apple (I have no problem with Apple, many
people prefer to have choices made for them. But I do not.).

Thank you for your help and time. I do appreciate.

Kind regards,

Xu
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail