I would like to get the last email of an email file.
I found question that splits emails: How to split mailbox into single file per message?
But I would like something more efficient.
Ideally, I would like to get the message id of the last email. For one email, one can simply do:
formail -czxMessage-ID:
You can do it like this:
This is probably not very efficient. However, more efficient methods are likely to be a lot more complicated.