Joel Feinstein's experiences with fetchmail

Joel Feinstein's experiences with fetchmail

I have created this page because of the difficulty I found in understanding how to set up ESR's excellent program fetchmail under linux to collect email from a pop3 email account and then deliver it to another of my email addresses. This is in spite of the existence of plenty of discussion of fetchmail online, as well as the manual pages and FAQ.

This page is intended for a linux user who, like me, is unfamiliar with some of the terminology, and simply wants to find a quick way to get fetchmail to automatically collect and forward mail between two email accounts, neither of which is local to the linux machine being used. If you have comments or corrections that would help clarify this page further, please feel free to email me.

The idea is very simple. When you type the command fetchmail, information in a file called (by default) .fetchmailrc in your home directory tells fetchmail exactly what to do. You can put the details for multiple accounts in this file.

I used google to find plenty of examples of .fetchmailrc files on the web, but could not understand whether or not they would do what I wanted. I also tried reading the manual pages and the FAQ, but was not sure that I understood the terminology used.

I tried various things that seemed plausible, and eventually one of them worked. Obviously I can't give you my actual passwords, but otherwise here is the .fetchmailrc file I used.

set postmaster "jff"
set bouncemail
set daemon 300

poll pop.compuserve.com
        proto pop3
        user 'abcghjkmn'
        password 'zyxfnbwuv'
        smtpname 'Joel@feinst.demon.co.uk'
        fetchall

What does all this mean? First the global options set at the top. I believe that the postmaster is where error messages are sent if all else fails and the bouncemail option means that undeliverable messages will be returned to sender. The 'set daemon 300' option means that fetchmail will run in daemon mode (in the background), and check for mail every 300 seconds.

The rest is fairly straightforward: check for pop3 email on the host pop.compuserve.com, with the specified username and password. Mail is then delivered to Joel@feinst.demon.co.uk.

What was my problem? I could not find any examples which used and explained the use of the option smtpname. I believed that this was intended as a cosmetic change in the mail headers to show the route mail had taken. (Even when I did try it, I thought it was wrong because of an unfortunate delay before the mail arrived.)

Now that I've got it working for me, I'm hoping that this page will save others from wasting the same amount of time that I did!

For more information, see The fetchmail home page, and in particular the online manual and the fetchmail FAQ


Web page maintained by Joel Feinstein, email address Joel@feinst.demon.co.uk

The following links take you to the various sets of web pages that I have a connection with.

My work home pageUniversity of Nottingham, School of Mathematical Sciences
My home home pageOn this server
Maths BooksMy recommended maths books, in association with Amazon.co.uk
Phone rate surveyUnbelievably cheap international phone calls
My Othello pagesThe board game
My experiences with fetchmailUsing fetchmail under linux to forward mail between two other email accounts
Looking UpMonthly international autism newsletter
Elaine FeinsteinPoet, novelist and biographer.
The Feinstein Home PageElaine, Adam Martin and Joel