unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* This is how you import a mailing list archives (e.g. guix-patches) into mu4e
@ 2022-11-16 23:04 Mekeor Melire
  2022-11-16 23:22 ` jbranso
  2022-12-05  8:45 ` zimoun
  0 siblings, 2 replies; 15+ messages in thread
From: Mekeor Melire @ 2022-11-16 23:04 UTC (permalink / raw)
  To: help-guix

Hello Guix,

you might want to import a mailing-list-archive into mu4e. E.g. because
debbugs.el is slow, you might want to import the archives of the
guix-patches mailing list. This is how to do so.

First, download the archives as in the "mbox" format -- the only format
that Mailman offers:

--8<---------------cut here---------------start------------->8---
cd ~/some/where
for y in {2017..2022}; do
    for m in {01..12}; do
        curl --fail "https://lists.gnu.org/archive/mbox/guix-patches/$y-$m" > "$y-$m" || rm "$y-$m";
    done;
done
--8<---------------cut here---------------end--------------->8---

Now, download and run a perl-tool named "mb2md" to convert the mboxes
into maildirs:

--8<---------------cut here---------------start------------->8---
mkdir tool maildir
curl http://batleth.sapienti-sat.org/projects/mb2md/mb2md-3.20.pl.gz \
    --output tool/mb2md.pl.gz
gzip -d tool/mb2md.pl.gz
chmod 755 tool/mb2md.pl
guix shell perl perl-datetime perl-timedate
for f in $(realpath ./mbox)/*; do
    perl tool/mb2md.pl -s "$f" -d $(realpath mailbox);
done
exit
--8<---------------cut here---------------end--------------->8---

Next, you might want to mark all mails in that maildir as "read":

--8<---------------cut here---------------start------------->8---
guix shell mblaze
mlist -s ./mailbox | mflag -S
exit
--8<---------------cut here---------------end--------------->8---

Finally, move that maildir to its destination:

--8<---------------cut here---------------start------------->8---
mv maildir ~/path/to/maildirs/guix-patches
--8<---------------cut here---------------end--------------->8---

Enjoy!


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-12-07 11:25 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 23:04 This is how you import a mailing list archives (e.g. guix-patches) into mu4e Mekeor Melire
2022-11-16 23:22 ` jbranso
2022-11-16 23:41   ` Mekeor Melire
2022-12-04 20:16     ` Mekeor Melire
2022-12-05 15:39       ` Joshua Branson
2022-12-05  8:45 ` zimoun
2022-12-05 21:43   ` Mekeor Melire
2022-12-06 11:33     ` zimoun
2022-12-07  2:27       ` Mekeor Melire
2022-12-07 10:33         ` zimoun
2022-12-06  1:03   ` Kyle Meyer
2022-12-06 12:03     ` zimoun
2022-12-07  2:02       ` Kyle Meyer
2022-12-07 10:38         ` zimoun
2022-12-07  2:19     ` Mekeor Melire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).