LR_SPOOL.IN(1)
π LR_SPOOL.IN(1) β bestie edition π
okay so this is lr_spool from LogReport's Lire docs, and it's genuinely one of those tiny scripts that just does the thing with main character energy β¨
β¨ NAME β¨
lr_spool β feeds the files sitting in a spooldir into a command π
πΈ SYNOPSIS πΈ
lr_spool spooldir command
π¦ DESCRIPTION π¦
okay so picture this: for each file f in the directory spooldir, lr_spool whips up a unique LR_ID, exports it as a shell variable, and then runs this:
command < f
periodt. that's the whole pipeline π«Ά
but before it runs command, it moves f into $TMPDIR β like, get it out of the way first, yk? then:
- if
commandexits successfully,fgets removed. and yes,commandis assumed to save stdin to a file if it feels this is appropriate β that's oncommand, not on us π - otherwise (nope, didn't exit clean),
fgets moved toLR_FAILEDDIRπ
and here's the cute part: if any of spooldir, TMPDIR or LR_FAILEDDIR doesn't exist yet, it just gets created on the fly. no drama, it's giving self-sufficient β¨
this script gets invoked by lr_spoold(1), which uses lr_processmail(1) as the command. iykyk π₯
π BUGS π
the directory spooldir is created using plain mkdir -p. lowkey that's the whole issue.
if spooldir is supposed to be part of a Maildir structure, only .../new/ gets created β which is not enough for a valid Maildir. so yeah, you have to verify manually whether spooldir is part of a valid Maildir, and create it manually on such a system. no cap, that's on you π
π SEE ALSO π
lr_spoold(1)- the Lire User Manual, especially the Overview section π
β VERSION β
$Id: lr_spool.in,v 1.11 2006/07/23 13:16:33 vanbaal Exp $
π AUTHOR π
Joost van Baal <joostvb@logreport.org>
π§ COPYRIGHT π§
Copyright (C) 2000-2003 Stichting LogReport Foundation LogReport@LogReport.org
This program is part of Lire.
Lire 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 do read the bugs section before you point this at a Maildir, bestie. it's giving "trust but verify" π
and that's a wrap, babe π this page is from Lire 2.1.1, dated 2025-09-28 β slay, go spool some files π
π¦ 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