2.10 Mail Aliases

The message-mail-alias-type variable controls what type of mail alias expansion to use. Currently two forms are supported: mailabbrev and ecomplete. If this variable is nil, no mail alias expansion will be performed.

mailabbrev works by parsing the /etc/mailrc and ~/.mailrc files. These files look like:

alias lmi "Lars Magne Ingebrigtsen <larsi@ifi.uio.no>"
alias ding "ding@ifi.uio.no (ding mailing list)"

After adding lines like this to your ~/.mailrc file, you should be able to just write ‘lmi’ in the To or CC (and so on) headers and press SPC to expand the alias.

No expansion will be performed upon sending of the message—all expansions have to be done explicitly.

If you’re using ecomplete, all addresses from To and CC headers will automatically be put into the ~/.ecompleterc file. When you enter text in the To and CC headers, ecomplete will check out the values stored there and “electrically” say what completions are possible. To choose one of these completions, use the M-n command to move down to the list. Use DOWN or M-n and UP or M-p to move down and up the list, and RET to choose a completion.

The ecomplete-sort-predicate variable controls how ecomplete matches are sorted.