{"thread":{"id":"57603","subject":"lei + thunderbird recipe","startedAt":"2022-03-23T12:55:41Z","lastAt":"2022-03-23T13:32:58Z","messageCount":2,"participants":["Bagas Sanjaya","Konstantin Ryabitsev"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"451975","messageId":"6cdeed25-9964-909d-376d-024e1385840c@gmail.com","threadId":"57603","inReplyTo":null,"subject":"lei + thunderbird recipe","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2022-03-23T12:55:34Z","receivedAt":"2022-03-23T12:55:41Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"This thread is inspired by Ævar's recipe [1] and Josef Bacik's recipe\n[2].\n\nAs I know that GMail have issues regarding delayed ML message delivery,\nI go trying to use lei to fetch ML messages into Thunderbird.\n\nAfter installing public-inbox (I have to build from public-inbox.org\nsources because there isn't yet official Debian/Ubuntu packages), I\nbegin fetching Git ML messages up until 18 days ago (within\npublic-inbox sources directory):\n\n\tlei q -o \"mboxrd:mbox/git.mbox\" -I https://lore.kernel.org/git\n\t-t 'a:git@vger.kernel.org AND rt:18.days.ago..'\n\nWhy mboxrd instead of Maildir? Because from formats within Mbox family,\nThunderbird uses mboxrd format.\n\nAfter initial fetching, I update the mbox by:\n\n\tlei up mbox/git.mbox\n\nTo automate this, I write simple script:\n\n```\n#!/bin/bash\n\n# replace with directory of your Thunderbird profile\nTHUNDERBIRD_LOCAL=$HOME/.thunderbird/1a14l7jo.default-release/Mail/\"Local Folders\"\nMAILDIR=$HOME/public-inbox/mbox\n# add more mboxes name here if you have one\nMBOXES=\"git\"\n\nfor m in $MBOXES; do\n\techo $m &&\n\t$HOME/public-inbox/local/bin/lei up $MAILDIR/$m.mbox &&\n\tcp $MAILDIR/$m.mbox \"$THUNDERBIRD_LOCAL\"/\ndone\n```\n\nand then set up systemd timer comprising of user service unit:\n\n```\n[Unit]\nDescription=Lei update\nAfter=network.target\n\n[Service]\nType=oneshot\nExecStart=/home/bagas/.bin/lei-up\nRestart=on-failure\n\n[Install]\nWantedBy=default.target\n```\n\nand user timer unit that updates the mbox every 12:00 and 18:00:\n\n```\n[Unit]\nDescription=Lei update timer\n\n[Timer]\nOnCalendar=*-*-* 12:00:00\nOnCalendar=*-*-* 18:00:00\nPersistent=true\nAccuracySec=1s\n\n[Install]\nWantedBy=timers.target\n```\n\nTo fire up the timer, I simply do `systemctl --user enable lei.timer`.\n\nHope this will be useful.\n\n[1]: https://lore.kernel.org/git/220202.86leyt8uly.gmgdl@evledraar.gmail.com/\n[2]: https://josefbacik.github.io/kernel/2021/10/18/lei-and-b4.html\n-- \nAn old man doll... just what I always wanted! - Clara\n"},{"id":"451979","messageId":"20220323133253.55i4sy5fs2zy5ocj@meerkat.local","threadId":"57603","inReplyTo":"6cdeed25-9964-909d-376d-024e1385840c@gmail.com","subject":"Re: lei + thunderbird recipe","fromName":"Konstantin Ryabitsev","fromEmail":"konstantin@linuxfoundation.org","sentAt":"2022-03-23T13:32:53Z","receivedAt":"2022-03-23T13:32:58Z","isPatch":false,"sender":{"key":"konstantin@linuxfoundation.org","avatar":"https://gravatar.com/avatar/7cb8827c6de56e1bd2dea16508c6708aa43feed3bf3813bcdacecdf96ceadd79?d=mp&s=160"},"body":"On Wed, Mar 23, 2022 at 07:55:34PM +0700, Bagas Sanjaya wrote:\n> This thread is inspired by Ævar's recipe [1] and Josef Bacik's recipe\n> [2].\n> \n> As I know that GMail have issues regarding delayed ML message delivery,\n> I go trying to use lei to fetch ML messages into Thunderbird.\n> \n> After installing public-inbox (I have to build from public-inbox.org\n> sources because there isn't yet official Debian/Ubuntu packages), I\n> begin fetching Git ML messages up until 18 days ago (within\n> public-inbox sources directory):\n> \n> \tlei q -o \"mboxrd:mbox/git.mbox\" -I https://lore.kernel.org/git\n> \t-t 'a:git@vger.kernel.org AND rt:18.days.ago..'\n\nIf you are a Thunderbird user, you can also just access\nnntp://nntp.lore.kernel.org/org.kernel.vger.git much to the same effect.\n\nLei is best suited when you're doing complex search queries across multiple\nlists.\n\nBest regards,\n-Konstantin\n\n"}]}