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 ofsender_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 asperm_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) andno_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) andno_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) andno_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>
π 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 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
- 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