Score:1

Fetchmail does not use the indicated protocol

ng flag

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:

  1. I edited the file called "fetchmail" in the folder /etc/default and set the variable demon to "yes";

  2. 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
    
  3. 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.

Paul avatar
cn flag
Did you restart `fetchmail`?
DottorBooom avatar
ng flag
what do you mean?
Paul avatar
cn flag
I'm not familiar with `fetchmail`, but if it runs as a service, then you will need to restart it (e.g., `# service fetchmail restart`) to load the new configuration.
DottorBooom avatar
ng flag
Ohhh, I already did that but nothing changed. I even restart ubuntu.
Score:2
ma flag

When you run fetchmail from the commandline, by default it will use the /.fetchmailrc file and nothing else.

To manually test the configuration file "fetchmailrc" in the folder /etc you need to use the -f <pathname> or --fetchmailrc <pathname> option.

In other words test with

fetchmail -d0 -vk --fetchmailrc /etc/fetchmailrc
DottorBooom avatar
ng flag
Thank you very much. Now it works fine. The only problem that stand now is the authorized access by gmail but I assume I have to allowed access to less secure apps. Thank you again and have a nice day.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.