Re: gmail socket error

Matthias Andree <[email protected]>
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
Am 14.02.21 um 02:25 schrieb Matthias Andree:
> Am 13.02.21 um 21:28 schrieb Joe Acquisto-j4:
>> Trying to regain ability to download gmail to my local cllient.
>>
>> Getting the following:
>>
>> --------------------
>> fetchmail: 6.4.2-rc3 querying imap.gmail.com (protocol IMAP) at Sat Feb 13 15:17:11 2021: poll started
>> Sat Feb 13 15:17:11 EST 2021
>> fetchmail: Trying to connect to 172.253.63.108/993...connected.
>> fetchmail: socket error while fetching from [email protected]@imap.gmail.com
>> fetchmail: 6.4.2-rc3 querying imap.gmail.com (protocol IMAP) at Sat Feb 13 15:17:21 2021: poll completed
>> fetchmail: Merged UID list from imap.gmail.com:
>>  <empty>
>> fetchmail: Query status=2 (SOCKET)
>> fetchmail: sleeping at Sat Feb 13 15:17:21 2021 for 120 seconds
>> ------------------
>>
>> Part of .fetchmalrc is below:
>> ------------------
>> # Configguration created Sat Feb  2 12:57:33 2008 by fetchmailconf 1.52 $Revision: 4740 $
>> set logfile "/var/log/fetchmail.log"
>> set postmaster "[email protected]"
>> set no bouncemail
>> set no spambounce
>> set properties ""
>> set daemon 120
>> . . . .
>>
>> poll imap.gmail.com with proto IMAP port 993
>>
>>  user '[email protected]' there with password 'sumwerd' is '[email protected]' here folder 'Inbox','Junk' fetchlimit 1 sslproto 'auto' sslcertck
>>    preconnect "/bin/date >> /var/log/fetchmail.log"
> You've confused fetchmail. You are *not* specifying the option "ssl" so
> the port would be 143 for proto IMAP - but then you are overriding the
> port to 993.
>
> That by itself won't work, fetchmail will try to query CAPABILITY then
> send STARTTLS via plaintext. Port 993 however is SSL-wrapped and talks
> SSL right away.
>
> So either you need to erase the "port 993", or you need to specify "ssl"
> in addition (in which case you could still omit the port 993 because it
> is the default value for proto imap combined with ssl).

Update: It appears Google, for imap.gmail.com, do not support STARTTLS,
so you need to add the ssl keyword, or --ssl on the command line, which
then renders the "port 993" unneeded as written above.

I also figured that (including recent versions) the timeout handling in
that situation skips to the next server and am not sure if that's the
right approach. A server might be multihomed and retrying another
address might then work, which fetchmail does not do, however on a
network blackhole, proceeding to the next server is the right approach
when fetchmail polls multiple servers.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.