I'm trying to setup fetchmail for download some mail from gmail using pop3. The problem, as you can see, is that fetchmail instead of use the pop protocol will use imap.
For being sure to not have commit any error during the configuration i will summarize the procedure:
I edited the file called "fetchmail" in the folder /etc/default and set the variable demon to "yes";
Now I created the configuration file "fetchmailrc" in the folder /etc. In this one I wrote:
set postmaster "root"
set daemon 600
poll pop.gmail.com with proto POP3
user '[email protected]' there with password 'secretPWD' is root here options ssl
And then i proceed with a test for see if it works using the command:"fetchmail -d0 -vk pop.gmail.com". The response of the command is as follows:
fetchmail: 6.4.2 querying pop.gmail.com (protocol auto) at Mon Jul 12 12:43:41 2021: poll started
fetchmail: 6.4.2 querying pop.gmail.com (protocol IMAP) at Mon Jul 12 12:43:41 2021: poll started
Trying to connect to 173.194.69.109/143...connection failed.
fetchmail: connection to pop.gmail.com:imap [173.194.69.109/143] failed: Connection timed out.
Trying to connect to 173.194.69.108/143...connection failed.
fetchmail: connection to pop.gmail.com:imap [173.194.69.108/143] failed: Connection timed out.
Trying to connect to 2a00:1450:4013:c00::6c/143...connection failed.
fetchmail: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6c/143] failed: Network is unreachable.
Trying to connect to 2a00:1450:4013:c00::6d/143...connection failed.
fetchmail: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6d/143] failed: Network is unreachable.
fetchmail: Connection errors for this poll:
name 0: connection to pop.gmail.com:imap [173.194.69.109/143] failed: Connection timed out.
name 1: connection to pop.gmail.com:imap [173.194.69.108/143] failed: Connection timed out.
name 2: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6c/143] failed: Network is unreachable.
name 3: connection to pop.gmail.com:imap [2a00:1450:4013:c00::6d/143] failed: Network is unreachable.
IMAP connection to pop.gmail.com failed: Network is unreachable
fetchmail: 6.4.2 querying pop.gmail.com (protocol IMAP) at Mon Jul 12 12:48:02 2021: poll completed
fetchmail: 6.4.2 querying pop.gmail.com (protocol auto) at Mon Jul 12 12:48:02 2021: poll completed
fetchmail: Query status=2 (SOCKET)
fetchmail: normal termination, status 2
As I can assume, fetchmail is trying to force the imap protocol instead of pop. I can't understand at all why is doing something like that.
Maybe my low conoscence are made me missing something. Right now I'm working on the last version of Ubuntu server. Thank you very much for your attention and I'm sorry for my bad English.
P.S. I know that using the root account is discouraged, but for now I'm only doing some tries. When I will understand how to configure fetchmail the next step is to setup a compleat mail server using postfix, dovecot and fetchmail. Also, I already know the existence of getmail and his extreamly easy setup. But now I would like to understand the cause of this error.