Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Gmail, OAuth2, POPfile -- How to?

more options

So Google went ahead and disabled normal logins. This has broken POPFile mail classifier.

POPFile likes to sit between my mail servers and Thunderbird, causing all emails fetched from remote servers to pass through the mail classifier before Thunderbird gets them.

When I use these settings: Server name: 10.0.0.15 Username: pop.gmail.com:995:xxxx@gmail.com:ssl Connection Security: SSL/TLS Authentication Method: OAuth2

Thunderbird just gets 'connection timed out.' No OAuth2 login screen appears. I've tested OAuth2+Thunderbird with POPFile removed from the equation and everything works normally.

Does anyone know how to get POPFile mail classifier to work with OAuth2? This is likely not the right place to ask, but asking anyway if anyone has some suggestions. Thanks!

So Google went ahead and disabled normal logins. This has broken POPFile mail classifier. POPFile likes to sit between my mail servers and Thunderbird, causing all emails fetched from remote servers to pass through the mail classifier before Thunderbird gets them. When I use these settings: Server name: 10.0.0.15 Username: pop.gmail.com:995:xxxx@gmail.com:ssl Connection Security: SSL/TLS Authentication Method: OAuth2 Thunderbird just gets 'connection timed out.' No OAuth2 login screen appears. I've tested OAuth2+Thunderbird with POPFile removed from the equation and everything works normally. Does anyone know how to get POPFile mail classifier to work with OAuth2? This is likely not the right place to ask, but asking anyway if anyone has some suggestions. Thanks!

All Replies (6)

more options

I think you need to reconsider your mail scanning. oAuth is not something that can be done by proxy. So this POPFile mail classifier will need to support oauth authentication in it's own right. As it has not seen an update in more that 12 years I doubt that will be happening.

https://sourceforge.net/projects/popfile/files/

more options

Hey Matt, thanks for the reply.

Do you perhaps know of something I could use to fetch the mail (fetchmail comes to mind?) to transfer the email to another server (like my local server), then I could use POPFile to classify as usual, fetching from the local mail server instead. Do you or anyone else know of an OAuth2 capable fetchmail?

Another mail classifier might be an option too, though, ugh, the idea of losing decades of training POPfile seems.. not a good idea.

more options

But Thunderbird POP accounts can use OAuth as follows:

Please note: If you run a localhost server eg: Apache then you will need to switch it off temporarilly to allow google to set up the token.

Thunderbird has made alterations so now both POP and IMAP accounts can use OAuth2 for gmail.

  • Select 'Menu app icon' > 'Preferences' > 'Privacy & Security '

Under 'Web Content'

  • Select 'Accept cookies from sites'

It may also be a good idea to make exception:

Now make changes to Account Settings:

  • Right click on gmail pop/imap account name in Folder Pane and select 'Settings'

This opens the Account Settings in new tab The pop/imap account name should be selected Look bottom right for Outgoing Server (SMTP)

  • Click on 'Edit Server _SMTP' button
  • Set Authentication Method : OAuth2
  • Click on OK

Now set the incoming authentication:

  • select 'Server Settings' for gmail account
  • server name: pop.gmail.com
  • Port: 995
  • Connection Security: SSL/TLS
  • Set Authentication Method : OAuth2


Exit Thunderbird and wait a few moments for background processes to complete Start Thunderbird

Gmail will prompt you to enter gmail email address and normal password you use to access webmail account. Follow instructions. It will ask this to allow Thunderbird to access server.

An Oauth token will get stored in Thunderbird - same place as passwords and from then onwards Thunderbird will use it to access server.

Modified by Toad-Hall

more options

Thanks Toad-Hall, but this is not a solution to my issue.

As I wrote originally, OAuth2 + Thunderbird is fine. It's when I add POPFile into the mix, things become a problem.

Perhaps next time you can read the entire issue before replying. Thanks.

more options

I read your issue and understood you were looking for a POPFILE that managed Oauth. I was offering the alternative normal method in case you decided to use it because POPFILE was no longer possible. But you do mention you already have Oauth working ok, so I see your point.

Modified by Toad-Hall

more options

Toad-Hall: Perhaps you know of a 'fetchmail' tool I can use that supports OAuth2, which I could use to transfer emails from GMAIL to a different email server (like my own.)?

If I could transfer the emails out of GMAIL and into a local email inbox, then I wouldn't need OAuth2 in Thunderbird at all, since the emails would just be shoved into my local email server's inbox.

Modified by cheetah2003