Using the Address Book#
This tutorial walks you through creating a simple address book, adding a contact, and using it to send an email. By the end you will have a working alias file that NeoMutt loads automatically.
If you havenβt configured NeoMutt yet, start with Writing Your First Configuration.
Choose Where to Store Aliases#
Add these lines to your
neomuttrc:
set alias_file = "~/.config/neomutt/aliases"
source ~/.config/neomutt/aliases
alias_file tells NeoMutt where to save new aliases created interactively.
The source line loads existing aliases when NeoMutt starts.
Create the file so NeoMutt can source it without error:
touch ~/.config/neomutt/aliases
Add Your First Contact#
Open
~/.config/neomutt/aliasesin your editor and add a line:
alias alice Alice Example <alice@example.com>
The format is: alias shortname Real Name <email@address>.
Save the file.
Load the Alias File#
Start NeoMutt (or, if already running, reload with
:source ~/.config/neomutt/aliases).
Expected result: NeoMutt loads without errors.
Open the Address Book#
At any address prompt (e.g. after pressing m to compose), press <Tab> with an empty field.
Expected result: the alias menu appears showing your alice entry.
Select the alias and press <Enter>.
Expected result: NeoMutt inserts Alice Example <alice@example.com> into the address field.
Send a Message Using an Alias#
Press m to compose a new message.
At the
To:prompt, typealiceand press <Tab>.
Expected result: NeoMutt expands the alias to the full address.
Enter a subject, write a message, and send.
Expected result: the message is addressed to alice@example.com.
Save a Contact from a Received Message#
Open a message in the index or pager.
Press a (the default binding for
<create-alias>).NeoMutt prompts you to confirm or edit the alias name.
Expected result: a new alias line is appended to $alias_file.
Reload the file so the new alias is available immediately:
:source ~/.config/neomutt/aliases
Add More Contacts#
Open your alias file and add more entries:
alias bob Bob Builder <bob@example.com>
alias team alice, bob
The last line creates a group alias that expands to multiple addresses.
Reload with
:sourceor restart NeoMutt.
Expected result: typing team at an address prompt expands to both Alice and Bob.
Next Steps#
βI want to customise the alias display.β See Customise Alias Display.
βI want to split contacts into multiple files.β See Use Multiple Alias Files.
βI want to search my contacts faster.β See Find a Contact Quickly.
βI want to use an external address book.β See Set Up Address Book Integration and External Address Queries.