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