How can i set a default account in Heirloom-mailx?
I have defined an account in /etc/nail.rc
that is usable via mail -A accountname
but i'd like to set this account to be used by default so i can omit the -A
parameter.
The man page under http://heirloom.sourceforge.net/mailx/mailx.1.html doesn't seem to include setting defaults.
Best Answer
If you want to maintain multiple accounts but select one by default, add an account command after the accounts are defined to select it
Example rc file:
Now on invoking mailx, it will connect to myimap, but you can still switch between the two accounts with
account local
andaccount myimap
(and whatever other accounts you define) in interactive mode, or pick which one usingmailx -A myimap
ormailx -A local
(and whatever other accounts) when invoking from the commandline.(tested with Heirloom mailx version 12.5 6/20/10)