apache / incubator-ponymail

Apache Pony Mail (Incubating) - Email for Ponies & People
http://ponymail.incubator.apache.org/
Other
80 stars 30 forks source link

how can I download a particular message as plan text? #535

Closed pachadotdev closed 3 years ago

pachadotdev commented 3 years ago

Hi

I'm working in the Arrow project and I would like to create an archive of nightly builds results.

For example, I was trying to download this via CURL to save a TXT file https://lists.apache.org/api/source.lua/rf80afab606bb6de300be490633f0a135ac26b139148bbb2c4ec25328@%3Cdev.arrow.apache.org%3E

But, I would like to know how "rf80afab606bb6de300be490633f0a135ac26b139148bbb2c4ec25328" is created there, as I would like to download for a search and create a function that

  1. Gets a string such as "[NIGHTLY] Arrow Build Report for Job nightly-2021-05-24-0"
  2. Based on the string, it gives me the URL with the form /api/source.lua and the TXT file with the contents
sebbASF commented 3 years ago

It looks like all the NIGHTLY build emails go to the builds@arrow list, and there are few/no other emails sent to it. So one approach would be to download the monthly mbox files, e.g. https://lists.apache.org/api/mbox.lua?list=builds@arrow.apache.org&date=2021-5

Otherwise, you will need to use the documented API [1] to do a search, something like

https://lists.apache.org/api/stats.lua?list=builds&domain=arrow.apache.org&emailsOnly&header_subject=NIGHTLY

Adjust the subject and add timespan restrictions as needed.

Then parse the JSON response to extract the id entries to use in the download.

[1]