Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imap-backup with email-oauth2-proxy support in a container #201

Open
mcrosson opened this issue May 4, 2024 · 2 comments
Open

imap-backup with email-oauth2-proxy support in a container #201

mcrosson opened this issue May 4, 2024 · 2 comments

Comments

@mcrosson
Copy link

mcrosson commented May 4, 2024

I recently figured out how to deploy imap-backup in a container with email-oauth2-proxy setup as a background support service. I personally use office365/gmail and wanted a good container setup to backup my emails. The linked gist has everything needed to extend the standard imap-backup container to include email-oauth2-proxy support. I've tested this setup with both gmail and office365 with great success.

Posted as a ticket as I'm unsure if this is something others may find useful and/or if it would be a candidate for inclusion in the imap-backup repo or docs.

https://gist.github.com/mcrosson/b54f3092cd0d262dd59f2336fb2f3474

@joeyates
Copy link
Owner

joeyates commented May 6, 2024

Thanks @mcrosson

This looks really interesting. I had been musing about how to ease the dual setup of imap-backup and email-oauth2-proxy and this looks like a good start.

I would imagine that this would become another container build that would be done on top of the existing "minimal" container

@mcrosson
Copy link
Author

mcrosson commented May 6, 2024

I have the setup running via cron and it's been quite stable. The only 'problem' is if you need to do a full auth for email-oauth2-proxy. The interactive bit it has on initial login needs an interactive terminal which kind of forces you to re-run the container interactively with email-oauth2-proxy as a foreground task to do the auth. Once the auth is good and not prompting, email-oauth2-proxy can be a background task (I used s6-overlay for this purpose).

I did set things up to extend the 'minimal container' and to preserve the environment vars that are needed by ruby for running imap-backup without ruby errors.

If you'd like I can pack up my code as a zip and post it here. The paths on the gist are a bit messy and deep due to the way s6-overlay works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants