Exiting mail and saving changes

Use the q subcommand to exit mail and save changes.

If you are exiting the system mailbox:

Item Description
q The q subcommand leaves the system mailbox and returns to the operating system. When you leave the mailbox, all messages marked to be deleted are removed from the mailbox and cannot be recovered. The mail program saves the messages you read in your personal mailbox (mbox). If you did not read any of your mail, the messages remain in the system mailbox until acted upon.

If you are exiting your personal mailbox or a mail folder:

Item Description
q When using the q subcommand in your personal mailbox or a mail folder, messages read and not read will remain in your personal mailbox or in a mail folder until acted upon.