Linux Server Diary

The trials and tribulations of a Linux newbie trying to setup a home server.

Friday, December 31, 2004

New Domain - Time for Fetchmail and IMAP

I registered for a new domain the other day. I had been using a .name domain, but Network Solutions can't seem to get its service act together. I'm tired of waiting on them to provide POP access to my mail.

So with the new domain comes a new email store. I figured that rather than setup the account on the current IMAP server (that I hope to soon retire), I would just fire up fetchmail on the new box and access via IMAP.

IMAP was the easy part. I modified the file /etc/xinetd.d/imap and changed disabled = yes to disabled = no, and restarted xinetd using service xinetd restart. I started Thunderbird on my desktop and configured the new server without incident.

Next, I setup my fetchmail configuration account. After going through all kinds of heartache earlier, I knew that .fetchmailrc should be located in /root. I setup the account with the new domain. Also, I added my gmail account. I had configured POP access last month, but haven't ever tried it out. This page shows a sample fetchmail configuration for gmail. I didn't use the uidl and fetchall options. They don't seem to be required for this setup. We'll see. Here's my config:

poll pop.gmail.com protocol POP3 port 995 user ‘xxx@gmail.com‘ password ‘xxx‘ is ‘xxx‘ here ssl


So next, I started fetchmail in root as a daemon process that should run every 15 minutes:

fetchmail -d 900

Unfortunately, I can't find fetchmail running as a service. However, when I tried to start it again, I was told that it was already running as a background. I told it to quit:

fetchmail -q

I checked, and the fetchmail-daemon package is installed.

A little more research (by looking at the server where fetchmail works), and I see that I forgot to setup /etc/fetchmailrc/. It includes the line set daemon = 900. After adding this and restarting, fetchmail shows up as a service.

Changing gears, I tried running fetchmail without the daemon mode - just to see if the configuration was working.

fetchmail -v

runs it in verbose mode, so that I can see the commands and results. I was able to connect to both servers (although gmail shows 13 messages where I only see two). However, no mail was transferred and the error SMTP connect to localhost failed was returned. Does this mean that I'm not running a mail program?

More tomorrow...

0 Comments:

Post a Comment

<< Home