Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to configure fetchmail on my OSX 10.5.6 box. I've setup my .fetchmailrc as follows:

poll with proto IMAP 
timeout 30
user "username" is "username" here options ssl keep

I'm using a .netrc file to store my usernames/passwords as so:

login username
password secret

However, when I run fetchmail I get the following error:

reading message of 458 (4436 octets)
fetchmail: timeout after 30 seconds waiting for listener to respond.
fetchmail: socket error while fetching from and delivering to SMTP host localhost
fetchmail: Query status=2 (SOCKET)
fetchmail: Server certificate verification error: unable to get local issuer certificate
fetchmail: Server certificate verification error: certificate not trusted
fetchmail: Server certificate verification error: unable to verify the first certificate
fetchmail: Error exchanging credentials

It seems fetchmail can login OK but it fails to deliver anything to postfix (which I've verified is up and running by telnetting to localhost:25).

Next I invoked fetchmail with -vv flags to get some extra info about what is happening. I notice the following strange message:

Trying to connect to timeout after 5 seconds waiting for listener to respond.
fetchmail: 6.3.8 querying (protocol POP3) at Tue, 14 Jul 2009 18:20:09 +1000 (EST): poll completed
fetchmail: discarding new UID list
fetchmail: Query status=2 (SOCKET)

That IP address is very strange. Shouldn't fetchmail only be trying to connect to localhost for message delivery? A quick nslookup reveals the target host domain is one wtf?

This is all with out-of-the-box fetchmail install btw -- it's a brand new iMac! Does anyone have an idea what could be happening or what I'm doing wrong?

share|improve this question
ping? Curious if adding smtpaddress helped? – derobert Jul 17 '09 at 4:00

Add the option: smtphost localhost or even smtphost to tell it to deliver to localhost. I have no idea why it is defaulting to something else (is that your entire fetchmail config?).

Actually, that may be it attempting to use ETRN or something; that IP resolves to is that your mail server?

Also, you may need the sslcommonname or sslfingerprint option if the certificate is either self-signed or doesn't match the hostname.

share|improve this answer
Hi derobert, Thanks for your reply. Yes, that is my whole config file and no, I have no idea where the IP address comes from. I have no mail server on; I just want to redirect to localhost. I've tried setting smtphost localhost, but the problem persists. – Daniel Jul 15 '09 at 7:39
I should add: if I add "smtphost" my postfix bounces the forwarded messages with fetchmail: SMTP< 401 4.1.3 Bad recipient address syntax Do I need to reconfigure postfix somehow? – Daniel Jul 15 '09 at 7:45
Nah, you shouldn't need to reconfigure postfix. Try adding in a smtpaddress <<your-hostname>> to your fetchmail config. Make sure it is something postfix will recognize as local (so it won't attempt a remote delivery) – derobert Jul 15 '09 at 18:08
... or even smtpname to specify the full address. – derobert Jul 15 '09 at 18:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.