SAIFI writes:

> Now here is a very simple question (please don't tell me maildir,
> scripts dir etc etc, have spent 3+ hrs trawling through website and
> archives).
>
> I have read this discussion thread
> https://yhetil.org/meta/[email protected]/T/#r8d12a02091311f1d8a7eae01dfaf873415d6b439
>
> I use alpine 2.24 and mbox format works great for me and for the 600GB
> mail archives without any problems till date. so 'mbox' it is for me.
>
> As an example, let's consider this mailing list archive.
>
> git clone --mirror http://lore.kernel.org/connman/0 connman/git/0.git
>
> Q: How do i convert the mail content trapped in the git repo to mbox format ?
>
> Is there a solution ? script ? Any pointers ?

Here's a slight variation of the recipe from the link you mentioned.
The main functional difference is that each message is converted to
mboxrd (via mblaze's mexport [1]):

  #!/bin/sh
  
  for commit in $(git -C connman/git/0.git rev-list master)
  do
      git -C connman/git/0.git cat-file blob $commit:m | mexport -
  done >mbox

If you want a one-time import, I think that could work okay, though it
wouldn't work well for augmenting an existing mbox.

Also, if a one-time import is what you're after (particularly with a
small inbox like connman), you could get by with the all.mbox.tar.gz
endpoint:

  $ curl -SfsL https://lore.kernel.org/connman/all.mbox.gz | \
    zcat >conman-mbox

For regular updates from <https://lore.kernel.org/connman>, you might be
interested in trying out lei (new in public-inbox 1.7.0).

  $ lei q -O https://lore.kernel.org/connman -o mboxrd:conman-lei-mbox \
    -a d:30.days.ago..
  # /usr/bin/curl -Sf -s -d '' 
https://lore.kernel.org/connman/?x=m&q=dt%3A20211213023449..
  # https://lore.kernel.org/connman/ 14/14
  # 14 written to conman-lei-mbox (14 matches)

  $ lei up conman-lei-mbox

[1] https://git.vuxu.org/mblaze/about/

Reply via email to