LR_GETBODY.IN(1)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’Œ LR_GETBODY.IN(1) β€” bestie's guide to lr_getbody πŸ’Œ

okay so. this is the manual for lr_getbody, from LogReport's Lire documentation, and honestly? she's a little workhorse and she deserves her flowers. 🌸 basically she's the one who digs file, sender, and subject info out of an email. slay.


✨ SYNOPSIS ✨

eval `lr_getbody [-c content-type] <messagefile>`

like, literally just that. backticks and all. eval is doing the heavy lifting here, don't @ me. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

so lr_getbody reads an email message on stdin (or, y'know, if you pass it as an argument, that works too, she's flexible like that πŸ¦‹). then she extracts:

  • the submitter address
  • the subject

and also the biggest attachment β€” or, lowkey, the first one whose content-type matches whatever you passed to the content-type argument. main character attachment energy. πŸ‘‘

she hands all this info back to the caller by printing it in a format that's ready for eval. so it's giving "I print variables, you eval them." iconic. the following variables get printed on STDOUT:

  • lr_getbody_SUBMITTER β€” the email address of the submitter, bestie. that's the first email found in the headers, and she searches in this order: Reply-To, then From, then Sender. and ngl, this one only contains the address portion (so no <> around it, we keep it clean ✨).
  • lr_getbody_TO β€” the email address the email was sent to. simple as that. πŸ“¬
  • lr_getbody_SUBJECT β€” the subject of the message. and yes, that string is sanitized. no funny business. 🧼
  • lr_getbody_DATE β€” the date of the message. sanitized too, obviously. πŸ—“οΈ
  • lr_getbody_FILE β€” the path to the temporary file that's holding the attachment she found. like a little keepsake box. 🎁
  • lr_getbody_OK β€” set when the operation completed successfully. and here's the thing, bestie: it's totally possible for lr_getbody to fail at extracting the attachment while the header info is still available. so like, don't panic if you see this one missing β€” the vibes can still be partially immaculate. πŸ’€

also, for the lore: this script is used by lr_processmail(1) and lr_rawmail2mail(1). iykyk. 🫢


πŸ¦‹ VERSION πŸ¦‹

$Id: lr_getbody.in,v 1.10 2006/07/23 13:16:33 vanbaal Exp $

she's been around. vintage. πŸ’œ


Copyright (C) 2002 Stichting LogReport Foundation LogReport@LogReport.org

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html.

fr fr read the license, bestie. it's not just decorative. πŸ“œβœ¨

πŸ‘‘ AUTHOR πŸ‘‘

Francis J. Lacoste <flacoste@logreport.org>

give her a follow, she wrote the whole thing. 🫑


and that's the whole page, no cap. this was Lire 2.1.1, dated 2025-09-28, and the manual itself is LR_GETBODY.IN(1) β€” mwah, bye bestie! πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from