There is no direct way to save the current settings. Instead, you have to write the desired settings to the user startup file, `~/.mailrc`.
This is referenced in the manual page for `mailx` (see `man mailx`), which says,
> At startup time, `mail` will execute commands in the system command file, `/etc/mail.rc`, unless explicitly told not to by using the `-n` option. Next, the commands in the user's personal command file `~/.mailrc` are executed. `mail` then examines its command line options [...]
Here is an example, taken straight from `/etc/mail.rc` on my (Debian) system. As you can see the syntax is identical to that used on the command line:
set ask askcc append dot save crt
ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To