Eric Wong <[email protected]> writes:

> I'm in the same situation.  My current workaround is to run my
> personal IMAP stuff on a different port and keep 993+143 for
> public-inbox-imapd.

I thought about that and initially decided not to go that route, because
4 client configurations would need to be changed.  FWIW another option
occurred to me just now: only allowing access to the private IMAP server
over wireguard.  That has the added benefit of being more secure, and I
might do it for that reason alone.

> I know nginx can support IMAP proxying, but I'm not sure if it
> can decide on backend based on usernames or inboxes.

I totally forgot about nginx's mail proxy support.  It turns out that
for IMAP (and even POP3), nginx can handle the authentication too, and
it can use the result of authentication to select a given backend
server.  Nginx does its authentication by sending a request to an HTTP
endpoint defined in the config.  The protocol uses some custom HTTP
headers.  It can even rate-limit on failed auth attempts.  This looks
very flexible.

It's all quite doable, and I'll be happy to share my config and endpoint code
once I have something.

-- Chris

Reply via email to