1

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?

1
  • 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
    Commented Oct 11, 2021 at 0:42

1 Answer 1

0

Update:

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.

1
  • 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
    Commented Nov 15, 2021 at 2:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .