The Raspberry Pi Superuser

Setting up your email.


In the last segment, we installed and configured sshd, telnetd, micro_httpd, and telnet, to turn your Raspberry Pi into a server, ready for almost anything. In this segment, we'll be installing mutt, a terminal email client. Why the terminal? Because it's lightweight, and much faster than any GUI mail program on the Pi.

Let's get started.

Installing mutt

This is, perhaps, the most simple step of the whole process. As with setting up applications last time, installing mutt is only a few keystrokes away. First, open an LXTerminal, then type the following lines.

sudo -s
apt-get install mutt

Easy, huh? Debian has made the installation of applications very easy with the apt-get install command, so there's no compiling or installing work for us.

Of course, we're not done yet. There's plenty of configuring to do to get mutt to accept your email address and information.

Configuring mutt

Now, the fun begins. Mutt is a very powerful client with lots of options, but it's not very self-explanatory. There are quite a few tutorials out there on the web, but a lot of them are much too difficult for the average user, and even the new superuser. But, don't fret. Keep reading, and we'll get you up and running.

First things first. Click here to download a mutt configuration file from lifehacker. It the file doesn't automatically download, then just copy and paste it into leafpad. Now, make sure to save the file in /home/pi as .muttrc (this is crucial.) Now, click the "start"-looking button at the bottom-left of your screen and click run. In the box that appears, type this.

leafpad /home/pi/.muttrc

And there's your configuration file. We highly recommend that you either use an existing gmail account, or create a new one, for this exercise. In the case you want to use another email, you're going to have to contact your email provider and ask them for the information in that .muttrc file. If your using gmail, just edit the first few lines of the .muttrc file to reflect your email information. You don't have to enter your password into the file, and if you don't want to just leave the password field blank.

When you're done making your changes, just click File, then click Save. Now, you should be ready to use mutt. Open an LXTerminal, and type the following.


If you didn't enter a password, then you'll be prompted for one. Just type your password in, then hit enter. Mutt will work for a while to download and sort your inbox, and then you'll be ready to go. Use the arrow keys to navigate, and enter to view a message. When you're done, hit Ctrl-C, and type y to exit.

A little bit of fun

Having trouble getting sound to play on your Pi? We were too. Here's the solution. Open an LXTerminal, and type the following lines.

sudo -s
apt-get install mpg123

Now, click here to download a test MP3 file. Make sure to save it in /home/pi, then open an LXTerminal window and type the following.

/usr/bin/mpg123 /home/pi/derezzed.mp3

Plug your headphones into the headphone jack on your Pi, and there you go! Just change the second part of the above line to the filename of any MP3 on your Pi and mpg123 will play it.

Copyright © Computer Sciences Club 2013