I’m in need of an MFA solution for thick client (IMAP, SMTP) email access to our NS8 instance. Eventually, I would extend it to Roundcube and SOGo, but being web applications, I think those are more straightforward.
I have a freshly installed test NS8 install and would love to help move this effort forward by trying and testing on my test system. I have an LDAP connection to an external AD, but I would like to make sure that any solution will work any of the NS8 supported user authentication mechanisms. Any suggestions, guidance, would be greatly appreciated. I am not experienced any of the tools that I have found, so I will make a lot of mistakes and probably make suggestions that make no sense. I apologize in advance.
As I see it, IMAP and SMTP are difficult to MFA as they do not natively support any mechanism for client tokens that can be used for connection lifetime management. For good or bad, I believe that large providers (Google, Microsoft) have settled on OAuth2 for MFA solution. We use Thunderbird as our email client which has OAuth2 support (likely driven by the desire to support connections to Google/Microsoft).
I have seen mention of Authentik, Keycloak, and other components that may be needed in order to implement a solution, but my inexperience doesn’t let me know how they fit in the control/data flow for a working solution.
Thanks for the suggestion. We do have a firewall and VPN (Wireguard), so I could force all thick client accesses to occur via VPN. I think that I will still pursue an MFA solution, if nothing more than to learn.
On the positive side, I found this article (OAuth2 for dovecot and postfix? – Linux – The Next Generation) that seems to indicate that dovecot and postfix both support OAuth2 in recent releases. I think this means that installing and configuring an appropriate authentication service (Keycloak/Authentik/…) is all that would be necessary. @mrmarkuz Any thoughts?
On the negative side, later in the article it seems that they conclude that Thunderbird is still not able to access OAuth2 servers other than a few BIG players. Fingers crossed that will change sometime soon.
I think your only option is to handle it on the client side. As far as I know, it’s not possible to configure Postfix or Dovecot to use multi-factor authentication. Office 365 is moving in that direction, but I’m not sure about our setup — though, as always, I might be wrong!