Search in mutt by date and time
I’ve been using mutt
for some days now, and I think I have the basics by now.
I’m able to search messages by date (l
, ~d date ...
) but what I need is to also search by time.
Is it even possible?
It is not possible without patching mutt
, however you could limit to:
~d <1d ~h '^Date:.*(1[3-9]|2.):..:'
To list the emails that have been sent today after 13:00 (in their own timezone).
To check the date in your timezone, you may be able to rely on the fact that there should be a Received
header added by a MTA in your timezone (especially if it goes through a MTA on your machine). Then you could do:
~r <1d ~h '^Received:.*(1[3-9]|2.):..:.. +0100'
(+0100
is the time zone offset where I live (+0000
in winter), it may be different for you).
You can also do the selection manually:
- sort by sent or received date
- note the first (
x
) and last (y
) message you wish to see. - limit using
~m x-y