If you type q at the mailx prompt and then press Return,
you will then see a message similar to the following:
Saved one message in home_directory/mbox.
where home_directory is the path name to your home directory.
When you use q to quit mailx after reading messages, mailx moves the letters from your mailbox and saves them in the mbox file in your home directory. mailx also saves any changes or deletions you've made.