I am using mail from GNU Mailutils to read the contents of a Maildir. For emails that have already been marked as read, is there a way to mark them as unread in mail?

  • I have no idea how to do this in mailutils, but it's easy in mutt (which I strongly recommend as a text-mode mail client). Use wn to set the current message as New. Or tag a whole bunch of messages (e.g. T.<enter> to tag all messages, or Tfoo<enter> to tag all messages matching "foo" or T ~M 1-50 to tag msgs 1-50. Read the docs - there are lots of tagging and searching options) and set them all as unread with ;wn. ; applies the next command to all tagged messages, instead of the current message.
    – cas
    Oct 11, 2021 at 0:42

1 Answer 1



As of GNU Mailutils version 3.14 (released on 2022-01-02), GNU Mailutils implements the "unread" command. An email can be marked as unread by pressing U.

Old answer:

This feature is not mentioned in POSIX mailx, and is not implemented by GNU Mailutils' mailx. S-nail and the BSDs' mailx support an unread command to mark emails as unread. However, BSD implementations of mailx do not support the Maildir format, so the solution is to use S-nail, which supports the Maildir format. Alternatively, one could move away from mailx and switch to using a simple email client such as Mutt.

  • Update: the "unread" command was added to GNU Mailutils on 2021-11-13 (commit 805a3f8). It will appear in the next release (the release right after version 3.13).
    – Flux
    Nov 15, 2021 at 2:45

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.