Get started with Mutt
Mutt is a text-based mail client along the lines of Pine or Elm. It’s known for being a fast and highly configurable mail client, and since it is text-based, it’s ideal for checking email quickly over SSH (Secure Shell). Click through to learn exactly how to use it…
10. Aliases and mailing lists
One of the most useful features in Mutt is the alias support. It can be quite hard to remember the email addresses you write mails to. Using aliases, you can make this bit a breeze. You can instruct Mutt to set a word as an alias for an email address. Open the configuration file .muttrc and enter the following line:
alias stewie stewieg@griffin.com (Stewie Griffin)
Save the file and exit your editor. Next time you compose a mail, you can just type ‘stewie’ instead of his email address and Mutt will replace it with the address.
11. Attachments
A great feature of Mutt is that, despite being a command-line mail client, it has full support for attachments. To get this feature going, hit the M key to compose a new mail, as usual. Fill out the email address, the subject and the body of the message. However, when you get to the last screen, don’t hit Y to send the mail. On this screen you’ll notice an option to attach files to your mail. Hit A on your keyboard and you’ll see a new line pop up at the bottom, asking for attachment info. You can either fill in the path of the file you want to attach or you can hit the ‘?’ key to navigate through your file system and pick which file you want to attach to the mail. Hit Y to then send it.
12. Using Mutt from shell scripts
If you write or use shell scripts, you might find Mutt pretty useful to mail out reports. Mutt can be used to mail text, and also to send attachments. To send a mail from the command line, run a command like this:
# mutt -s “Test mail” stewieg@griffin.com < /tmp/message.txt
In this example, the contents of the file /tmp/message.txt form the body of the mail. Attaching a file to this mail requires a simple modification. Use the ‘-a’ parameter for that.
# mutt -s “Test mail” -a /home/stewie/brian.zip stewieg@griffin.com < /tmp/message.txt
13. Conclusion
You should now know how to use Mutt. You will realise over time just how powerful this mail client is, despite its seeming simplicity. There are many more configuration parameters and tricks you can find on the internet that are beyond the scope of this article. If you do decide to move from another mail client to Mutt, you are in for a very interesting ride. Good luck, and do write to us if you come across any cool Mutt-related tips.
This article originally appeared in issue 83 of Linux User & Developer. Click here to see more tutorials from the magazine.

















I must say, that this is a good article.
I’m using Mutt now for longer time, but still think your article is very beginner-friendly.
Will you think about an article like “Mutt Advanced” or “Mutt Magic”, showing us some more sophisticated stuff?
Keep up the great work.
Trackbacks
What's your opinion?