Bug 75598 - fetchmail fails to connect to mailserver
fetchmail fails to connect to mailserver
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: fetchmail (Show other bugs)
6.2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Miloslav Trmač
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-10-09 23:20 EDT by Martin Siegert
Modified: 2007-04-18 12:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-06-03 10:21:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Siegert 2002-10-09 23:20:17 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):


How reproducible:
Always

Steps to Reproduce:
1.use a .fetchmailrc file similar to

set logfile "/home/siegert/.maillog"
set postmaster "siegert"
set bouncemail
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

Additional info:

bug shows under RH 6.2 only

fetchmail-5.9.0-20 under RH7.3 using the same configuration files
works fine.
Comment 1 Alan Sundell 2002-12-30 23:09:31 EST
Martin:
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

to

simap           993/tcp      imaps              # IMAP over SSL
spop3           995/tcp      pop3s              # POP-3 over SSL



RedHat folks:
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
line 891].

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
version.

I prefer the latter, but what you do is up to you, of course.


Comment 2 Martin Siegert 2003-01-06 22:21:42 EST
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
same problem.
Comment 3 Miloslav Trmač 2005-06-03 10:21:05 EDT
I'm sorry about the late response.

/etc/services contains imaps and pop3 in recent releases.

Note You need to log in before you can comment on or make changes to this bug.