Score:1

Authorization failed when I try to log into gmail using fetchmail

ng flag

After solving a small problem with starting fetchmail I am faced with another obstacle. This time related to accessing a gmail account through "fetchmail"

I know it's a lot of stuff but I hope someone wants to read this problem that hinders me. Thanks a lot in advance and have a nice day.

I now turn to the description of the problem:

  1. First I run the command for the fetchmail test:

    fetchmail -d0 -vk --fetchmailrc /etc/fetchmailrc
    
  2. It then starts printing the results of what I believe is a connection with the gmail mail server:

    fetchmail: WARNING: Running as root is discouraged.
    fetchmail: 6.4.2 querying pop.gmail.it (protocol POP3) at Mon Jul 12 17:43:20 2021: poll started
    Trying to connect to 62.141.49.168/995...connected.
    fetchmail: Loaded OpenSSL library 0x1010106f newer than headers 0x1010104f, trying to continue.
    fetchmail: Server certificate:
    fetchmail: Issuer Organization: Let's Encrypt
    fetchmail: Issuer CommonName: R3
    fetchmail: Subject CommonName: mail.gmail.it
    fetchmail: Subject Alternative Name: mail.gmail.it
    fetchmail: Subject Alternative Name: mx1.gmail.it
    fetchmail: Subject Alternative Name: pop.gmail.it
    fetchmail: Subject Alternative Name: smtp.gmail.it
    fetchmail: pop.gmail.it key fingerprint: <key>
    fetchmail: SSL/TLS: using protocol TLSv1.2, cipher <cipher>, <secret stuff>
    fetchmail: POP3< +OK Hello there.
    fetchmail: POP3> CAPA
    fetchmail: POP3< +OK Here's what I can do:
    fetchmail: POP3< TOP
    fetchmail: POP3< USER
    fetchmail: POP3< LOGIN-DELAY 10
    fetchmail: POP3< PIPELINING
    fetchmail: POP3< UIDL
    fetchmail: POP3< IMPLEMENTATION Courier Mail Server
    
  3. All that remains is to authenticate the credentials, here comes the error and the closure of the communication:

    fetchmail: POP3> USER dade.marti02gmail.com
    fetchmail: POP3< +OK Password required.
    fetchmail: POP3> PASS *
    fetchmail: POP3< -ERR Login failed.
    fetchmail: Login failed.
    fetchmail: Authorization failure on [email protected]
    fetchmail: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15
    fetchmail: POP3> QUIT
    fetchmail: POP3< +OK Better luck next time.
    fetchmail: 6.4.2 querying pop.gmail.it (protocol POP3) at Mon Jul 12 17:43:25 2021: poll completed
    fetchmail: Query status=3 (AUTHFAIL)
    fetchmail: normal termination, status 3
    

I list all the solutions I tried to adopt:

  1. Checked the credentials;
  2. Domain verified;
  3. Tried other communication protocols;
  4. 2-Step Verification Removal of Account;
  5. Enable third-party app access;
  6. Created a special password for access with external apps;
  7. All authentication type had been tried.

Nothing at all. The problem was not solved. Since the fetchmail daemon is already running in the background I tried to run "sudo systemctl status fetchmail.service" and the response was similar to that of the test:

    ��� fetchmail.service - LSB: init-Script for system wide fetchmail daemon
         Loaded: loaded (/etc/init.d/fetchmail; generated)
         Active: active (running) since Mon 2021-07-12 17:14:56 CEST; 1min 41s ago
           Docs: man:systemd-sysv-generator(8)
        Process: 1288 ExecStart=/etc/init.d/fetchmail start (code=exited, status=0/SUCCESS)
          Tasks: 1 (limit: 1071)
         Memory: 1.7M
         CGroup: /system.slice/fetchmail.service
                 ������1304 /usr/bin/fetchmail -f /etc/fetchmailrc --pidfile /var/run/fetchmail/fetchmail.pid --syslog
    
    Jul 12 17:14:56 VM-LinuxServer systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
    Jul 12 17:14:56 VM-LinuxServer fetchmail[1288]:  * Starting mail retriever agent:
    Jul 12 17:14:56 VM-LinuxServer fetchmail[1288]:    ...done.
    Jul 12 17:14:56 VM-LinuxServer systemd[1]: Started LSB: init-Script for system wide fetchmail daemon.
    Jul 12 17:14:56 VM-LinuxServer fetchmail[1304]: starting fetchmail 6.4.2 daemon
    Jul 12 17:15:01 VM-LinuxServer fetchmail[1304]: Authorization failure on [email protected]
    Jul 12 17:15:01 VM-LinuxServer fetchmail[1304]: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15
    Jul 12 17:15:01 VM-LinuxServer fetchmail[1304]: Query status=3 (AUTHFAIL)

I also upload the config file "fetchmailrc":

    set postmaster "root"
    set bouncemail
    set no spambounce
    set properties ""
    set daemon 600
    
    poll pop.gmail.it with proto POP3
       user 'dade.marti02gmail.com' there with password 'secretpwd' is root here;
    stripcr and ssl with sslproto 'tls1.2' and fetchall 
Paul avatar
cn flag
Have you tried logging in using the same credentials and methods from a different device?
DottorBooom avatar
ng flag
Yes, and It work perfectly
Paul avatar
cn flag
The FAQ link states to use `auth`. Did you try that?
DottorBooom avatar
ng flag
You mean the command for specify an authentication type? Where it said it?
Paul avatar
cn flag
https://www.fetchmail.info/fetchmail-FAQ.html#R15
DottorBooom avatar
ng flag
Ohhh, you mean that. I already try ALL authentication type and no one can resolve that.
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.