.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mail::MtPolicyd::Plugin::SMTPVerify 3pm" .TH Mail::MtPolicyd::Plugin::SMTPVerify 3pm "2022-10-15" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Mail::MtPolicyd::Plugin::SMTPVerify \- mtpolicyd plugin for remote SMTP address checks .SH "VERSION" .IX Header "VERSION" version 2.05 .SH "DESCRIPTION" .IX Header "DESCRIPTION" This plugin can be used to do remote \s-1SMTP\s0 verification of addresses. .SH "Example" .IX Header "Example" To check if the recipient exists on a internal relay and mailbox is able to receive a message of this size: .PP .Vb 2 \& \& 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%" \& .Ve .PP Do some very strict checks on sender address: .PP .Vb 2 \& \& 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%" \& .Ve .PP Or do advanced checking of sender address and apply a score: .PP .Vb 2 \& \& 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" \& .Ve .PP Based on the score you can later apply greylisting or other actions. .SH "Configuration" .IX Header "Configuration" .SS "Parameters" .IX Subsection "Parameters" The module takes the following parameters: .IP "(uc_)enabled (default: on)" 4 .IX Item "(uc_)enabled (default: on)" Enable/disable this check. .IP "host (default: empty)" 4 .IX Item "host (default: empty)" If defined this host will be used for checks instead of a \s-1MX.\s0 .IP "port (default: 25)" 4 .IX Item "port (default: 25)" Port to use for connection. .IP "check_tlsa (default: off)" 4 .IX Item "check_tlsa (default: off)" Set to 'on' to enable check if an \s-1TLSA\s0 record for the \s-1MX\s0 exists. .Sp This requires that your \s-1DNS\s0 resolver returns the \s-1AD\s0 flag for \s-1DNSSEC\s0 secured records. .IP "check_openpgp (default: off)" 4 .IX Item "check_openpgp (default: off)" Set to 'on' to enable check if an \s-1OPENPGPKEY\s0 records for the recipients exists. .IP "sender_field (default: recipient)" 4 .IX Item "sender_field (default: recipient)" Field to take the \s-1MAIL FROM\s0 address from. .IP "sender (default: empty)" 4 .IX Item "sender (default: empty)" If set use this fixed sender in \s-1MAIL FROM\s0 instead of sender_field. .IP "recipient_field (default: sender)" 4 .IX Item "recipient_field (default: sender)" Field to take the \s-1RCPT TO\s0 address from. .IP "size_field (default: size)" 4 .IX Item "size_field (default: size)" Field to take the message \s-1SIZE\s0 from. .IP "perm_fail_action (default: empty)" 4 .IX Item "perm_fail_action (default: empty)" Action to return if the remote server returned an permanent error for this recipient. .Sp The string \*(L"%MSG%\*(R" will be replaced by the smtp message: .Sp .Vb 1 \& perm_fail_action = "reject %MSG%" .Ve .IP "temp_fail_action (default: empty)" 4 .IX Item "temp_fail_action (default: empty)" Like perm_fail_action but this message is returned when an temporary error is returned by the remote smtp server. .Sp .Vb 1 \& temp_fail_action = "defer %MSG%" .Ve .IP "perm_fail_score (default: empty)" 4 .IX Item "perm_fail_score (default: empty)" Score to apply when a permanent error is returned for this recipient. .IP "temp_fail_score (default: empty)" 4 .IX Item "temp_fail_score (default: empty)" Score to apply when a temporary error is returned for this recipient. .IP "has_starttls_score (default: emtpy)" 4 .IX Item "has_starttls_score (default: emtpy)" .PD 0 .IP "no_starttls_score (default: emtpy)" 4 .IX Item "no_starttls_score (default: emtpy)" .PD Score to apply when the smtp server of the recipient announces support for \s-1STARTTLS\s0 extension. .IP "has_tlsa_score (default: empty)" 4 .IX Item "has_tlsa_score (default: empty)" .PD 0 .IP "no_tlsa_score (default: empty)" 4 .IX Item "no_tlsa_score (default: empty)" .PD Score to apply when there is a \s-1TLSA\s0 or no \s-1TLSA\s0 record for the remote \s-1SMTP\s0 server. .IP "has_openpgp_score (default: empty)" 4 .IX Item "has_openpgp_score (default: empty)" .PD 0 .IP "no_openpgp_score (default: empty)" 4 .IX Item "no_openpgp_score (default: empty)" .PD Score to apply when a \s-1OPENPGPKEY\s0 record for the recipient exists or not exists. .SH "AUTHOR" .IX Header "AUTHOR" Markus Benning .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2014 by Markus Benning . .PP This is free software, licensed under: .PP .Vb 1 \& The GNU General Public License, Version 2, June 1991 .Ve