Mail::...reylist(3pm)
π Mail::MtPolicyd::Plugin::Greylist π
okay bestie, so this is a page from the User Contributed Perl Documentation, and the module in question is Mail::MtPolicyd::Plugin::Greylist β aka the plug-in that does greylisting with a little auto-whitelist glow-up on the side. it's giving gatekeeper but make it polite. π
β¨ NAME β¨
Mail::MtPolicyd::Plugin::Greylist β this plugin implements a greylisting mechanism with an auto whitelist. no cap, that's literally its whole job description. π
πΈ VERSION πΈ
version 2.05 β yes we're on 2.05, she's grown. π¦
π DESCRIPTION π
okay so this plugin implements a greylisting mechanism with an auto whitelist. (yes, same sentence, she's consistent, we respect that.)
here's the vibe: if a client connects, it will return an defer and create a greylisting "ticket" for the combination of the address of the sender, the senders address and the recipient address. the ticket gets stored in memcached and it holds the time when the client was seen for the first time. that ticket will expire after the max_retry_wait timeout. bye bestie. π
the client will be deferred until the min_retry_wait timeout has been reached. only in the time between the min_retry_wait and max_retry_wait will the request pass the greylisting test. so there's a little window, and if you knock in that window you get in. πͺβ¨
when the auto-whitelist is enabled (default, she's on by default btw) a record for every client which passes the greylisting test will be stored in the autowl_table. that table is based on the combination of the sender domain and client_address. if a client passed the test at least autowl_threshold (default 3) times, the greylisting test will be skipped β congrats, you're a regular, we know your order. β additional an last_seen time stamp is stored in the record, and records which are older then the autowl_expire_days will expire. so the list stays fresh, not musty. π§Ό
please note the greylisting is done on a triplet based on the
client_address + sender + recipient
the auto-white list is based on the
client_address + sender_domain
two different keys, two different vibes. don't mix them up, iykyk. π
π PARAMETERS π
(uc_)enabled(default:on) β Enable/disable this check. you know what it does, it's the on/off switch, she's iconic. πscore(default: empty) β Apply an score to this message if it _passed_ the greylisting test. in most cases you want to assign a negative score. (eg.-10) like, reward the good behaviour, give them points back. π―mode(default:passive) β the default is to return no action if the client passed the greylisting test and continue. you can set this'accept'or'dunno'if you want skip further checks. main character energy: either you just vibe in the background, or you call it right there. πdefer_message(default:defer greylisting is active) β this action is returned to the MTA if a message is deferred. if a client retries too fast, the time left tillmin_retry_waitis reach will be appended to the string. so they get told exactly how long they're in timeout. brutal but fair. β³min_retry_wait(default:300(5m)) β a client will have to wait at least for this timeout. (in seconds) πmax_retry_wait(default:7200(2h)) β a client must retry to deliver the message before this timeout. (in seconds) πuse_autowl(default:1) β could be used to disable the use of the auto-whitelist. π«autowl_threshold(default:3) β how often a client/sender_domain pair must pass the check before it is whitelisted. three strikes and you'reβ¦ in? ποΈautowl_expire_days(default:60) β after how many days an auto-whitelist entry will expire if no client with this client/sender pair is seen. ghosted for 60 days = unfollowed. πautowl_table(default:autowl) β the name of the table to use. the database handle specified in the global configuration will be used. (see manmtpolicyd) ποΈquery_autowl,create_ticket(default:1) β this options could be used to disable the creation of a new ticket or to query the autowl. this can be used to catch early retries at the begin of your configuration before more expensive checks are processed.
Example:
<Plugin greylist>
module = "Greylist"
score = -5
mode = "passive"
create_ticket = 0
query_autowl = 0
</Plugin>
# ... a lot of RBL checks, etc...
<Plugin ScoreGreylist>
module = "ScoreAction"
threshold = 5
<Plugin greylist>
module = "Greylist"
score = -5
mode = "passive"
</Plugin>
</Plugin>
this will prevent early retries from running thru all checks. like, why do all that work if you already know the answer? save the CPU, bestie. π§ β¨
π AUTHOR π
Markus Benning <ich@markusbenning.de> β shoutout to the legend, we stan. π«Ά
π COPYRIGHT AND LICENSE π
this software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
this is free software, licensed under:
The GNU General Public License, Version 2, June 1991
okay and that's a wrap on the whole page, mwah π this was perl v5.38.2, dated 2024-05-26, from the Mail::...reylist(3pm) page β go forth and greylist responsibly, bestie. slay. πβ¨
π¦ where this page comes from
- debian trixie: mtpolicyd 2.05-1.2 Β· GPL-2.0-only
- ubuntu questing: mtpolicyd 2.05-1.2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms