Red Hat Bugzilla – Bug 75598
fetchmail fails to connect to mailserver
Last modified: 2007-04-18 12:47:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021007
Description of problem:
After upgrading to fetchmail-5.9.0-18 fetchmail is unable to connect
to the mailserver using IMAP/SSL. The .maillog file contains the lines:
fetchmail: starting fetchmail 5.9.0 daemon
fetchmail: 5.9.0 querying imap.sfu.ca (protocol IMAP) at Wed 09 Oct 2002
10:35:24 AM PDT
fetchmail: fetchmail: getaddrinfo(imap.sfu.ca.imaps)
fetchmail: Query status=2 (SOCKET)
fetchmail: fetchmail: sleeping at Wed 09 Oct 2002 10:35:24 AM PDT
indicating that fetchmail fails to open a socket. tcpdump shows that
not a single packet is sent.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1.use a .fetchmailrc file similar to
set logfile "/home/siegert/.maillog"
set postmaster "siegert"
set no spambounce
set properties ""
set daemon 300
poll my.mail.ca with proto IMAP
user 'siegert' there is 'siegert' here options ssl
mda '/usr/bin/procmail -d %T'
2. run "tcpdump -i eth0 my.mail.ca"
3. start fetchmail, enter password.
Actual Results: absolutely nothing, other than that the error
Query status=2 (SOCKET)
fetchmail: sleeping at Wed 09 Oct 2002 06:07:31 PM PDT
is added to .maillog
Expected Results: - tcpdump should report traffic
- fetchmail should retrieve mail
bug shows under RH 6.2 only
fetchmail-5.9.0-20 under RH7.3 using the same configuration files
You can work around this by adding an entry for "imaps" to the line for port
993 /etc/services (at about line 268).
IOW, change these two lines:
simap 993/tcp # IMAP over SSL
spop3 995/tcp # POP-3 over SSL
simap 993/tcp imaps # IMAP over SSL
spop3 995/tcp pop3s # POP-3 over SSL
This effects both IMAP and POP over SSL. The problem has recently shown itself
because fetchmail-5.9.0 is now being compiled with IPv6 support for some reason.
Compare the first line of fetchmail -V from the old and the new version:
This is fetchmail release 5.3.1+IMAP-GSS
This is fetchmail release 5.9.0+IMAP-GSS+NTLM+SSL+INET6+NLS
When INET6_ENABLE is defined, fetchmail tries to connect to the server by its
service name ("imaps" or "pop3s"). When INET6_ENABLE is not defined, it
connects by a hard-coded port number (993 or 995). [See fetchmail-5.9.0/imap.c
Unfortunately, setup-2.1.8 does not have entries for "imaps" or "pop3s", but
rather "simap" and "spop3". [See setup-2.1.8/services line 268]. Maybe this
bug should be assigned to "setup", since "imaps" and "pop3s" are really the
proper names for those services [see RFC 2595], but that's not my business.
I can think of two "proper" solutions to this problem, which I humbly suggest here:
1) Don't compile fetchmail with IPv6 support
2) Update setup to include "imaps" and "pop3s" names (which are more widely
used, anyway) and release a new fetchmail version which depends on this setup
I prefer the latter, but what you do is up to you, of course.
Thanks Alan. Those changes to /etc/services indeed fix the problem.
It would be desirable if this is mentioned when a new errata comes out.
fetchmail-5.9.0-21.6.2 was released just recently and still has the
I'm sorry about the late response.
/etc/services contains imaps and pop3 in recent releases.