gmail 2-step verification on mutt x

If none of the more specific forums is the right place to ask

gmail 2-step verification on mutt x

Postby kingkongmok » 2012-06-06 15:22

I use mutt as my gmail mail tool. It works fine with my fetchmail and procmail, until I try google's 2-step verification. I've visited google's instruction, get the once code, but I don't know how to tell the fetchmail. Please help.


Code: Select all
~$ fetchmail -v
fetchmail: 6.3.18 querying pop.gmail.com (protocol POP3) at Wed 06 Jun 2012 10:51:30 PM CST: poll started
Trying to connect to 74.125.127.109/995...connected.
fetchmail: Server certificate:
fetchmail: Issuer Organization: Google Inc
fetchmail: Issuer CommonName: Google Internet Authority
fetchmail: Subject CommonName: pop.gmail.com
fetchmail: pop.gmail.com key fingerprint: B8:AF:A7:80:CD:E2:31:50:6F:ED:0E:4F:C8:04:D6:CD
fetchmail: POP3< +OK Gpop ready for requests from xxxx
fetchmail: POP3> CAPA
fetchmail: POP3< +OK Capability list follows
fetchmail: POP3< USER
fetchmail: POP3< RESP-CODES
fetchmail: POP3< EXPIRE 0
fetchmail: POP3< LOGIN-DELAY 300
fetchmail: POP3< TOP
fetchmail: POP3< UIDL
fetchmail: POP3< X-GOOGLE-VERHOEVEN
fetchmail: POP3< X-GOOGLE-RICO
fetchmail: POP3< .
fetchmail: POP3> USER xxxx
fetchmail: POP3< +OK send PASS
fetchmail: POP3> PASS *
fetchmail: POP3< -ERR [AUTH] Application-specific password required: http://support.google.com/accounts/bin/answer.py?answer=185833
fetchmail: [AUTH] Application-specific password required: http://support.google.com/accounts/bin/answer.py?answer=185833
fetchmail: Authorization failure on kingkongmok@gmail-pop.l.google.com
fetchmail: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15
fetchmail: POP3> QUIT
fetchmail: POP3< +OK Farewell.
fetchmail: 6.3.18 querying pop.gmail.com (protocol POP3) at Wed 06 Jun 2012 10:51:34 PM CST: poll completed
fetchmail: Query status=3 (AUTHFAIL)
fetchmail: normal termination, status 3
kingkongmok
 
Posts: 9
Joined: 2009-08-10 09:08

Re: gmail 2-step verification on mutt x

Postby Kint » 2012-06-13 17:28

The application-specific passcode you got from Google becomes the password you need to give to fetchmail. Just reconfigure fetchmail and give it the Google-supplied code as your gmail account password and you're set.

Optionally, ditch fetchmail entirely and have mutt read/write your mail via IMAPS. You don't need fetchmail, both mutt and gmail do IMAPS natively.

Here is what you need in your .muttrc to make mutt talk to gmail via IMAPS :

set imap_user = "username@gmail.com"
set imap_pass = "GOOGLE_APPLICATION_PASSWORD"
set smtp_url = "smtp://username@smtp.gmail.com:587/"
set smtp_pass = "GOOGLE_APPLICATION_PASSWORD"
set from = "username@gmail.com"
set realname = "Your Real Name"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"
set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates
set move = no
Kint
 
Posts: 3
Joined: 2012-06-13 17:26


Return to General Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable