help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

This is how you import a mailing list archives (e.g. guix-patches) into


From: Mekeor Melire
Subject: This is how you import a mailing list archives (e.g. guix-patches) into mu4e
Date: Wed, 16 Nov 2022 23:04:25 +0000

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!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]