[horde] Setup OAuth2 with Horde-Imp

Michael J Rubinsky mrubinsk at horde.org
Sun May 8 19:00:38 UTC 2022

Quoting Louis-Philippe Allard <lp.allard.1 at gmail.com>:

> Hello,
> I am trying to setup Protonmail and their bridge to replace GMail as  
> Horde's email backend server on my selfhosted VPS.  However its  
> looking more complicated than expected (sigh).
> In the meantime, I have until May 30th to setup OAuth2 to be able to  
> continue using Gmail. Thanks Google...
> However, I cannot find any instructions on how to do so, and the  
> maillist is very quiet these days.
> The way my system is setup is that Gmail's credentials are used by  
> IMP for Horde's authentication (hordeauth => true in  
> imp/backends.local.php).
> GMail's IMAP server is setup also in imp/backends.local.php  
> (imap.gmail.com:993) and to send emails, Gmail's SMTP server is  
> setup under Horde's config > Mailer section (smtp.gmail.com:587).
> Just to be sure I understand the "mechanics" involved here, can  
> someone just confirm this statement:  On my setup, IMP passes the  
> credentials received at the login page to GMail's server which  
> accepts them.  IMP receiving a successful reply from GMail, it lets  
> the user enter (authenticate) into Horde.  Email sync'ing (folder  
> structure, receiving emails, etc) is done via the IMP's  
> backends.local.php (IMAP section), and sending email from this VPS  
> is accomplished via the Mailer section of Horde using GMail's SMTP  
> server.

This is correct in a general sense, yes.

> Everything else in Horde (calendar, contacts, task lists, notes,  
> tickets, etc) has never been setup to be stored remotely.  It is  
> stored in Horde's MYSQL database.
> If I lose connectivity to GMail, I CANNOT LOGIN to Horde.  This is a  
> major issue.
> I need IMP to handle OAuth2 to be able to use GMail's IMAP.

The good news is that our IMAP client supports the required XOAUTH  
mechanism that Google's IMAP servers require. The bad news is that  
neither Horde or IMP has been modified to use that yet.

> I need Horde to handle OAuth2 to be able to use GMail's SMTP.
> Question 1:  How can I setup a local authentication that would NOT  
> rely on external servers?  This VPS is behind a strong FW so I am OK  
> with standard USR:PSW combination.

Pick another authentication option, like "SQL". Note that this won't  
allow you to use IMP in your current setup.

> Question 2:  Is it possible to setup OAuth2 to be able to use  
> GMail's IMAP and SMTP servers?

Possible? Yes, but will require work in Horde and IMP to take  
advantage of our IMAP client's capabilities.

> Hopefully the maillist is still alive and well  and someone can  
> guide/help me!
> Thank you !!
>  Louis-Philippe Allard
> lp.allard.1 at gmail.com
> Sent using Horde Groupware on GNU/Linux
> -- 
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org

The Horde Project
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-keys
Size: 9386 bytes
Desc: PGP Public Key
URL: <https://lists.horde.org/archives/horde/attachments/20220508/dbe7121d/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: PGP Digital Signature
URL: <https://lists.horde.org/archives/horde/attachments/20220508/dbe7121d/attachment.sig>

More information about the horde mailing list