POLICYD-CLIENT(1p)

✨ NAME ✨

policyd-client β€” the commandline client bestie that queries a policyd server πŸ’…

(yes it's from the User Contributed Perl Documentation section of the manual, iykyk 🫢)


πŸŽ€ VERSION πŸŽ€

version 2.05 β€” she's got a number and she's proud of it ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so. policyd-client is a rudimentary little tool β€” like, no-frills, she's not trying to be fancy β€” and her whole job is querying a policy server from the command line. that's it, that's the gig 🌸

the way it works: she generates the instance and request fields for you (girlboss behaviour), and every other field is on you β€” you have to specify all the rest of them on stdin. then you complete the whole request by sending a blank line. that blank line is the "okay I'm done, go" signal, no cap ⭐


πŸ’– USAGE πŸ’–

here's the shape of it, verbatim, don't come for me:

policyd-client [-?hhksv] [long options...]
      -h -? --usage --help  Prints this usage information.
      -h --host            host:port of a policyd
      -s --socket_path     path to a socket of a policyd
      -k --keepalive       use connection keepalive?
      -v --verbose         be verbose, print input/output to STDERR

and here's the same thing but with feelings πŸ’œ:

  • -h, -?, --usage, --help β€” prints this usage information. your classic "wait what does this thing do again" button πŸŽ€
  • -h, --host β€” the host:port of a policyd. yes, -h shows up twice up there, that's just how she is, main character energy πŸ‘‘
  • -s, --socket_path β€” the path to a socket of a policyd πŸ”Œ
  • -k, --keepalive β€” use connection keepalive? a question, literally, with a question mark. iconic πŸ’…
  • -v, --verbose β€” be verbose, and print input/output to STDERR. she's a yapper when you ask her to be 😭

🌈 EXAMPLE 🌈

a whole vibe, straight up, copy it character for character:

$ policyd-client -v -h localhost:12347
client_address=212.178.212.218

>> request=smtpd_access_policy
>> instance=0.133885340838791
>> client_address=212.178.212.218
>>
<< action=reject IP is blacklisted
<<
reject IP is blddacklisted

see how she echoed the input with >> and the server's reply with <<? that's the verbose girlie behaviour, slay πŸ”₯ (and yes, that last line says blddacklisted, we do not edit the ancient texts, periodt πŸ’€)


🌸 AUTHOR 🌸

Markus Benning <ich@markusbenning.de> β€” the og, the legend, the actual author 🫢


This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>. all the credit, every bit of it ✨

This is free software, licensed under:

The GNU General Public License, Version 2, June 1991

free as in freedom bestie, go read the license 🌈


and that's the whole page, no gatekeeping here πŸŽ€

kisses, this was perl v5.38.2, dated 2024-05-26, from the POLICYD-CLIENT(1p) manual β€” bye bestie, go query something πŸ’–βœ¨πŸ“

πŸ“¦ where this page comes from