Bug 30146 - Please update fetchmail to latest version and patch to allow it to work with OAuth 2.0
Summary: Please update fetchmail to latest version and patch to allow it to work with ...
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: AL13N
QA Contact:
URL: https://www.fetchmail.info
Whiteboard: mga8too
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-11 04:32 CET by Dave Hodgins
Modified: 2023-12-15 03:21 CET (History)
4 users (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Dave Hodgins 2022-03-11 04:32:02 CET
Google will be requiring OAuth 2.0 as of May 30th.

http://mmogilvi.users.sourceforge.net/software/oauthbearer.html has info on
"Setting Up OAUTH2 Support for Fetchmail and Postfix"
Comment 1 Dave Hodgins 2022-03-11 04:58:07 CET
It fits the exception for an update to Mageia 8, so it can still work with
gmail.

Whiteboard: (none) => mga8too

Comment 2 Dave Hodgins 2022-03-11 05:23:05 CET
Adding all packagers to cc list as Akien doesn't appear to be active based
on my checking for recent activity.

CC: (none) => pkg-bugs

Comment 3 Keith Bowes 2023-05-17 17:48:30 CEST
A good idea, if enough people know about it.  When Gmail started requiring oauth2, I assumed you could no longer use fetchmail or the like, as the fetchmail FAQ all but says that oauth support would require integrating a web browser into fetchmail (https://www.fetchmail.info/fetchmail-FAQ.html#I9), so I migrated back to old Hotmail account where possible (unfortunately, some sites, like Mageia, don't allow you to change your email address).  I accidentally ran across a guide to using oauth2 in Mutt and searched for how to do it in fetchmail (as not to break the accomplishment of using the Unix philosophy of separate programs for mail sending, mail retrieval, mail delivery, and mail reading) and got oauth2 working in both fetchmail and msmtp.

Honestly, applying the patches from the above oauthbearer.html page and building fetchmail is easy compared to getting your app credentials from Google and configuring everything to correctly update and use the access tokens.  Also, the above oauthbearer.html page mentions that the patches for fetchmail 6.x are limited, so that they can only use the older oauth2 (not the newer oauthbearer supported by fetchmail 7), they can't be used in daemon mode, and only one of the patches (one for fetchmail 6.4.34) also supports oauth2 over POP3 (the others support oauth2 only over IMAP).

Anyway, it should be fairly easy to get a patched fetchmail 6.x RPM to build (I've done it locally): add the patch as "Patch1: " in the SPEC file, and import and install the README.OAUTH2 file, the fetchmail-oauth2.py script (seemingly a minor mod of Google's oauth2.py to support M$ servers too) and the sample configuration files (oauth2-example-google and oauth2-example-microsoft) from the next branch.  Another option would be to add a separate package for fetchmail 7 (sort of like was done for GIMP 3), but that's iffy, as fetchmail 7 has seemingly been in alpha for over a decade (with an alpha release every year or so) and it's doubtful that a stable fetchmail 7 will happen any time soon (the fetchmail 7.0 milestone on GitLab is 7% complete).  Though, fetchmail 7 alphas' NEWS and README.OAUTH2 files indicate that oauth support is experimental, formally unsupported, may be removed at any time, and should be used only as a last resort if the provider doesn't provide any alternative method, e.g. a Gmail/G Suite app password (though, that requires the PITA two-step verification to be enabled) if the use of app passwords hasn't been disabled by the G Suite administrator.

CC: (none) => zooplah

Comment 4 David GEIGER 2023-05-18 08:02:16 CEST
Please test the upcoming fetchmail-6.4.37-1.mga9 in Core/Updates_testing repo which enables OAuth 2.0 support.

CC: (none) => geiger.david68210

Keith Bowes 2023-06-25 00:43:59 CEST

CC: zooplah => (none)

Comment 5 PC LX 2023-06-25 20:25:05 CEST
I'm using fetchmail and could test this update but can't find an update in the repositories. I have the "Core Updates Testing" repository enabled.

CC: (none) => mageia

Comment 7 David GEIGER 2023-07-15 11:52:29 CEST
Any news about fetchmail test in Core/Updates_testing ?
Comment 8 Marja Van Waes 2023-12-14 22:45:37 CET
(In reply to David GEIGER from comment #7)
> Any news about fetchmail test in Core/Updates_testing ?

This report was assigned to AL13N instead of to QA

Do you want QA to test it, or a commenter in this report?

CC: (none) => marja11

Comment 9 katnatek 2023-12-14 23:27:09 CET
(In reply to David GEIGER from comment #7)
> Any news about fetchmail test in Core/Updates_testing ?

The news is that not exist packages in Core/Updates_testing, not even the cauldron link in comment#6
Comment 10 David GEIGER 2023-12-15 03:21:35 CET
On Cauldron it is now fetchmail-6.4.37-2.mga10 to test.

Note You need to log in before you can comment on or make changes to this bug.