Reading a specific email in Mutt is simple.

Just do

$ mutt

in the terminal. It opens and then directly from there you type the message ID from the message you want to read, followed by enter. Simple.

But I was still wondering if this could be done even more easily by doing everything in one command using certain parameters.


$ mutt -[parameter] [message ID]



You can call any function from the command line with the -e parameter. For example,

mutt -e "push 100\n\n"

will jump to, and show, the 100th message. The push command is emulates to keyboard input.

You can use a shell variable for the message number:

mutt -e "push ${MESSAGE_INDEX}\n\n"

Note that "message ID" is a unique field inside each email header, and not what you are referring to, which is the message index in the folder.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.