DAMNIT(8)

πŸ’– DAMNIT πŸ’– (that's section 8 of the System Manager's Manual, bestie)

okay so real talk, the tool is literally called damnit, and no it's not me being dramatic, that's the actual name πŸ’€


✨ NAME ✨

damnit β€” DAtabase MaNagement InTerface

yes it's an acronym. yes it spells a swear. the devs knew exactly what they were doing and honestly? iconic πŸ‘‘


🌸 SYNOPSIS 🌸

damnit [-h] [-d <file> <value>] [-a <file> <value>] [-f <string>]
[-l <file>]

πŸ¦‹ DESCRIPTION πŸ¦‹

so damnit is the database management tool for gnarwl(8). that's its whole job. it lets system administrators list and/or manipulate gnarwl's database files πŸ’…

and listen β€” this is not intended to be employed by the average user. average users should use LDAP as the only interface to gnarwl(8). so if that's you, respectfully, back away from the terminal, this one's not for you πŸ™ˆ

πŸŽ€ OPTIONS πŸŽ€

  • -h β€” print usage information. the classic "help me pls" flag, we love her ✨
  • -f <string> β€” select the output format for the database listing (only meaningful with -l, like she only shows up when there's a list to format, main character energy fr). <string> is the template for what the output should look like. these macros are recognized:
    • %entry β†’ the entry itself
    • %time β†’ the entrytime, in human readable form
    • %tstamp β†’ the entrytime, as a timestamp
    • \en β†’ a newline character
    • \et β†’ a tab character

the default format is: "%time -> %entry\en". and bestie, don't forget the trailing newline 😭 (yes that's a warning, no I'm not being extra, it's literally in the manpage)

  • -d <file> [<value>] β€” delete <value> from <file>. if <value> is omitted, damnit will read <value> from stdin, one per line, until either EOF or an empty line is detected πŸ—‘οΈ
  • -a <file> [<value>] β€” add <value> to <file>. and here's the cute part: if <value> is already stored in <file>, damnit will only update the timestamp. lowkey efficient πŸ’– if <value> is omitted, damnit will read <value> from stdin, one per line, until either EOF or an empty line is detected
  • -l <file> β€” list the database file specified by <file>. that's it, that's the whole vibe πŸ“‹

🌈 DATABASE FILES 🌈

okay so gnarwl uses hashfiles for storing information on disk. meaning: all datasets consist of key and value pairs πŸ”‘

  • the key is always a NULL terminated character string
  • the value contains the timestamp, when the key was entered (last time) into the file

that timestamp is of type time_t (as returned by time(2)), and therefore β€” and this is the important bit β€” gnarwl's database files are not copyable between different system architectures. no cap. don't try it. it will not go how you want it to go πŸ’€


πŸ‘‘ AUTHOR πŸ‘‘

Patrick Ahlbrecht <p.ahlbrecht@billiton.de>


🫢 SEE ALSO 🫢

gnarwl(8)


πŸ“ FILES πŸ“

  • /var/lib/gnarwl/block/* β€” every file in this directory represents an email address gnarwl (already) received a mail for. every time gnarwl sends out an autoreply for an address, the recipient of that mail is locked into the according file. gnarwl will not send any further autoreplies for this sender/receiver combo until the timeout specified in gnarwl.cfg expires ⏳
  • /var/lib/gnarwl/blacklist.db β€” email addresses listed as keys in this file are not subject to autoresponding (the addresses of root, postmaster, webmaster and the like should be put herein). note: the complete mailaddress, as it would appear in an email, must be specified here, because gnarwl checks these "as-is" πŸš«πŸ“§
  • /var/lib/gnarwl/badheaders.db β€” each entry in this file represents a line that may not occur in the header of a received email. that is, gnarwl won't reply to any mail it is able to match a headerline with an entry in this file πŸ™…β™€οΈ

okay that's the whole page bestie, mwah πŸ’‹ this was the DAMNIT(8) page out of the System Manager's Manual β€” that's section 8, and shoutout to the page itself for carrying the name DAMNIT(8) all the way to the end, consistent queen πŸ‘‘βœ¨