Mail::...Action(3pm)

πŸ’– Mail::MtPolicyd::Plugin::ScoreAction β€” the Mail::...Action(3pm) page, bestie edition πŸ’–

okay so welcome to the perl manpage corner of the group chat 🌸 this one lives in User Contributed Perl Documentation under the name Mail::...Action(3pm), and it's literally about the mtpolicyd plugin that runs an action based on the score. yes. that's the whole vibe. it's giving "score goes brrr, action goes swoosh" ✨


πŸŽ€ NAME πŸŽ€

Mail::MtPolicyd::Plugin::ScoreAction β€” mtpolicyd plugin for running an action based on the score. that's it, that's the girl πŸ’…


⭐ VERSION ⭐

version 2.05 πŸ¦‹


✨ DESCRIPTION ✨

Returns a action based on the score. lowkey the entire plot of this plugin in one sentence, and honestly? iconic. πŸ‘‘


🌈 PARAMETERS 🌈

every single knob you can turn, no skips, no cap 🫢

  • threshold (required) β€” if the score is higher than this value the action will be executed. you literally cannot skip this one, it's the whole point bestie πŸ’–
  • match (default: gt) β€” this decides if it should match when the score is >= or <= the threshold.

possible values: gt, lt

  • uc_threshold (default: undef) β€” if you set this, the value for threshold gets fetched from this user-config value instead, but only if that value is defined. so it's a lil "maybe check the user config first" moment πŸ™ˆ
  • score_field (default: score) β€” specifies the name of the field the score is stored in. set this if you need multiple scores, because sometimes one score is simply not enough πŸ’€
  • action (default: empty) β€” the action to be executed.

the following patterns in the string will be replaced:

%IP%, %SCORE%, %SCORE_DETAIL%
  • Plugin (default: empty) β€” execute this plugins when the condition matched. yes the capital P, that's how she's spelled, don't come for me 🌸

πŸ”₯ EXAMPLE πŸ”₯

so the flex here is: reject everything with a score >= 15, and do greylisting for the remaining request with a score >= 5. two plugins, one iconic setup, main character energy fr fr πŸ‘‘

<Plugin ScoreReject>
  module = "ScoreAction"
  threshold = 15
  action = "reject sender ip %IP% is blocked (score=%SCORE%%SCORE_DETAIL%)"
</Plugin>
<Plugin ScoreGreylist>
  module = "ScoreAction"
  threshold = 5
  <Plugin greylist>
    module = "Greylist"
    score = -5
    mode = "passive"
  </Plugin>
</Plugin>

πŸ’œ AUTHOR πŸ’œ

Markus Benning <ich@markusbenning.de> β€” we stan 🫢


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
no gatekeeping, it's free software, the GPL v2 said so periodt πŸ’…

and that's a wrap babes πŸŽ€ this was perl v5.38.2, dated 2024-05-26, from the Mail::...Action(3pm) page β€” go forth and score your actions responsibly βœ¨πŸ¦‹πŸ’–

πŸ“¦ where this page comes from