LR_SPOOL.IN(1)

πŸ“¦ version 2.1.1, in arch rolling

πŸŒ€ 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 command exits successfully, f gets removed. and yes, command is assumed to save stdin to a file if it feels this is appropriate β€” that's on command, not on us πŸ’…
  • otherwise (nope, didn't exit clean), f gets moved to LR_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 (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