October 13th, 2004, 08:33 AM
Basics for using Mutt as your E-Mail client
Using Mutt for your E-Mail client
Written by : gore
Mutt is an E-Mail client for UNIX based OSs that most come with by default. It's a very good E-Mail client, which is text only, meaning it's fast, stable, and you don't have too worry about most viruses, and spyware isn't going to bug you either.
It is however a little hard to learn at first, so this will hopefully teach you what I've learned in the last week. Which is a lot.
I'll show some of my Muttrc file off so you can get a better idea for it too.
I'm going to say use Free BSD or Linux for this, because I have no idea how the Windows port works, and really don't want too. First, you should try and make sure you have mail. If you want, you can grab the E-Mail from your ISP by typing this:
fetchmail -p pop3 mail.ispserver.net -u YourUsername
Replace ispserver with your ISP's Mail server address. Make YourUsername whatever your log in account is.
If you use Comcast for example, in this example, say your E-Mail addy is email@example.com, you would type:
fetchmail -p pop3 mail.comcast.net -u somedude
It will ask you for the password, and you then type it and hit Enter. It will check your Email and say if you have any.
Now Open Mutt too read it"
If you're in runlevel 3, just type mutt.
If you're in X, open a Terminal, or Konsole, do the same.
Now it will ask to create a folder for Mutt's Mail, just press y
If it doesn't ask and goes straight to your E-Mail, then awesome.
Now you're probably wondering what too do next. Well, you can use the up and down arrow keys to go through your E-Mail, and hit Enter to open it up and read. Now before you can reply, you do have to do some configuration. You may also want too have colors, so I'll show you that too.
Now, the first thing you might want too do is send an Email, so hit m and then type the address in. Press Enter, and then fill in the rest of the information, and then, you are taken to Vim, which is the editor. Press i and you can type without it beeping at you.
When you finish writing your E-Mail out, hit Esc then type this:
Then Hit Enter. and that will take you too another screen. Press y
The mail sends and you're done.
If you want too reply to mail, just hit r and you do the same basic things.
Now, Mutt isn't the easiest thing in the World to configure, so I'm going to copy a part of my Muttrc file from /etc
I'm adding such a big chunk of it, because telling you "It's on line 89,000 part 3" is jsut going to cause problems (It's a huge file).
So I copied and pasted part of My configuration file so you can see what too edit, and edit it. The rest, well, don't play unless you're sure of what you're doing. And if you are there really is no reason for you too be reading this, so just don't touch untill you've read some manuals on Mutt.
That has all you will need real;ly, and whatever you can't find there, just open Mutt, and hit ? and you'll be taken to the help.
I trimmed this down and took a lot out because it's WAY too long to post, but when you edit it, you have to add the line
color normal brightred black
Too get color, it's not there by default, unless you're a wuss using RedHat. You can of course pick other colors, and other options other than normal, which you can find a list of on the Mutt WebPage.
Now scroll down, and when you see where there are no comments, I have placed that in here too.
This has to be set for you to send E-Mail from comcast as firstname.lastname@example.org
Just add this too your configuration when you see it after scrolling down for a year, heh.
This part: set email@example.com you have too add by hand as it's not in there either by default, so just set that, and you're done. This will allow you to send mail, and fetchmail to get the Mail. Now, if you want, you can configure Mutt too do whatever you want, so read up and enjoy.
# System configuration file for Mutt
# This is the configuration for colors. You can pick your own colors if you want of course.
color normal brightred black
# default list of header fields to weed when displaying
ignore "from " received content- mime-version status x-status message-id
ignore sender references return-path lines
# imitate the old search-body function
macro index \eb '/~b ' 'search in message bodies'
# simulate the old url menu
macro index \cb |urlview\n 'call urlview to extract URLs out of a message'
macro pager \cb |urlview\n 'call urlview to extract URLs out of a message'
# Show documentation when pressing F1
macro generic <f1> "!/usr/bin/less /usr/share/doc/packages/mutt/manual.txt.gz\n" "Show Mutt documentation"
macro index <f1> "!/usr/bin/less /usr/share/doc/packages/mutt/manual.txt.gz\n" "Show Mutt documentation"
macro pager <f1> "!/usr/bin/less /usr/share/doc/packages/mutt/manual.txt.gz\n" "Show Mutt documentation"
# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here.
# set hostname=cs.hmc.edu
# If your sendmail supports the -B8BITMIME flag, enable the following
# set use_8bitmime
## More settings
# Name: envelope_from
# Type: boolean
# Default: no
# When set, mutt will try to derive the message's envelope
# sender from the "From:" header. Note that this information is passed
# to sendmail command using the "-f" command line switch, so don't set this
# option if you are using that switch in $sendmail yourself,
# or if the sendmail on your machine doesn't support that command
# line switch.
The configuration is huge heh.
Now, after you have this done, cd to your home directory, and cd .mutt
When you get in there, type
This is your own personal muttrc file for you alone.
Something you might want too add if you belong to a mailing list is this:
subscribe SUSE-List-E SUSE <firstname.lastname@example.org
set editor="vim -c 'set tw=75'"
Adding this will Make it word wrap at 75 chars. The other will allow you to press L and reply to the SUSE Linux English list without typing the address every time.
Assuming you are a part of this list of course
Anyway, this isn't meant too be sonme huge book on Mutt, I got you through some basics, and now you're on your own to explore and enjoy Mutt.
If you get tired of typing out everything for Fetchmail, you can do this:
1# Fetch mail for gore
2 poll mail.comcast.net protocol pop3 user goresemailaddy there
3 with password "whatevermypasswordis" is gore here
Since your password will be in the clear on this file, do this too:
chmod 600 /etc/fetchmailrc
And now you can do this too check your email:
fetchmail -f /etc/fetchmailrc
It will grab your E-Mail, and you can then use Mutt to read it.