Mail::...PVerify(3pm)

πŸ’– Mail::MtPolicyd::Plugin::SMTPVerify β€” the manual, but make it cute

okay bestie so this page is literally from the User Contributed Perl Documentation set, and the manual it belongs to is called Mail::...PVerify(3pm). yes the name is abbreviated in the header, don't come for it, that's just how the man page do. 🫢


✨ NAME ✨

Mail::MtPolicyd::Plugin::SMTPVerify β€” an mtpolicyd plugin for remote SMTP address checks πŸ’Œ


🌸 VERSION 🌸

version 2.05


πŸ¦‹ DESCRIPTION πŸ¦‹

This plugin is the one you call when you wanna do remote SMTP verification of addresses β€” like, actually go ask the other mail server "hey do you even know this person" before you commit. πŸ’…


πŸŽ€ Example πŸŽ€

scenario one: the internal relay vibe check

Wanna check if the recipient actually exists on an internal relay and whether that mailbox can handle a message of this size? say less:

<Plugin smtp-rcpt-check>
  module = "SMTPVerify"

  host = "mail.company.internal"
  sender_field = "sender"
  recipient_field = "recipient"
  # send SIZE to check quota
  size_field = "size"

  temp_fail_action = "defer %MSG%"
  perm_fail_action = "reject %MSG%"
</Plugin>

scenario two: being EXTREMELY strict about the sender 😀

Doing some very strict checks on the sender address, no chill whatsoever:

<Plugin sender-sender-check>
  module = "SMTPVerify"

  # use a verifiable address in MAIL FROM:
  sender = "horst@mydomain.tld"
  recipient_field = "sender"
  no_starttls_action = "reject sender address does not support STARTTLS"
  temp_fail_action = "defer sender address failed verification: %MSG%"
  perm_fail_action = "reject sender address does not accept mail: %MSG%"
</Plugin>

scenario three: advanced sender checking + score, main character energy πŸ‘‘

Or do advanced checking of the sender address and apply a score, so you can decide later what to do about it:

<Plugin sender-sender-check>
  module = "SMTPVerify"

  # use a verifiable address in MAIL FROM:
  sender = "horst@mydomain.tld"
  recipient_field = "sender"
  check_tlsa = "on"
  check_openpgp = "on"

  temp_fail_score = "1"
  perm_fail_score = "3"

  has_starttls_score = "-1"
  no_starttls_score = "5"
  has_tlsa_score = "-3"
  has_openpgp_score = "-3"
</Plugin>

Based on the score you can later apply greylisting or other actions. periodt. πŸ’…


🧚 Configuration 🧚

⭐ Parameters ⭐

The module takes the following parameters, bestie, read them all, I'm not summarising:

  • (uc_)enabled (default: on) β€” turn this check on or off. that's it, that's the whole job. ✨
  • host (default: empty) β€” if you define this, this host gets used for checks instead of an MX. like, you're skipping the MX hunt entirely. πŸƒβ€β™€οΈ
  • port (default: 25) β€” the port to use for the connection.
  • check_tlsa (default: off) β€” set it to 'on' to enable a check for whether a TLSA record for the MX exists.
heads up bestie: this requires that your DNS resolver returns the AD flag for DNSSEC secured records. if it doesn't, this whole thing is not gonna go how you want. πŸ’€
  • check_openpgp (default: off) β€” set it to 'on' to enable a check for whether OPENPGPKEY records for the recipients exist.
  • sender_field (default: recipient) β€” which field to grab the MAIL FROM address from.
  • sender (default: empty) β€” if it's set, use this fixed sender in MAIL FROM instead of sender_field. hard-coded, no discussion. πŸŽ€
  • recipient_field (default: sender) β€” which field to grab the RCPT TO address from.
  • size_field (default: size) β€” which field to grab the message SIZE from.
  • perm_fail_action (default: empty) β€” the action to return if the remote server gave a permanent error for this recipient.

The string "%MSG%" will be replaced by the smtp message:

perm_fail_action = "reject %MSG%"
  • temp_fail_action (default: empty) β€” same energy as perm_fail_action, except this message comes back when a temporary error is returned by the remote smtp server.
temp_fail_action = "defer %MSG%"
  • perm_fail_score (default: empty) β€” the score to apply when a permanent error is returned for this recipient.
  • temp_fail_score (default: empty) β€” the score to apply when a temporary error is returned for this recipient.
  • has_starttls_score (default: emtpy) and no_starttls_score (default: emtpy) β€” the score to apply when the smtp server of the recipient announces support for the STARTTLS extension. 🫢
  • has_tlsa_score (default: empty) and no_tlsa_score (default: empty) β€” the score to apply when there is a TLSA record, or no TLSA record, for the remote SMTP server. πŸ’œ
  • has_openpgp_score (default: empty) and no_openpgp_score (default: empty) β€” the score to apply when an OPENPGPKEY record for the recipient exists, or does not exist. πŸ”₯

πŸ‘‘ 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, you made it, so proud of you πŸ₯Ή this one came out under perl v5.38.2, dated 2024-05-26, and it's filed under the manual name Mail::...PVerify(3pm) β€” go forth and verify those addresses, bestie πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from