.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" 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::Milter::Module::ConnectMatchesHostname 3pm" .TH Mail::Milter::Module::ConnectMatchesHostname 3pm "2023-01-22" "perl v5.36.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::Milter::Module::ConnectMatchesHostname \- milter to accept/reject connecting hosts matching regex(es) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Mail::Milter::Module::ConnectMatchesHostname; \& \& my $milter = new Mail::Milter::Module::ConnectMatchesHostname; \& \& my $milter2 = &ConnectMatchesHostname; # convenience \& \& $milter2\->set_message(\*(AqConnecting hostname %H looks like a dynamic address\*(Aq); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This milter module rejects any connecting host whose hostname contains one of a group of built-in patterns that match the \s-1IP\s0 address of the connecting host. This is normally used to detect dynamic pool addresses. .PP Currently the following patterns embedded in the hostname are considered matching, where 10.11.12.13 is the IPv4 address of the connecting host. In the following cases, the string must be preceded by a non-digit character or otherwise must be at the start of the hostname. .PP .Vb 5 \& 010.011.012.013. (optionally without internal dots, or with \- in place of .) \& 013.012.011.010. (optionally with \- in place of .) \& 10.11.12.13. (optionally without internal dots, or with \- in place of .) \& 13.12.11.10. (optionally with \- in place of .) \& 0A0B0C0D (hexadecimal, ignoring case) .Ve .PP More specific patterns are anticipated to be added in the future. Because of this, if you use ConnectMatchesHostname, pay attention to this perldoc manual page when updating to a newer version of Mail::Milter. .PP One final note. ISPs can and do use \*(L"dynamic-looking\*(R" reverse \s-1DNS\s0 entries for what they consider to be legitimate server addresses. This is not ideal, and may require embedding this module in a Chain set to \&\*(L"accept_break\*(R" with regular expressions; for example: .PP .Vb 6 \& my $milter = new Mail::Milter::Chain( \& &ConnectRegex( \& \*(Aq\e.fooisp\e.com$\*(Aq, \& )\->accept_match(1); \& &ConnectMatchesHostname, \& )\->accept_break(1); .Ve .SH "METHODS" .IX Header "METHODS" .RS 4 \&\fBnew()\fR .Sp Creates a ConnectMatchesHostname object. .Sp set_message(\s-1MESSAGE\s0) .Sp Sets the message used when rejecting connections. This string may contain the substring \f(CW%H\fR, which will be replaced by the matching hostname, and/or the substring \f(CW%A\fR, which will be replaced by the matching \s-1IP\s0 address. .Sp This method returns a reference to the object itself, allowing this method call to be chained. .RE .SH "BUGS" .IX Header "BUGS" In Sendmail 8.11 and 8.12, a milter rejection at \*(L"connect\*(R" stage does not allow the reply message to be set \*(-- it simply becomes \*(L"not accepting messages\*(R". However, this module still attempts to set the reply code and message in the hope that this will be fixed. .PP The implementation of this module could be much more efficient. .SH "AUTHOR" .IX Header "AUTHOR" Todd Vierling, .SH "SEE ALSO" .IX Header "SEE ALSO" Mail::Milter::Object .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 98:" 4 .IX Item "Around line 98:" You can't have =items (as at line 110) unless the first thing after the =over is an =item