LR_GETBODY.IN(1)
π 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, thenFrom, thenSender. 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 forlr_getbodyto 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 π
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
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms