I’m looking for an IMAP proxy server (more of a reverse proxy, really) which automatically PGP-encrypts all mail. I run a dovecot IMAP server, and I want the IMAP client on my phone to connect to that proxy. I then want my phone to see all mail, to be able to retrieve all mail, etc. – but I want each and every mail that my phone retrieves to be encrypted to my key. Is there such a proxy server?
Unfortunately, searching for "imap proxy pgp" gives me a ton of solutions for automatically encrypting outgoing mail (even though that should have nothing to do with IMAP?), but nothing I could use.
Why would anybody want this?
I currently consider my mail account on my (Android) phone to be the biggest weakness in my overall security setup. Anybody who is able to snatch the credentials stored in my K-9 mail client is able to take over my email account, and use that to gain access to all sorts of accounts via password resets. On the other hand, I want to be able to access my mails while on the move. If my phone’s mail client only ever held credentials that enabled an attacker to access my mails in PGP-encrypted form, that would mitigate this danger. My PGP key is held on a Yubikey 5 NFC, so an attacker would not be able to steal the decryption key.