* korgalore v0.2 released with JMAP, IMAP, Maildir support
@ 2025-12-17 15:21 Konstantin Ryabitsev
2025-12-17 17:50 ` Jason A. Donenfeld
` (2 more replies)
0 siblings, 3 replies; 32+ messages in thread
From: Konstantin Ryabitsev @ 2025-12-17 15:21 UTC (permalink / raw)
To: tools, users
Hello:
TL;DR: korgalore 0.2 adds support for multiple delivery targets beyond Gmail:
JMAP (Fastmail), generic IMAP, and local maildir.
Docs are here:
https://korgalore.docs.kernel.org/en/v0.2/
What's new in 0.2
-----------------
New delivery targets:
- JMAP support: works with Fastmail and, potentially, other JMAP-compatible
providers. Uses bearer token authentication, so no OAuth dance required --
just generate an API token in your provider's settings.
- Generic IMAP: works with any IMAP server over SSL. Simple password or
password_file authentication.
- Local maildir: for those who prefer local mail storage.
Configuration improvements:
- Named feed definitions: define feeds once, reuse across multiple deliveries.
- Per-delivery state tracking: each delivery now maintains its own state,
allowing multiple targets to follow the same feed independently.
- Hopefully, clearer naming for targets, feeds, and deliveries.
Reliability improvements:
- Automatic retry mechanism for failed deliveries, with 5-day grace period
before marking as permanently failed.
- Atomic writes for state files to prevent corruption on interrupted writes.
- Better feedback during initialization of new feeds and deliveries.
Not just GMail
--------------
If Gmail's OAuth complexity was keeping you away, you now have simpler options:
- Fastmail users just need to generate an API token -- no developer console, no
OAuth consent screens, no clicking through 10 confirmation dialogs.
- IMAP works with any provider that supports IMAP over SSL.
- Maildir requires no authentication at all.
The architecture has been cleaned up to clearly separate "feeds" (email
sources like lore and lei) from "targets" (delivery destinations), making
it easier to add new target types in the future.
Upgrading from 0.1
------------------
State files are automatically migrated to the new per-delivery format on first
run. Your existing configuration will continue to work, though "sources" has
been renamed to "deliveries" (legacy configs are handled automatically).
-K
^ permalink raw reply [flat|nested] 32+ messages in thread* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-17 15:21 korgalore v0.2 released with JMAP, IMAP, Maildir support Konstantin Ryabitsev @ 2025-12-17 17:50 ` Jason A. Donenfeld 2025-12-17 18:14 ` Konstantin Ryabitsev 2025-12-18 0:24 ` Linus Walleij 2025-12-18 13:40 ` Rob Herring 2 siblings, 1 reply; 32+ messages in thread From: Jason A. Donenfeld @ 2025-12-17 17:50 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: tools, users On Wed, Dec 17, 2025 at 10:21:27AM -0500, Konstantin Ryabitsev wrote: > - Local maildir: for those who prefer local mail storage. Wondering: is there a difference between this and using lei? Should I switch my lei setup over to korgalore with a local maildir? Jason ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-17 17:50 ` Jason A. Donenfeld @ 2025-12-17 18:14 ` Konstantin Ryabitsev 0 siblings, 0 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-17 18:14 UTC (permalink / raw) To: Jason A. Donenfeld; +Cc: tools, users On Wed, Dec 17, 2025 at 06:50:59PM +0100, Jason A. Donenfeld wrote: > On Wed, Dec 17, 2025 at 10:21:27AM -0500, Konstantin Ryabitsev wrote: > > - Local maildir: for those who prefer local mail storage. > > Wondering: is there a difference between this and using lei? Should I > switch my lei setup over to korgalore with a local maildir? That's a fair question. The main goal for korgalore was to provide a way to stuff emails directly into gmail -- which is not something lei can do for you. However, lei does support native delivery to maildir, imap, and jmap, so if you never need to touch gmail (or other OAuth providers, eventually), you can just continue to use lei directly. In general, the reason korgalore exists: - sticks things directly into gmail, bypassing Google's notoriously hostile SMTP endpoint - doesn't require lei for straight-off mailing list subscriptions -- can pull lore's underlying git repositories - will eventually allow doing the same for centrally managed query-based pseudo-lists [see below] But, if lei is working fine for you, please don't switch. The pseudo-lists are effectively centrally-managed lei queries that we expose externally like any other list. The idea is that instead of proliferating subsystem-specific mailing lists that see barely any traffic, we just let maintainers define what they are interested in, and then keep everything on one of the existing larger lists. Think of it is query-based "slice" of lkml/netdev/mm, etc. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-17 15:21 korgalore v0.2 released with JMAP, IMAP, Maildir support Konstantin Ryabitsev 2025-12-17 17:50 ` Jason A. Donenfeld @ 2025-12-18 0:24 ` Linus Walleij 2025-12-18 1:57 ` Konstantin Ryabitsev 2025-12-18 13:40 ` Rob Herring 2 siblings, 1 reply; 32+ messages in thread From: Linus Walleij @ 2025-12-18 0:24 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: tools, users Hi Konstantin, I set up korgalore and auth and all. kgl yank works fine! kgl pull doesn't work. With a simple LKML inbox, I got this error: $ kgl pull Traceback (most recent call last): File "/home/linus/.local/bin/kgl", line 8, in <module> sys.exit(main()) ~~~~^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1485, in __call__ return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1406, in main rv = self.invoke(ctx) File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1873, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1269, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 824, in invoke return callback(*args, **kwargs) File "/home/linus/.local/lib/python3.14/site-packages/click/decorators.py", line 34, in new_func return f(get_current_context(), *args, **kwargs) File "/home/linus/.local/lib/python3.14/site-packages/korgalore/cli.py", line 738, in pull lock_all_feeds(ctx) ~~~~~~~~~~~~~~^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/korgalore/cli.py", line 463, in lock_all_feeds feed.feed_lock() ~~~~~~~~~~~~~~^^ File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", line 386, in feed_lock lockfh = open(lock_file_path, 'w') FileNotFoundError: [Errno 2] No such file or directory: '/home/linus/.local/share/korgalore/lkml/korgalore.lock' My config: ### Targets ### [targets.personal] type = 'gmail' credentials = '~/.config/korgalore/credentials.json' # token = '~/.config/korgalore/token.json' ### Deliveries ### [deliveries.lkml] feed = 'https://lore.kernel.org/lkml' target = 'personal' labels = ['korgalore/Linux-LKML'] Running on Fedora 43. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 0:24 ` Linus Walleij @ 2025-12-18 1:57 ` Konstantin Ryabitsev 2025-12-18 2:42 ` Konstantin Ryabitsev 2025-12-18 18:51 ` Sudeep Holla 0 siblings, 2 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-18 1:57 UTC (permalink / raw) To: Linus Walleij; +Cc: tools, users On Thu, Dec 18, 2025 at 01:24:51AM +0100, Linus Walleij wrote: > With a simple LKML inbox, I got this error: > [...] > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > line 386, in feed_lock > lockfh = open(lock_file_path, 'w') > FileNotFoundError: [Errno 2] No such file or directory: > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' Ouch. Yeah, this should fix it for you while I push out a better fix: mkdir -p /home/linus/.local/share/korgalore/lkml Thanks for the report! -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 1:57 ` Konstantin Ryabitsev @ 2025-12-18 2:42 ` Konstantin Ryabitsev 2025-12-18 18:51 ` Sudeep Holla 1 sibling, 0 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-18 2:42 UTC (permalink / raw) To: Linus Walleij; +Cc: tools, users On Wed, Dec 17, 2025 at 08:57:08PM -0500, Konstantin Ryabitsev wrote: > > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > > line 386, in feed_lock > > lockfh = open(lock_file_path, 'w') > > FileNotFoundError: [Errno 2] No such file or directory: > > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' > > Ouch. Yeah, this should fix it for you while I push out a better fix: > > mkdir -p /home/linus/.local/share/korgalore/lkml > > Thanks for the report! There is a v0.2.1 release now that fixes this and one other bug. Thanks! -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 1:57 ` Konstantin Ryabitsev 2025-12-18 2:42 ` Konstantin Ryabitsev @ 2025-12-18 18:51 ` Sudeep Holla 2025-12-18 20:47 ` Konstantin Ryabitsev 1 sibling, 1 reply; 32+ messages in thread From: Sudeep Holla @ 2025-12-18 18:51 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Linus Walleij, tools, users, sudeep.holla On Thu, 18 Dec 2025 at 01:57, Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > > On Thu, Dec 18, 2025 at 01:24:51AM +0100, Linus Walleij wrote: > > With a simple LKML inbox, I got this error: > > > [...] > > > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > > line 386, in feed_lock > > lockfh = open(lock_file_path, 'w') > > FileNotFoundError: [Errno 2] No such file or directory: > > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' > > Ouch. Yeah, this should fix it for you while I push out a better fix: > > mkdir -p /home/linus/.local/share/korgalore/lkml I am facing a similar issue where kgl yank works but kgl pull fails slightly in a different way. I started it with kgl, version 0.2.1 -->8 Updating feeds [------------------------------------] 0/1 https://lore.kernel.org/lkml Traceback (most recent call last): File "/home/sudeep/.local/bin/kgl", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/core.py", line 1485, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/core.py", line 1406, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/core.py", line 1873, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/core.py", line 1269, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/core.py", line 824, in invoke return callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/click/decorators.py", line 34, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/cli.py", line 714, in pull updated_feeds = update_all_feeds(ctx) ^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/cli.py", line 461, in update_all_feeds updated = feed.update_feed() ^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/lore_feed.py", line 143, in update_feed feed_state = self.load_feed_state() ^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/pi_feed.py", line 597, in load_feed_state self._perform_legacy_migration() File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/pi_feed.py", line 136, in _perform_legacy_migration highest_epoch = self.get_highest_epoch() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/pi_feed.py", line 220, in get_highest_epoch epochs = self.find_epochs() ^^^^^^^^^^^^^^^^^^ File "/home/sudeep/.local/lib/python3.12/site-packages/korgalore/pi_feed.py", line 206, in find_epochs for item in epochs_dir.iterdir(): File "/usr/lib/python3.12/pathlib.py", line 1058, in iterdir for name in os.listdir(self): ^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/home/sudeep/.local/share/korgalore/lkml/git' -- Regards, Sudeep ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 18:51 ` Sudeep Holla @ 2025-12-18 20:47 ` Konstantin Ryabitsev 2025-12-18 22:41 ` Linus Walleij 2025-12-19 18:54 ` Sudeep Holla 0 siblings, 2 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-18 20:47 UTC (permalink / raw) To: Sudeep Holla; +Cc: Linus Walleij, tools, users On Thu, Dec 18, 2025 at 06:51:34PM +0000, Sudeep Holla wrote: > > > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > > > line 386, in feed_lock > > > lockfh = open(lock_file_path, 'w') > > > FileNotFoundError: [Errno 2] No such file or directory: > > > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' > > > > Ouch. Yeah, this should fix it for you while I push out a better fix: > > > > mkdir -p /home/linus/.local/share/korgalore/lkml > > I am facing a similar issue where kgl yank works but kgl pull fails > slightly in a different way. > I started it with kgl, version 0.2.1 Oh no, this is what happens when I don't check adding new feeds after a major refactor. I think it's working correctly now in 0.2.2 -- please check! Sorry about that, -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 20:47 ` Konstantin Ryabitsev @ 2025-12-18 22:41 ` Linus Walleij 2025-12-19 0:38 ` Konstantin Ryabitsev 2025-12-19 18:54 ` Sudeep Holla 1 sibling, 1 reply; 32+ messages in thread From: Linus Walleij @ 2025-12-18 22:41 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Thu, Dec 18, 2025 at 9:47 PM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > On Thu, Dec 18, 2025 at 06:51:34PM +0000, Sudeep Holla wrote: > > > > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > > > > line 386, in feed_lock > > > > lockfh = open(lock_file_path, 'w') > > > > FileNotFoundError: [Errno 2] No such file or directory: > > > > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' > > > > > > Ouch. Yeah, this should fix it for you while I push out a better fix: > > > > > > mkdir -p /home/linus/.local/share/korgalore/lkml > > > > I am facing a similar issue where kgl yank works but kgl pull fails > > slightly in a different way. > > I started it with kgl, version 0.2.1 > > Oh no, this is what happens when I don't check adding new feeds after a major > refactor. I think it's working correctly now in 0.2.2 -- please check! Is that also in the git? I just git pull --ff-only from the korgalore git and it still says: Successfully installed korgalore-0.2 And I have similar errors: FileNotFoundError: [Errno 2] No such file or directory: '/home/linus/.local/share/korgalore/lkml/git' Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 22:41 ` Linus Walleij @ 2025-12-19 0:38 ` Konstantin Ryabitsev 2025-12-20 20:56 ` Linus Walleij 2025-12-22 14:02 ` Linus Walleij 0 siblings, 2 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-19 0:38 UTC (permalink / raw) To: Linus Walleij; +Cc: Sudeep Holla, tools, users On Thu, Dec 18, 2025 at 11:41:17PM +0100, Linus Walleij wrote: > > Oh no, this is what happens when I don't check adding new feeds after a major > > refactor. I think it's working correctly now in 0.2.2 -- please check! > > Is that also in the git? I just git pull --ff-only from the korgalore git and it > still says: > Successfully installed korgalore-0.2 It would help if I push, eh? It's done now. Try the master branch -- there's also a "kgl track" there that lets one yank arbitrary threads *and* receive any updates (requires lei). -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-19 0:38 ` Konstantin Ryabitsev @ 2025-12-20 20:56 ` Linus Walleij 2025-12-22 15:50 ` Konstantin Ryabitsev 2025-12-22 14:02 ` Linus Walleij 1 sibling, 1 reply; 32+ messages in thread From: Linus Walleij @ 2025-12-20 20:56 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Fri, Dec 19, 2025 at 1:38 AM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > On Thu, Dec 18, 2025 at 11:41:17PM +0100, Linus Walleij wrote: > > > Oh no, this is what happens when I don't check adding new feeds after a major > > > refactor. I think it's working correctly now in 0.2.2 -- please check! > > > > Is that also in the git? I just git pull --ff-only from the korgalore git and it > > still says: > > Successfully installed korgalore-0.2 > > It would help if I push, eh? It's done now. > > Try the master branch -- there's also a "kgl track" there that lets one > yank arbitrary threads *and* receive any updates (requires lei). I kind of guessed on the implicit dependency on lei so I already installed that anyway, perhaps the docs should mention it? It works fine now! kgl update pulls in the new massages since last run, which I assume is how it is supposed to work? For a while I was worried that it would suck in the entire LKML history :D Excellent tool Konstantin, this is exactly what I need! Some examples on how to use it to get "your personal developer feed" using lei with korgalore would be deeply appreciated. In my old gmail setup I have a "!TO-ME" folde which labels all messages from all subscribed lists where I am listed on To: or Cc: and put into that mailbox, I assume I can achieve the same with lei I just need to figure out how. I think this is a common maintainer usecase? Or how do others do their work? Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-20 20:56 ` Linus Walleij @ 2025-12-22 15:50 ` Konstantin Ryabitsev 2025-12-22 22:33 ` Linus Walleij 0 siblings, 1 reply; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-22 15:50 UTC (permalink / raw) To: Linus Walleij; +Cc: Sudeep Holla, tools, users On Sat, Dec 20, 2025 at 09:56:31PM +0100, Linus Walleij wrote: > Some examples on how to use it to get "your personal developer > feed" using lei with korgalore would be deeply appreciated. This is the next step -- this tool is a stepping stone towards the "maintainer container" I talked about in my tooling update. I'm hoping to have a small web frontend (accessed via localhost) that can manage most of the korgalore configuration, which would also assist with putting together lei queries. It could also help automatically convert F: and X: patterns from the MAINTAINERS file into a lei query, so that someone would just have to pick their subsystem to have the (mostly) right lei query set up for them. > In my old gmail setup I have a "!TO-ME" folde which labels all > messages from all subscribed lists where I am listed on To: or > Cc: and put into that mailbox, I assume I can achieve the same > with lei I just need to figure out how. You want: tc:linusw@kernel.org The following query should do the trick: lei q -O https://lore.kernel.org/all/ \ -o v2:/home/[username]/.local/share/lei/to-me \ --dedupe=mid \ 'tc:linusw@kernel.org AND d:1.month.ago..' Then you can add a korgalore lei feed: [deliveries.to-me] feed = 'lei:/home/user/.local/share/lei/to-me' target = 'work' labels = ['!TO-ME', 'UNREAD', 'STARRED'] -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-22 15:50 ` Konstantin Ryabitsev @ 2025-12-22 22:33 ` Linus Walleij 2026-01-09 23:31 ` Linus Walleij 0 siblings, 1 reply; 32+ messages in thread From: Linus Walleij @ 2025-12-22 22:33 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Mon, Dec 22, 2025 at 4:50 PM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > On Sat, Dec 20, 2025 at 09:56:31PM +0100, Linus Walleij wrote: > > Some examples on how to use it to get "your personal developer > > feed" using lei with korgalore would be deeply appreciated. > > This is the next step -- this tool is a stepping stone towards the "maintainer > container" I talked about in my tooling update. I'm hoping to have a small web > frontend (accessed via localhost) that can manage most of the korgalore > configuration, which would also assist with putting together lei queries. > > It could also help automatically convert F: and X: patterns from the > MAINTAINERS file into a lei query, so that someone would just have to pick > their subsystem to have the (mostly) right lei query set up for them. > > > In my old gmail setup I have a "!TO-ME" folde which labels all > > messages from all subscribed lists where I am listed on To: or > > Cc: and put into that mailbox, I assume I can achieve the same > > with lei I just need to figure out how. > > You want: > > tc:linusw@kernel.org > > The following query should do the trick: > > lei q -O https://lore.kernel.org/all/ \ > -o v2:/home/[username]/.local/share/lei/to-me \ > --dedupe=mid \ > 'tc:linusw@kernel.org AND d:1.month.ago..' > > Then you can add a korgalore lei feed: > > [deliveries.to-me] > feed = 'lei:/home/user/.local/share/lei/to-me' > target = 'work' > labels = ['!TO-ME', 'UNREAD', 'STARRED'] I like what I see, I will try this out! One TODO: after 1 year to 6 months if using korgalore users will want to purge old mail, say "kgl prune" where they like to get mail that is > n (week/month/year) old deleted from their korgalore imported gmail folders. I have a script like this for IMAP currently that I just run regularly, when I hit this brick wall of storage I guess I can start looking into adding this to kgl unless you beat me to it. Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-22 22:33 ` Linus Walleij @ 2026-01-09 23:31 ` Linus Walleij 2026-01-11 20:15 ` Konstantin Ryabitsev 0 siblings, 1 reply; 32+ messages in thread From: Linus Walleij @ 2026-01-09 23:31 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Mon, Dec 22, 2025 at 11:33 PM Linus Walleij <linusw@kernel.org> wrote: > > You want: > > > > tc:linusw@kernel.org > > > > The following query should do the trick: > > > > lei q -O https://lore.kernel.org/all/ \ > > -o v2:/home/[username]/.local/share/lei/to-me \ > > --dedupe=mid \ > > 'tc:linusw@kernel.org AND d:1.month.ago..' > > > > Then you can add a korgalore lei feed: > > > > [deliveries.to-me] > > feed = 'lei:/home/user/.local/share/lei/to-me' > > target = 'work' > > labels = ['!TO-ME', 'UNREAD', 'STARRED'] > > I like what I see, I will try this out! It works pretty well. I set up a script like this: #!/bin/bash echo "Calling LEI to get mail..." lei q -O https://lore.kernel.org/all/ \ -o v2:${HOME}/.local/share/lei/to-me \ --dedupe=mid \ 'tc:linusw@kernel.org AND d:1.month.ago..' echo "Issue kgl pull to pull it to gmail" kgl pull Looks like this: $ korgalore-lei-fetchmail.sh Calling LEI to get mail... # /usr/bin/curl -gSf -s -d '' https://lore.kernel.org/all/?x=m&q=tc%3Alinusw%40kernel.org+AND+dt%3A20251209232704.. # https://lore.kernel.org/all/ 90/? # https://lore.kernel.org/all/ 163/? # https://lore.kernel.org/all/ 268/? # https://lore.kernel.org/all/ 597/? # https://lore.kernel.org/all/ 708/? # https://lore.kernel.org/all/ 889/? # https://lore.kernel.org/all/ 949/949 # 83 written to /home/linus/.local/share/lei/to-me (949 matches, 866 duplicates) Issue kgl pull to pull it to gmail Updating feeds [####################################] 2/2 Delivering to personal [####################################] 83/83 Pull complete with updates: to-me: 83 I would almost set this up to run as a cron job if it wasn't for the fact that the Googly API wants to reauthenticate every now and then. Other than that it is smooth as butter to work like this! Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-09 23:31 ` Linus Walleij @ 2026-01-11 20:15 ` Konstantin Ryabitsev 2026-01-12 19:52 ` Linus Walleij 0 siblings, 1 reply; 32+ messages in thread From: Konstantin Ryabitsev @ 2026-01-11 20:15 UTC (permalink / raw) To: Linus Walleij; +Cc: Sudeep Holla, tools, users On Sat, Jan 10, 2026 at 12:31:15AM +0100, Linus Walleij wrote: > > > [deliveries.to-me] > > > feed = 'lei:/home/user/.local/share/lei/to-me' > > > target = 'work' > > > labels = ['!TO-ME', 'UNREAD', 'STARRED'] > > > > I like what I see, I will try this out! > > It works pretty well. I set up a script like this: > > #!/bin/bash > > echo "Calling LEI to get mail..." > lei q -O https://lore.kernel.org/all/ \ > -o v2:${HOME}/.local/share/lei/to-me \ > --dedupe=mid \ > 'tc:linusw@kernel.org AND d:1.month.ago..' You only needed to do this once -- there is no need to run this before each pull, kgl will automatically handle updates for lei queries. > I would almost set this up to run as a cron job if it wasn't for the fact that > the Googly API wants to reauthenticate every now and then. Other than > that it is smooth as butter to work like this! I've not actually had to redo my gmail authentication again, but I do hear that it's less smooth for others. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-11 20:15 ` Konstantin Ryabitsev @ 2026-01-12 19:52 ` Linus Walleij 2026-01-12 19:55 ` Bugspray Bot ` (2 more replies) 0 siblings, 3 replies; 32+ messages in thread From: Linus Walleij @ 2026-01-12 19:52 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Sun, Jan 11, 2026 at 9:16 PM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > > I would almost set this up to run as a cron job if it wasn't for the fact that > > the Googly API wants to reauthenticate every now and then. Other than > > that it is smooth as butter to work like this! > > I've not actually had to redo my gmail authentication again, but I do hear > that it's less smooth for others. I've had to do it twice, second time today. About that! What happens when the token expires is this: $ kgl pull (long splat like the one below) $ kgl auth personal Traceback (most recent call last): File "/home/linus/.local/bin/kgl", line 8, in <module> sys.exit(main()) ~~~~^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1485, in __call__ return self.main(*args, **kwargs) ~~~~~~~~~^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1406, in main rv = self.invoke(ctx) File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1873, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 1269, in invoke return ctx.invoke(self.callback, **ctx.params) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/click/core.py", line 824, in invoke return callback(*args, **kwargs) File "/home/linus/.local/lib/python3.14/site-packages/click/decorators.py", line 34, in new_func return f(get_current_context(), *args, **kwargs) File "/home/linus/.local/lib/python3.14/site-packages/korgalore/cli.py", line 619, in auth ts = get_target(ctx, identifier) File "/home/linus/.local/lib/python3.14/site-packages/korgalore/cli.py", line 93, in get_target service = get_gmail_target( identifier=identifier, credentials_file=details.get('credentials', ''), token_file=details.get('token', None) ) File "/home/linus/.local/lib/python3.14/site-packages/korgalore/cli.py", line 146, in get_gmail_target gt = GmailTarget(identifier=identifier, credentials_file=credentials_file, token_file=token_file) File "/home/linus/.local/lib/python3.14/site-packages/korgalore/gmail_target.py", line 43, in __init__ self._load_credentials(credentials_file, token_file) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/korgalore/gmail_target.py", line 69, in _load_credentials self.creds.refresh(Request()) # type: ignore ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/google/oauth2/credentials.py", line 409, in refresh ) = reauth.refresh_grant( ~~~~~~~~~~~~~~~~~~~~^ request, ^^^^^^^^ ...<6 lines>... enable_reauth_refresh=self._enable_reauth_refresh, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/home/linus/.local/lib/python3.14/site-packages/google/oauth2/reauth.py", line 366, in refresh_grant _client._handle_error_response(response_data, retryable_error) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/linus/.local/lib/python3.14/site-packages/google/oauth2/_client.py", line 69, in _handle_error_response raise exceptions.RefreshError( error_details, response_data, retryable=retryable_error ) google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'}) This isn't very pretty, the reason is that korgalore seems to have no idea about overwriting an existing authentication token. Some try-catch thingie is needed here, right? If it's hard for you to reproduce I can try to do some Python hacking the next time it happens. You have to manually do this: rm .config/korgalore/gmail-personal-token.json linus@Fecusia:~$ kgl auth personal critical: Log in to Gmail account for personal Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?Authenticated target: personal (type: gmail) (...) Authentication complete. Maybe this could be made more smooth, as in prompting: "Do you want to delete your old expired access token and get a new one?" Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-12 19:52 ` Linus Walleij @ 2026-01-12 19:55 ` Bugspray Bot 2026-01-12 20:49 ` Konstantin Ryabitsev 2026-01-13 13:03 ` Sudeep Holla 2 siblings, 0 replies; 32+ messages in thread From: Bugspray Bot @ 2026-01-12 19:55 UTC (permalink / raw) To: tools, bugs, users, konstantin, sudeep.holla, linusw Hello: This conversation is now tracked by Kernel.org Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=220969 There is no need to do anything else, just keep talking. -- Deet-doot-dot, I am a bot. Kernel.org Bugzilla (bugspray 0.1-dev) ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-12 19:52 ` Linus Walleij 2026-01-12 19:55 ` Bugspray Bot @ 2026-01-12 20:49 ` Konstantin Ryabitsev 2026-01-13 13:03 ` Sudeep Holla 2 siblings, 0 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2026-01-12 20:49 UTC (permalink / raw) To: Linus Walleij; +Cc: Sudeep Holla, tools, users On Mon, Jan 12, 2026 at 08:52:45PM +0100, Linus Walleij wrote: > > I've not actually had to redo my gmail authentication again, but I do hear > > that it's less smooth for others. > > I've had to do it twice, second time today. > > About that! > > What happens when the token expires is this: > > $ kgl pull > (long splat like the one below) I just pushed a fix for this -- please pull the latest master. It won't fix the invalidation problem, but it will hopefully die nicer now. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-12 19:52 ` Linus Walleij 2026-01-12 19:55 ` Bugspray Bot 2026-01-12 20:49 ` Konstantin Ryabitsev @ 2026-01-13 13:03 ` Sudeep Holla 2026-01-13 15:52 ` Konstantin Ryabitsev 2026-01-13 17:29 ` Rob Herring 2 siblings, 2 replies; 32+ messages in thread From: Sudeep Holla @ 2026-01-13 13:03 UTC (permalink / raw) To: Linus Walleij; +Cc: Konstantin Ryabitsev, Sudeep Holla, tools, users Hi Linus, Thanks for reporting this, I have been postponing it for a while. On Mon, Jan 12, 2026 at 08:52:45PM +0100, Linus Walleij wrote: > On Sun, Jan 11, 2026 at 9:16 PM Konstantin Ryabitsev > <konstantin@linuxfoundation.org> wrote: > > > > I would almost set this up to run as a cron job if it wasn't for the fact that > > > the Googly API wants to reauthenticate every now and then. Other than > > > that it is smooth as butter to work like this! > > > > I've not actually had to redo my gmail authentication again, but I do hear > > that it's less smooth for others. > > I've had to do it twice, second time today. > > About that! > For me, it's most 1 week and I can see that it matches the expiry in the token. > What happens when the token expires is this: > > $ kgl pull > (long splat like the one below) > Yes I too get the same if the token has expired. [...] > > This isn't very pretty, the reason is that korgalore seems to have no idea > about overwriting an existing authentication token. > > Some try-catch thingie is needed here, right? If it's hard for you to reproduce > I can try to do some Python hacking the next time it happens. > > You have to manually do this: > > rm .config/korgalore/gmail-personal-token.json Indeed, I do this too. > linus@Fecusia:~$ kgl auth personal > critical: Log in to Gmail account for personal > Please visit this URL to authorize this application: > https://accounts.google.com/o/oauth2/auth?Authenticated target: > personal (type: gmail) > (...) > Authentication complete. > > Maybe this could be made more smooth, as in prompting: > "Do you want to delete your old expired access token and get a new one?" > That would be nice. > Yours, > Linus Walleij -- Regards, Sudeep ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-13 13:03 ` Sudeep Holla @ 2026-01-13 15:52 ` Konstantin Ryabitsev 2026-01-14 10:05 ` Sudeep Holla 2026-01-13 17:29 ` Rob Herring 1 sibling, 1 reply; 32+ messages in thread From: Konstantin Ryabitsev @ 2026-01-13 15:52 UTC (permalink / raw) To: Sudeep Holla, Linus Walleij; +Cc: Sudeep Holla, tools, users On Tue, Jan 13, 2026, at 08:03, Sudeep Holla wrote: > For me, it's most 1 week and I can see that it matches the expiry in the > token. Apparently, this is because your project is set as "testing" in the Google Cloud Console. Tokens are issued for a week and then not auto-renewed. If you set your project as "Production", it will be issued for an hour and then auto-renewed (which matches my experience of never having to reauth). I'm told to try this: Go to Google Cloud Console -> APIs & Services -> OAuth consent screen Check "Publishing status" If "Testing", click "Publish App" to move to production You shouldn't need to do verification if the project is marked as internal/personal use. However, the project I'm using for this in my personal Gmail account is old and is grandfathered in a number of things, so I can't test this part out. I may create a Linux Foundation project so we can make this suck less at least for official maintainers. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-13 15:52 ` Konstantin Ryabitsev @ 2026-01-14 10:05 ` Sudeep Holla 0 siblings, 0 replies; 32+ messages in thread From: Sudeep Holla @ 2026-01-14 10:05 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Linus Walleij, Sudeep Holla, tools, users On Tue, Jan 13, 2026 at 10:52:08AM -0500, Konstantin Ryabitsev wrote: > On Tue, Jan 13, 2026, at 08:03, Sudeep Holla wrote: > > For me, it's most 1 week and I can see that it matches the expiry in the > > token. > > Apparently, this is because your project is set as "testing" in the Google > Cloud Console. Tokens are issued for a week and then not auto-renewed. If > you set your project as "Production", it will be issued for an hour and then > auto-renewed (which matches my experience of never having to reauth). > > I'm told to try this: > Go to Google Cloud Console -> APIs & Services -> OAuth consent screen > Check "Publishing status" > If "Testing", click "Publish App" to move to production > > You shouldn't need to do verification if the project is marked as > internal/personal use. However, the project I'm using for this in my > personal Gmail account is old and is grandfathered in a number of things, so > I can't test this part out. > It does not appear to be trivial. It seems that verification is required to publish, and I am missing something that is preventing me from completing the verification. > I may create a Linux Foundation project so we can make this suck less at least for official maintainers. > I see you have already done this, will give that a try and see. Thanks! -- Regards, Sudeep ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-13 13:03 ` Sudeep Holla 2026-01-13 15:52 ` Konstantin Ryabitsev @ 2026-01-13 17:29 ` Rob Herring 2026-01-13 17:41 ` Konstantin Ryabitsev 2026-01-15 17:27 ` Sudeep Holla 1 sibling, 2 replies; 32+ messages in thread From: Rob Herring @ 2026-01-13 17:29 UTC (permalink / raw) To: Sudeep Holla Cc: Linus Walleij, Konstantin Ryabitsev, Sudeep Holla, tools, users On Tue, Jan 13, 2026 at 7:11 AM Sudeep Holla <sudeep.holla@arm.com> wrote: > > Hi Linus, > > Thanks for reporting this, I have been postponing it for a while. > > On Mon, Jan 12, 2026 at 08:52:45PM +0100, Linus Walleij wrote: > > On Sun, Jan 11, 2026 at 9:16 PM Konstantin Ryabitsev > > <konstantin@linuxfoundation.org> wrote: > > > > > > I would almost set this up to run as a cron job if it wasn't for the fact that > > > > the Googly API wants to reauthenticate every now and then. Other than > > > > that it is smooth as butter to work like this! > > > > > > I've not actually had to redo my gmail authentication again, but I do hear > > > that it's less smooth for others. > > > > I've had to do it twice, second time today. > > > > About that! > > > > For me, it's most 1 week and I can see that it matches the expiry in the > token. > > > What happens when the token expires is this: > > > > $ kgl pull > > (long splat like the one below) > > > > Yes I too get the same if the token has expired. In case you missed the earlier discussion, you can also just use IMAP with gmail and avoid all this. I just moved over to IMAP and it works fine. The only limitation I see is you can't set multiple labels on a message if you wanted to do that. I only used multiple labels for the UNREAD label, but that seems unnecessary for IMAP. Rob ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-13 17:29 ` Rob Herring @ 2026-01-13 17:41 ` Konstantin Ryabitsev 2026-01-15 17:27 ` Sudeep Holla 1 sibling, 0 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2026-01-13 17:41 UTC (permalink / raw) To: Rob Herring; +Cc: Sudeep Holla, Linus Walleij, Sudeep Holla, tools, users On Tue, Jan 13, 2026 at 11:29:02AM -0600, Rob Herring wrote: > In case you missed the earlier discussion, you can also just use IMAP > with gmail and avoid all this. I just moved over to IMAP and it works > fine. The only limitation I see is you can't set multiple labels on a > message if you wanted to do that. I only used multiple labels for the > UNREAD label, but that seems unnecessary for IMAP. It does work, but I'm getting strong vibes that Google is slowly eliminating features for its non-Workspace users. While there is no indication that Gmail's IMAP functionality is endangered yet, it wouldn't shock me if this is restricted to commercial users at some point. Gmail's API does work well, it's just a pain to set up against plain Gmail because you have to jump through 20 hoops to get API access to your own inbox. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2026-01-13 17:29 ` Rob Herring 2026-01-13 17:41 ` Konstantin Ryabitsev @ 2026-01-15 17:27 ` Sudeep Holla 1 sibling, 0 replies; 32+ messages in thread From: Sudeep Holla @ 2026-01-15 17:27 UTC (permalink / raw) To: Rob Herring Cc: Linus Walleij, Konstantin Ryabitsev, Sudeep Holla, tools, users On Tue, Jan 13, 2026 at 11:29:02AM -0600, Rob Herring wrote: > On Tue, Jan 13, 2026 at 7:11 AM Sudeep Holla <sudeep.holla@arm.com> wrote: > > > > Hi Linus, > > > > Thanks for reporting this, I have been postponing it for a while. > > > > On Mon, Jan 12, 2026 at 08:52:45PM +0100, Linus Walleij wrote: > > > On Sun, Jan 11, 2026 at 9:16 PM Konstantin Ryabitsev > > > <konstantin@linuxfoundation.org> wrote: > > > > > > > > I would almost set this up to run as a cron job if it wasn't for the fact that > > > > > the Googly API wants to reauthenticate every now and then. Other than > > > > > that it is smooth as butter to work like this! > > > > > > > > I've not actually had to redo my gmail authentication again, but I do hear > > > > that it's less smooth for others. > > > > > > I've had to do it twice, second time today. > > > > > > About that! > > > > > > > For me, it's most 1 week and I can see that it matches the expiry in the > > token. > > > > > What happens when the token expires is this: > > > > > > $ kgl pull > > > (long splat like the one below) > > > > > > > Yes I too get the same if the token has expired. > > In case you missed the earlier discussion, you can also just use IMAP > with gmail and avoid all this. I just moved over to IMAP and it works > fine. The only limitation I see is you can't set multiple labels on a > message if you wanted to do that. I only used multiple labels for the > UNREAD label, but that seems unnecessary for IMAP. I had missed that discussion. I will give that(IMAP) a try too just to see which works better for me. Thanks for pointing that out. I saw the discussion in the thread now. -- Regards, Sudeep ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-19 0:38 ` Konstantin Ryabitsev 2025-12-20 20:56 ` Linus Walleij @ 2025-12-22 14:02 ` Linus Walleij 2025-12-22 15:11 ` Linus Walleij 2025-12-22 15:23 ` Konstantin Ryabitsev 1 sibling, 2 replies; 32+ messages in thread From: Linus Walleij @ 2025-12-22 14:02 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users I don't know if I'm doing something wrong but all imported mails appear as "read" (non-bold). In the code there is: DEFAULT_LABELS: List[str] = ['INBOX', 'UNREAD'] so it appears the "UNREAD" labels was intended to be applied, but it appears this isn't used? Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-22 14:02 ` Linus Walleij @ 2025-12-22 15:11 ` Linus Walleij 2025-12-22 15:23 ` Konstantin Ryabitsev 1 sibling, 0 replies; 32+ messages in thread From: Linus Walleij @ 2025-12-22 15:11 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Mon, Dec 22, 2025 at 3:02 PM Linus Walleij <linusw@kernel.org> wrote: > I don't know if I'm doing something wrong but all imported > mails appear as "read" (non-bold). > > In the code there is: > DEFAULT_LABELS: List[str] = ['INBOX', 'UNREAD'] > > so it appears the "UNREAD" labels was intended to be applied, > but it appears this isn't used? This naive patch makes my imported messages unread: $ git diff diff --git a/src/korgalore/gmail_target.py b/src/korgalore/gmail_target.py index eba025465f25..8e2fe3affea1 100644 --- a/src/korgalore/gmail_target.py +++ b/src/korgalore/gmail_target.py @@ -150,6 +150,7 @@ class GmailTarget: message_body: Dict[str, Any] = {'raw': encoded_message} if labels: + labels.append("UNREAD") label_ids = self.translate_labels(labels) message_body['labelIds'] = label_ids Yours, Linus Walleij ^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-22 14:02 ` Linus Walleij 2025-12-22 15:11 ` Linus Walleij @ 2025-12-22 15:23 ` Konstantin Ryabitsev 2025-12-22 22:28 ` Linus Walleij 1 sibling, 1 reply; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-22 15:23 UTC (permalink / raw) To: Linus Walleij; +Cc: Sudeep Holla, tools, users On Mon, Dec 22, 2025 at 03:02:02PM +0100, Linus Walleij wrote: > I don't know if I'm doing something wrong but all imported > mails appear as "read" (non-bold). > > In the code there is: > DEFAULT_LABELS: List[str] = ['INBOX', 'UNREAD'] > > so it appears the "UNREAD" labels was intended to be applied, > but it appears this isn't used? Do you have any labels defined for your delivery? E.g.: [deliveries.lkml] feed = 'lkml' target = 'work' labels = ['Lists/LKML'] By default, this doesn't set UNREAD as a label (because you may not want that if you're just dumping a copy of a big list somewhere). If you change that to: labels = ['Lists/LKML', 'UNREAD'] that should do the trick. I can document this better if that helps. -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-22 15:23 ` Konstantin Ryabitsev @ 2025-12-22 22:28 ` Linus Walleij 0 siblings, 0 replies; 32+ messages in thread From: Linus Walleij @ 2025-12-22 22:28 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, tools, users On Mon, Dec 22, 2025 at 4:23 PM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > Do you have any labels defined for your delivery? E.g.: > > [deliveries.lkml] > feed = 'lkml' > target = 'work' > labels = ['Lists/LKML'] > > By default, this doesn't set UNREAD as a label (because you may not want that > if you're just dumping a copy of a big list somewhere). If you change that to: > > labels = ['Lists/LKML', 'UNREAD'] > > that should do the trick. > > I can document this better if that helps. AHa I get it. I understand that the Gmail internal representation of an unread mail is to label it "UNREAD". I have been using the same through Gmails IMAP and there it translates into a flag called "Seen" instead. IMO from a user experience PoV adding the "UNREAD" label in the config file is confusing, you are importing mail you haven't seen before and by definition it is unread, so I kind of feel the gmail target should just add this to anything it brings in instead of having the user handle this footgun, but it's maybe just me? Yours, Linus Walleij ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 20:47 ` Konstantin Ryabitsev 2025-12-18 22:41 ` Linus Walleij @ 2025-12-19 18:54 ` Sudeep Holla 2025-12-19 19:20 ` Konstantin Ryabitsev 1 sibling, 1 reply; 32+ messages in thread From: Sudeep Holla @ 2025-12-19 18:54 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: Sudeep Holla, Linus Walleij, tools, users On Thu, Dec 18, 2025 at 03:47:53PM -0500, Konstantin Ryabitsev wrote: > On Thu, Dec 18, 2025 at 06:51:34PM +0000, Sudeep Holla wrote: > > > > File "/home/linus/.local/lib/python3.14/site-packages/korgalore/pi_feed.py", > > > > line 386, in feed_lock > > > > lockfh = open(lock_file_path, 'w') > > > > FileNotFoundError: [Errno 2] No such file or directory: > > > > '/home/linus/.local/share/korgalore/lkml/korgalore.lock' > > > > > > Ouch. Yeah, this should fix it for you while I push out a better fix: > > > > > > mkdir -p /home/linus/.local/share/korgalore/lkml > > > > I am facing a similar issue where kgl yank works but kgl pull fails > > slightly in a different way. > > I started it with kgl, version 0.2.1 > > Oh no, this is what happens when I don't check adding new feeds after a major > refactor. I think it's working correctly now in 0.2.2 -- please check! > Thanks for the fix. I can see the pull doesn't give any errors but it doesn't seem to push anything to my gmail label. The settings should be fine as yank is working just fine. Or am I missing a step after `kgl pull` to push it. Sorry for the big log attached below. When using `kgl pull`, I don't see "debug: Connecting to Gmail service for linux debug: Uploading: ...." I have also added my config file with feed urls at the end. I have chosen lists that I have not subscribe to in order to avoid any confusion. I did try to yank a thread that is already in my gmail mbox, it worked correctly by adding the label in my yank command in addition to the labels that were already present. -- Regards, Sudeep -->8 $kgl -v DEBUG pull debug: Loading config from /.config/korgalore/korgalore.toml debug: Config loaded with 1 targets, 4 deliveries, and 4 feeds debug: Data directory: /.local/share/korgalore debug: Mapping deliveries to their feeds and targets debug: Resolved feed "lkml" to URL: https://lore.kernel.org/lkml debug: Resolved feed "kvm" to URL: https://lore.kernel.org/kvm debug: Resolved feed "br" to URL: https://lore.kernel.org/buildroot debug: Resolved feed "mm" to URL: https://lore.kernel.org/linux-mm debug: Acquired lock for feed '/.local/share/korgalore/lkml'. debug: Acquired lock for feed '/.local/share/korgalore/kvm'. debug: Acquired lock for feed '/.local/share/korgalore/buildroot'. debug: Acquired lock for feed '/.local/share/korgalore/linux-mm'. debug: No failed commits to retry for delivery: lkml debug: No failed commits to retry for delivery: kvm debug: No failed commits to retry for delivery: br debug: No failed commits to retry for delivery: mm debug: No failed commits to retry for any delivery. debug: Highest local epoch: 18 debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git fetch origin --shallow-since=1.week.ago --update-shallow debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git symbolic-ref -q HEAD debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git rev-list -n 1 master debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git rev-list -n 1 master debug: Highest remote epoch: 18 debug: No new epochs detected for feed /.local/share/korgalore/lkml debug: No new epochs found for feed: /.local/share/korgalore/kvm debug: No new epochs found for feed: /.local/share/korgalore/buildroot debug: Highest local epoch: 2 debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git fetch origin --shallow-since=1.week.ago --update-shallow debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git symbolic-ref -q HEAD debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git rev-list -n 1 master debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git rev-list -n 1 master debug: Highest remote epoch: 2 debug: No new epochs detected for feed /.local/share/korgalore/linux-mm debug: Updated feeds: lkml, linux-mm debug: Deliveries to run: lkml, mm debug: Processing deliveries for target: linux debug: Highest known epoch for delivery lkml: 18 debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git cat-file -e 81e8636295121b0fc8eec4b428a77f7816450d53^ debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git rev-list --reverse --ancestry-path 81e8636295121b0fc8eec4b428a77f7816450d53..HEAD debug: Initializing new state file for delivery: mm debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git rev-list -n 1 master debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git show -s --format=%ci a8420ba669a277854d33fcfb070b935a2d3f58cb debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git show a8420ba669a277854d33fcfb070b935a2d3f58cb:m debug: Highest known epoch for delivery mm: 2 debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git cat-file -e a8420ba669a277854d33fcfb070b935a2d3f58cb^ debug: Running git command: git -C /.local/share/korgalore/linux-mm/git/2.git rev-list --reverse --ancestry-path a8420ba669a277854d33fcfb070b935a2d3f58cb..HEAD debug: No new commits for delivery: mm debug: Delivering 1 messages to target: linux debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git show ba387a13f1918fbd9bf2ccdea11d5184c6c1774f:m debug: Connecting to Gmail service for linux debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git show ba387a13f1918fbd9bf2ccdea11d5184c6c1774f:m debug: -> Re: [PATCH v5 02/36] compiler-context-analysis: Add infrastructure for Context Analysis with Clang debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git show -s --format=%ci ba387a13f1918fbd9bf2ccdea11d5184c6c1774f debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git show ba387a13f1918fbd9bf2ccdea11d5184c6c1774f:m debug: Released lock for feed '/.local/share/korgalore/lkml'. debug: Released lock for feed '/.local/share/korgalore/kvm'. debug: Released lock for feed '/.local/share/korgalore/buildroot'. debug: Released lock for feed '/.local/share/korgalore/linux-mm'. Pull complete with updates: lkml: 1 -->8 $kgl -v DEBUG yank --thread https://lore.kernel.org/buildroot/20251219175141.1907408-1-bernd@kuhls.net -l LINUX/TEST debug: Loading config from /.config/korgalore/korgalore.toml debug: Config loaded with 1 targets, 4 deliveries, and 4 feeds debug: Data directory: /.local/share/korgalore debug: No target specified, using first target: linux debug: Fetching thread: https://lore.kernel.org/buildroot/20251219175141.1907408-1-bernd@kuhls.net debug: Fetching thread from: https://lore.kernel.org/all/20251219175141.1907408-1-bernd@kuhls.net/t.mbox.gz debug: Mailsplitting the mbox into /tmp/tmpz1xoy3rd-mailsplit debug: Running git command: git mailsplit --mboxrd -o/tmp/tmpz1xoy3rd-mailsplit debug: Parsed 23 messages from thread Found 23 messages in thread debug: Connecting to Gmail service for linux debug: Uploading: [Buildroot] [PATCH v4 13/20] package/qjson: remove package debug: Uploading: [Buildroot] [PATCH v4 02/20] package/dmraid: remove package debug: Uploading: Re: [Buildroot] [PATCH v4 11/20] package/openpowerlink: remove package debug: Uploading: [Buildroot] [PATCH v4 08/20] package/libiqrf: remove package debug: Uploading: [Buildroot] [PATCH v4 00/20] Remove packages debug: Uploading: [Buildroot] [PATCH v4 11/20] package/openpowerlink: remove package debug: Uploading: [Buildroot] [PATCH v4 06/20] package/let-me-create: remove package debug: Uploading: [Buildroot] [PATCH v4 12/20] package/opentracing-cpp: remove package debug: Uploading: [Buildroot] [PATCH v4 01/20] package/libnids: remove package debug: Uploading: [Buildroot] [PATCH v4 19/20] package/python-aioredis: remove package debug: Uploading: [Buildroot] [PATCH v4 17/20] package/musepack: remove package debug: Uploading: [Buildroot] [PATCH v4 04/20] package/connman-gtk: remove package debug: Uploading: [Buildroot] [PATCH v4 10/20] package/alure: remove package debug: Uploading: [Buildroot] [PATCH v4 18/20] package/libcuefile: remove package debug: Uploading: [Buildroot] [PATCH v4 16/20] package/racehound: remove package debug: Uploading: [Buildroot] [PATCH v4 05/20] package/hawktracer: remove package debug: Uploading: [Buildroot] [PATCH v4 20/20] package/cppdb: remove package debug: Uploading: [Buildroot] [PATCH v4 07/20] package/libcgi: remove package debug: Uploading: [Buildroot] [PATCH v4 09/20] package/libuwsc: remove package debug: Uploading: [Buildroot] [PATCH v4 03/20] package/libmhash: remove package debug: Uploading: Re: [Buildroot] [PATCH v4 10/20] package/alure: remove package debug: Uploading: [Buildroot] [PATCH v4 15/20] package/taskd: remove package debug: Uploading: [Buildroot] [PATCH v4 14/20] package/sconeserver: remove package -->8 .config/korgalore/korgalore.toml ### Feeds ### [feeds.lkml] url = 'https://lore.kernel.org/lkml' [feeds.kvm] url = 'https://lore.kernel.org/kvm' [feeds.br] url = 'https://lore.kernel.org/buildroot' [feeds.mm] url = 'https://lore.kernel.org/linux-mm' ### Deliveries ### [deliveries.lkml] feed = 'lkml' target = 'linux' labels = ['LINUX/LKML'] [deliveries.kvm] feed = 'kvm' target = 'linux' labels = ['LINUX/TEST'] [deliveries.br] feed = 'br' target = 'linux' labels = ['LINUX/TEST'] [deliveries.mm] feed = 'mm' target = 'linux' labels = ['LINUX/TEST'] ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-19 18:54 ` Sudeep Holla @ 2025-12-19 19:20 ` Konstantin Ryabitsev 0 siblings, 0 replies; 32+ messages in thread From: Konstantin Ryabitsev @ 2025-12-19 19:20 UTC (permalink / raw) To: Sudeep Holla; +Cc: Linus Walleij, tools, users On Fri, Dec 19, 2025 at 06:54:37PM +0000, Sudeep Holla wrote: > > Oh no, this is what happens when I don't check adding new feeds after a major > > refactor. I think it's working correctly now in 0.2.2 -- please check! > > > Thanks for the fix. I can see the pull doesn't give any errors but it doesn't > seem to push anything to my gmail label. On the first run, or on all subsequent runs? It only initializes the feed on the first run, but the ones after that should result in mails being imported. I see the following in your log output for pull > debug: Connecting to Gmail service for linux > debug: Running git command: git -C /.local/share/korgalore/lkml/git/18.git show ba387a13f1918fbd9bf2ccdea11d5184c6c1774f:m > debug: -> Re: [PATCH v5 02/36] compiler-context-analysis: Add infrastructure for Context Analysis with Clang > [...] > Pull complete with updates: > lkml: 1 So, that message was for sure uploaded to your gmail account. Since it's LKML, it gets upwards of a few thousand messages a day, so you will definitely notice if it's working or not after a few "pull" runs. :) > I have also added my config file with feed urls at the end. I have chosen > lists that I have not subscribe to in order to avoid any confusion. That's an important thing to remember with Gmail -- if you already have that message *somewhere* in your inbox, Gmail will quietly drop the import. So, if you don't see it in your LINUX/LKML label, that means you probably already had that message. Let me know if that helps! -K ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-17 15:21 korgalore v0.2 released with JMAP, IMAP, Maildir support Konstantin Ryabitsev 2025-12-17 17:50 ` Jason A. Donenfeld 2025-12-18 0:24 ` Linus Walleij @ 2025-12-18 13:40 ` Rob Herring 2025-12-18 13:51 ` Rob Herring 2 siblings, 1 reply; 32+ messages in thread From: Rob Herring @ 2025-12-18 13:40 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: tools, users On Wed, Dec 17, 2025 at 9:26 AM Konstantin Ryabitsev <konstantin@linuxfoundation.org> wrote: > > Hello: > > TL;DR: korgalore 0.2 adds support for multiple delivery targets beyond Gmail: > JMAP (Fastmail), generic IMAP, and local maildir. > > Docs are here: > https://korgalore.docs.kernel.org/en/v0.2/ > > What's new in 0.2 > ----------------- > > New delivery targets: > > - JMAP support: works with Fastmail and, potentially, other JMAP-compatible > providers. Uses bearer token authentication, so no OAuth dance required -- > just generate an API token in your provider's settings. > - Generic IMAP: works with any IMAP server over SSL. Simple password or > password_file authentication. Is there any reason to use the GMail API over IMAP access? My understanding is only the POP3 client in GMail to pull messages from another server is going away. I ask because the GMail magic was all working until yesterday. Now I get a splat with this: google.auth.exceptions.RefreshError: ('invalid_grant: Token has been expired or revoked.', {'error': 'invalid_grant', 'error_description': 'Token has been expired or revoked.'}) I upgraded korgalore yesterday, but I don't think it is due to that. I think it is some 7 day expiration for "apps" in testing based on searches with that error. But I don't see anything in the dashboard saying it's expired or revoked. Does "my app" need to be in production? Google says that requires some verification, so I didn't try that. Confused... Rob ^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: korgalore v0.2 released with JMAP, IMAP, Maildir support 2025-12-18 13:40 ` Rob Herring @ 2025-12-18 13:51 ` Rob Herring 0 siblings, 0 replies; 32+ messages in thread From: Rob Herring @ 2025-12-18 13:51 UTC (permalink / raw) To: Konstantin Ryabitsev; +Cc: tools, users On Thu, Dec 18, 2025 at 7:40 AM Rob Herring <robh@kernel.org> wrote: > > On Wed, Dec 17, 2025 at 9:26 AM Konstantin Ryabitsev > <konstantin@linuxfoundation.org> wrote: > > > > Hello: > > > > TL;DR: korgalore 0.2 adds support for multiple delivery targets beyond Gmail: > > JMAP (Fastmail), generic IMAP, and local maildir. > > > > Docs are here: > > https://korgalore.docs.kernel.org/en/v0.2/ > > > > What's new in 0.2 > > ----------------- > > > > New delivery targets: > > > > - JMAP support: works with Fastmail and, potentially, other JMAP-compatible > > providers. Uses bearer token authentication, so no OAuth dance required -- > > just generate an API token in your provider's settings. > > - Generic IMAP: works with any IMAP server over SSL. Simple password or > > password_file authentication. > > Is there any reason to use the GMail API over IMAP access? My > understanding is only the POP3 client in GMail to pull messages from > another server is going away. > > I ask because the GMail magic was all working until yesterday. Now I > get a splat with this: > > google.auth.exceptions.RefreshError: ('invalid_grant: Token has been > expired or revoked.', {'error': 'invalid_grant', 'error_description': > 'Token has been expired or revoked.'}) > > I upgraded korgalore yesterday, but I don't think it is due to that. I > think it is some 7 day expiration for "apps" in testing based on > searches with that error. But I don't see anything in the dashboard > saying it's expired or revoked. Does "my app" need to be in > production? Google says that requires some verification, so I didn't > try that. Confused... Now it works after this: rm ~/.config/korgalore/gmail-personal-token.json kgl auth Maybe this is a quirk of app in testing and I should change it to production? Or I just do the above once a week... Rob ^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2026-01-15 17:27 UTC | newest] Thread overview: 32+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-12-17 15:21 korgalore v0.2 released with JMAP, IMAP, Maildir support Konstantin Ryabitsev 2025-12-17 17:50 ` Jason A. Donenfeld 2025-12-17 18:14 ` Konstantin Ryabitsev 2025-12-18 0:24 ` Linus Walleij 2025-12-18 1:57 ` Konstantin Ryabitsev 2025-12-18 2:42 ` Konstantin Ryabitsev 2025-12-18 18:51 ` Sudeep Holla 2025-12-18 20:47 ` Konstantin Ryabitsev 2025-12-18 22:41 ` Linus Walleij 2025-12-19 0:38 ` Konstantin Ryabitsev 2025-12-20 20:56 ` Linus Walleij 2025-12-22 15:50 ` Konstantin Ryabitsev 2025-12-22 22:33 ` Linus Walleij 2026-01-09 23:31 ` Linus Walleij 2026-01-11 20:15 ` Konstantin Ryabitsev 2026-01-12 19:52 ` Linus Walleij 2026-01-12 19:55 ` Bugspray Bot 2026-01-12 20:49 ` Konstantin Ryabitsev 2026-01-13 13:03 ` Sudeep Holla 2026-01-13 15:52 ` Konstantin Ryabitsev 2026-01-14 10:05 ` Sudeep Holla 2026-01-13 17:29 ` Rob Herring 2026-01-13 17:41 ` Konstantin Ryabitsev 2026-01-15 17:27 ` Sudeep Holla 2025-12-22 14:02 ` Linus Walleij 2025-12-22 15:11 ` Linus Walleij 2025-12-22 15:23 ` Konstantin Ryabitsev 2025-12-22 22:28 ` Linus Walleij 2025-12-19 18:54 ` Sudeep Holla 2025-12-19 19:20 ` Konstantin Ryabitsev 2025-12-18 13:40 ` Rob Herring 2025-12-18 13:51 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox