Mail::...tfixMap(3pm)

✨ NAME ✨

Mail::MtPolicyd::Plugin::PostfixMap β€” an mtpolicyd plugin that lets you reach into a postfix access map πŸ—ΊοΈπŸ’–


πŸŽ€ VERSION πŸŽ€

version 2.05


🌸 SYNOPSIS 🌸

okay bestie, here's the vibe, look how cute this config is:

<Plugin whitelist>
  module="PostfixMap"
  db_file="/etc/postfix/whitelist.db"
  match_action=dunno
</Plugin>

<Plugin blacklist>
  moduel="PostfixMap"
  db_file="/etc/postfix/blacklist.db"
  match_action="reject you are blacklisted!"
</Plugin>

(yes, moduel is spelled like that up there, i'm not touching it, i'm just the messenger πŸ’…)


πŸ’… DESCRIPTION πŸ’…

So what this plugin does is it takes your client_address and checks it against a postfix hash table. that's it. that's the whole job. iconic honestly 🫢

It will only check if the IP address matches the list. Here's the tea on how it reads your values: 'OK' or a numerical value gets interpreted as a 'true' value. Literally everything else β€” every other action, every other value β€” gets treated as 'false'. periodt πŸ’€


πŸ¦‹ EXAMPLE TABLE πŸ¦‹

Here's what /etc/postfix/whitelist is giving:

123.123.123.123 OK
123.123.122 OK
123.12 OK
fe80::250:56ff:fe85:56f5 OK
fe80::250:56ff:fe83 OK

and now you generate whitelist.db, like so:

$ postmap whitelist

slay, look at you go ✨

πŸ“ PARAMETERS πŸ“

The module takes the following parameters, bestie, write these down:

  • (uc_)enabled (default: "on") β€” you can set this to 'off' to deactivate the check. it's the move if you wanna activate/deactivate the check per user 🌈
By default the plugin will do nothing. One of the following actions should be specified:
  • match_action (default: empty) β€” if you give it one, this action gets returned to the MTA when the SQL query matched πŸ’–
  • not_match_action (default: empty) β€” if you give it one, this action gets returned to the MTA when the SQL query DID NOT match 😀
  • score (default: empty) β€” if you give it one, this score gets applied to the session ⭐

πŸ‘‘ AUTHOR πŸ‘‘

Markus Benning <ich@markusbenning.de> πŸ’œ


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 that's the whole page bestie, no cap πŸŽ€ this little beauty is running on perl v5.38.2 and it was dated 2024-05-26 β€” catch you on the flip side, Mail::MtPolicyd::Plugin::PostfixMap πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from