greylist(1)
β¨ NAME β¨
greylist β it's the command line interface to greylistd(8), bestie π
πΈ SYNOPSIS πΈ
greylist { -h | --help | help }
greylist operation ...
π¦ DESCRIPTION π¦
Okay so this program is literally just a command line interface to greylistd(8). That's it, that's the whole vibe. If you wanna know what this program is for and how it actually functions, go read that manual page, bestie β it's all in there π
π USAGE π
So when we say data... in the discussion below, we mean this little triplet of information, okay? Write it down:
<sending host's IP address> <sender@address> <recipient@address>
The following operations are available, queen π:
π add [--white|--grey|--black] data...
Add data to the corresponding list β and if you don't specify one, it goes to white by default. The idea is that if the triplet of some future mail delivery (subject to timeouts, obviously) matches this data, then the message gets accepted, temporarily rejected, or permanently rejected respectively. Cute, right? β¨
π©Ά delete data...
Removes data from all the lists. If the data existed in any list, the command returns an exit status of 0 β otherwise -1. And it prints a message on standard output telling you what it did, so you're never left guessing π«Ά
π check [--white|--grey|--black] data...
Checks the current status of data β like, if a message delivery had this triplet, would it succeed or not?
- If you specify a list, the word
"true"or"false"gets printed, telling you whether the data was in that corresponding list, and the exit status is set accordingly too. - If you don't specify a list, one of the words
"white","grey", or"black"gets written on standard output, and the exit status is0,1, or2respectively.
NOTE: this operation is non-intrusive, so it does not update any of the greylist data. So like, for instance, if the data is currently in the"grey"list but its minimum retry time (retryMin) has elapsed, the text"white"would be printed. BUT β unless an update happens before theretryMaxtimeout, the data would still expire from the"grey"list. No cap π
π₯ update [--white|--grey|--black] data...
Same as check, except it also updates the greylist data accordingly. So if data is currently greylisted but the minimum retry time retryMin has elapsed since it was first seen, the data gets moved to the "white" list. Slay π
This operation would normally be used by mail transport agents (MTAs). That's the main character energy right there.
π stats
Prints some statistics on greylist utilization and hits.
π mrtg
Prints statistics on greylist and whitelist hits in a format that MRTG can use as an External Monitoring Script.
π list [--white] [--grey] [--black]
Prints the available (original/unhashed) data items from the corresponding list(s).
NOTE: internally,greylistd(8)hashes the provided data into a single 32-bit value for efficiency. Prior to version 0.6, the original data was not retained. As of version 0.6, data is saved if the"savetriplets"setting in the[data]section of the configuration file is"true". Only data items (i.e. triplets) that have been seen while this setting was enabled can be listed. So like, don't come for it if it's not there π
πΎ save
Forces greylist data to be immediately saved (synchronized) to the filesystem.
Data is also saved after any operation if a certain update interval (default is 300 seconds / 5 minutes) has elapsed since the last save, and there are no pending requests to greylistd(8). Obsessed with a tidy filesystem tbh π
π reload
Saves greylist data to files, then reloads configuration and data. It's giving refresh, it's giving reboot, it's giving new me π¦
π§Ή clear [--white] [--grey] [--black]
Clears all items in the specified list(s) β or all lists if you don't specify any.
If the whitelist is cleared, all new data triplets will initially be in a "grey" state.
β οΈ Use with caution! Like, genuinely. This one does not play π
β EXAMPLES β
Here's the tea, bestie:
greylist add --white 1.2.3.4 mailinglist@somewhere subscriber@yourhost
Whitelists messages received from the IP address 1.2.3.4 on behalf of <mailinglist@somewhere> to <subscriber@yourhost>. Iconic β¨
greylist check --grey 1.2.3.4 mailinglist@somewhere subscriber@yourhost
Prints "true" or "false" on standard output, depending on whether mail received from the IP address 1.2.3.4 on behalf of <mailinglist@somewhere> to <subscriber@yourhost> should be deferred or not, respectively. And the data is neither recorded nor changed to a "white" state β it's just a lil peek, a vibe check, nothing more π
π FILES π
π /var/run/greylistd/socket
The UNIX domain socket providing the main interface to "greylistd". That's the plug, that's how you talk to it π
π AUTHOR π
This python script and manual page is written by Tor Slettnes, originally for Debian GNU/Linux. Respect the OG π«Ά
π COPYRIGHT π
Copyright Β© 2004-2005 Tor Slettnes.
Okay so legally I have to say this part exactly, and honestly it's giving serious, so here it is:
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.
On a Debian GNU/Linux system, the full text of the GPL is available in /usr/share/common-licenses/GPL. It is also available at:
http://www.gnu.org/licenses/gpl.html
π SEE ALSO π
greylistd(8)
Greylisting daemon. The whole reason we're here, fr fr π
greylistd-setup-exim4(8)
Utility to add/remove support for greylistd in Exim 4 configuration files. iykyk β¨
Okay that's the whole page, bestie β written by Tor Slettnes, version 0.8, manual page greylist(1). Go forth and greylist responsibly π
ππ¦
π¦ where this page comes from
- debian bookworm: greylistd 0.9.0.2+nmu1 Β· GPL-2.0-or-later
- debian trixie: greylistd 0.9.0.4 Β· GPL-2.0-or-later
- ubuntu jammy: greylistd 0.9.0.2 Β· GPL-2.0-or-later
- ubuntu noble: greylistd 0.9.0.2+nmu1 Β· GPL-2.0-or-later
- ubuntu resolute: greylistd 0.9.0.4 Β· GPL-2.0-or-later
- ubuntu stonking: greylistd 0.9.0.4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms