| Home » E-mail » Fetchmail |
Fetchmail
This document provides a short how-to on using fetchmail to check your AT&T Worldnet Service e-mail while not dialed in to AT&T Worldnet Service. These instructions use common tools for Linux available for free on the Internet.
- Background
- Enable Internet access to your mail
- Install OpenSSL
- Install fetchmail
- Configure your .fetchmailrc file
- Test out your configuration
Submitted by: Carl Tucker
Note: You will need to find your AT&T Worldnet Service account information.
Background
AT&T Worldnet Service uses firewall software that normally requires the user to be connected to an AT&T Worldnet Service dialup before allowing access to mail and news servers. This means that without some extra configuration, you will not be able to check your e-mail on AT&T Worldnet Service while connected to another ISP.
To remedy this, AT&T Worldnet Service has provided an additional server that accepts SSL encrypted connections from any host on the Internet. This document should help you configure your Linux machine to use this mail server to check your mail.
My machine is a mostly stock SuSE 6.4 Linux distribution, with the kernel upgraded to 2.4.2, but this procedure should work for any distribution and kernel (within reason.) Any additional software needed for this configuration will be mentioned as we go along.
Your machine will have to be running some sort of Mail Transfer Application (MTA). Most distributions I know of come with the popular MTA called sendmail. Most even enable it by default. Other popular MTAs include smail and qmail. Any of them will work, but you have to have one of them, because fetchmail remails the messages it gets from the server to you on your own machine. I won't go into installing sendmail.
These instructions will occasionally require you to be the root user on your system. If you are a user on someone else's system, please ask them to follow this procedure. It's not a good idea for two people to be mucking around with software configurations on a machine.
Let's begin...
To install OpenSSL:
To initiate a SSL encrypted connection to AT&T Worldnet Service, you're going to need the OpenSSL package. To check if you already have it, type the following at the shell prompt:
$ openssl version
OpenSSL 0.9.6a 5 Apr 2001
If OpenSSL is already installed, it will tell you what version it is, as above. Obviously, if you already have it, skip this part.
You can get the source package of OpenSSL from http://www.openssl.org. Download it, and move it into a directory under your home directory. I like to do this in ~/src, but it's up to you.
Now, unzip and untar the source. This can be done by entering the following command in the directory where your file is:
$ tar zxvf openssl-0.9.6a.tar.gz
Note: The part after zxvf is the name of the file. You should now see the tar file uncompress itself and make a new directory under the current one with all the source files in it.
Now, cd into the new directory. Configure the installation by typing the following at the prompt:
$ ./config --prefix=/usr/local
The --prefix part tells configure that you want all the OpenSSL files installed in /usr/local/bin, /usr/local/lib, and so on. I recommend this, as the default puts them in an odd place, in my opinion.
You should now see a bunch of messages go by as your system is checked for compiler commands and other miscellaneous things it needs.
To build the package, at the prompt, type:
$ make
This will take a few minutes and spit out a bunch of compiler output to your screen. After that's over, become root and install the package:
$ su
Password: [enter your root password]
# make install
This will install the package on your system.
If no problems are encountered building OpenSSL, go on to the next step.
To install fetchmail:
Now we're cooking. In this section we'll get and install the fetchmail package. If you already have fetchmail, and it works on non-SSL encrypted servers, go ahead and skip up to the next section. You may be back, though, since fetchmail doesn't automatically include SSL capability, and you may have to rebuild it. Also, many Linux distributions ship with fetchmail, but it's an old fetchmail. So before you skip this section, do this:
$ fetchmail --version
This is fetchmail release 5.8.0+SSL+NLS
...
The first line in the output of my machine shows I have fetchmail version 5.8.0. Note also the "+SSL". That means SSL is compiled in. You need that.
So let's install fetchmail. This section is going to look a lot like the last one. The first step is again to get a copy of the fetchmail source. You can get it from http://www.tuxedo.org/~esr/fetchmail. If you like, you can go for the latest "leading edge" version. I went for the "gold" version, which is just the last version with most of the bugs ironed out. It may not have some brand new feature, but those brand new features may be buggy. It's up to you, both work. I have version 5.8.0, and it works fine.
As in the previous section, move your downloaded file into the directory you want the source to be located under (I use ~/src) and unzip and untar it. Move into the new directory created.
Again we're going to do the configure/make/make install procedure. Only when you configure, you have to include the --with-ssl=DIR option. Like so:
$ ./configure --with-ssl=/usr/local/include/openssl
If you configured OpenSSL like I said, that path is correct. Otherwise, you're going to have to know where the OpenSSL include files are (you might try /usr/local/ssl/include/openssl for the default installation.)
This command will produce a lot of configuration output. This may end in a screenful of warnings about not being able to find include files. Ignore them. No, Really. Scroll up, the output itself tells you you can ignore them.
Now we're ready to make and install. At the prompt, type:
$ make
[lots of compiler output]
$ su
Password:
# make install
[more compiler output]
This should build and install your fetchmail.
On to the next section.
To configure your .fetchmailrc file:
You could run fetchmail from the command line at this point, but you'd have to type in all the required options (man fetchmail for details.) Let's do it the easier way, and make a fetchmail configuration file.
Change to your home directory. Now create a file called .fetchmailrc (with the leading dot.) This is going to be a simple text file that fetchmail reads whenever you run it.
In this file, put the following lines:
poll ipostoffice.worldnet.att.net with proto POP3
user "emailid@worldnet.att.net"
pass "my_password"
ssl
is my_local_username here
Replace emailid@worldnet.att.net with your e-mail address on AT&T Worldnet Service. Also replace my_password with your e-mail password, and my_local_username with your login name on your Linux machine.
Save that file, and you're ready to test your configuration.
To test your configuration:
To run fetchmail using your .fetchmailrc file we created in the last section, simply type:
$ fetchmail
1 message for aaaaa@worldnet.att.net at ipostoffice.worldnet.att.net
(3419 octets).
reading message 1 of 1 (3419 octets) flushed
The output shown is from my computer. I had one message waiting, and fetchmail got it.
If you had mail, all you have to do is read mail normally with whatever mail reader software you have. For instance, pine. The mail will be in your mailbox.
Need Additional Help?
If you can't find the answers you need, please try:
- The help file for the application you are using.
- Our FAQs.
- The AT&T Worldnet Help Newsgroups.
