Jan. 27, 2025
9:04 p.m.
I'm working on an update to a portion of my team's application. It retrieves the held messages from Mailman and returns them to the client so that our admins can approve/reject them. At the moment it works as intended, but displays far too much information because Mailman is returning the entire email, with headers (see below).
I've found some libraries which can parse the message property and extract the relevant bits, but I'd rather pass some sort of flag or filter to the initial Mailman 3 API call and get back less information. I've looked through the documentation but I'm not finding anything of the sort. Would this be useful?
{
"request_id": "1",
"original_size": 855,
"sender": "dev@email.org",
"subject": "Testing one two three",
"hold_date": new Date(),
"msg": "Received: from [127.0.0.1] (localhost [127.0.0.1])\n\t(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)\n\t(No client certificate requested)\n\t(Authenticated sender: dev@email.org)\n\tby mailman.default.svc.cluster.local (Postfix) with ESMTPSA id A48A33E9849\n\tfor <abc-announce@email.org>; Thu, 23 Jan 2025 21:24:11 +0000 (UTC)\nMessage-ID: <3ecbaccf-f65a-4ce5-bdfa-e08b5659dc32@email.org>\nDate: Thu, 23 Jan 2025 15:24:11 -0600\nMIME-Version: 1.0\nUser-Agent: Mozilla Thunderbird\nContent-Language: en-US\nTo: abc-announce@email.org\nFrom: Dev Tester <dev@email.org>\nSubject: Testing one two three\nContent-Type: text/plain; charset=UTF-8; format=flowed\nContent-Transfer-Encoding: 7bit\nX-MailFrom: dev@email.org\nX-Mailman-Rule-Hits: nonmember-moderation\nX-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation\nMessage-ID-Hash: XM4OS47LU7DRYIO74WB5K4W345NPZ37O\nX-Message-ID-Hash: XM4OS47LU7DRYIO74WB5K4W345NPZ37O\n\nThis is a single line message body.\n\n"
}