Artificial intelligent assistant

How to retain retain et. al. in mail(x) When entering personal preferences like `retain me@example.com` inside command line `mail`, how can I have these saved so they are reloaded the next time I start `mail`?

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

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 10e0085bd1d80e29474ced5f48a01890