Ricardo Wurmus <rek...@elephly.net> writes:
> Forking Mu requires a rough understanding how it currently works. > Obviously, it must parse emails and extract certain headers. We only > need it to extract a few more headers such as “X-Debbugs-Envelope-To”, > which contains the Debbugs bug number. (I don’t know if that header is > set for *all* emails that end up in the bug tracker, but that’s > something we have to figure out.) > > Mu is written in C and the header extraction probably happens in the C > code as well. I forked Mu and let it store the “X-Debbugs-Envelope-To” header in the database: https://git.elephly.net/?p=software/mumimu.git;a=shortlog;h=refs/heads/mumimu The “bugid” query can be used to quickly retrieve messages belonging to a certain Debbugs bug, so something like this will print the message subject for all messages relating to bug 31023. (use-modules (mumimu)) (mu:initialize (%config 'mail-dir)) (for-each (lambda (msg) (pk (mu:subject msg))) (mu:message-list "bugid:31023")) This seems to actually work. Still don’t know if all emails actually have that header; if they don’t we’ll need to implement an alternative way to get the bug number in “get_bugid” (lib/mu-msg-file.c). -- Ricardo