Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mail::milter::module::connectmatcheshostname(3pm) [debian man page]

Mail::Milter::Module::ConnectMatchesHostname(3pm)	User Contributed Perl Documentation	 Mail::Milter::Module::ConnectMatchesHostname(3pm)

NAME
Mail::Milter::Module::ConnectMatchesHostname - milter to accept/reject connecting hosts matching regex(es) SYNOPSIS
use Mail::Milter::Module::ConnectMatchesHostname; my $milter = new Mail::Milter::Module::ConnectMatchesHostname; my $milter2 = &ConnectMatchesHostname; # convenience $milter2->set_message('Connecting hostname %H looks like a dynamic address'); DESCRIPTION
This milter module rejects any connecting host whose hostname contains one of a group of built-in patterns that match the IP address of the connecting host. This is normally used to detect dynamic pool addresses. 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. 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) 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. One final note. ISPs can and do use "dynamic-looking" reverse DNS 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 "accept_break" with regular expressions; for example: my $milter = new Mail::Milter::Chain( &ConnectRegex( '.fooisp.com$', )->accept_match(1); &ConnectMatchesHostname, )->accept_break(1); METHODS
new() Creates a ConnectMatchesHostname object. set_message(MESSAGE) Sets the message used when rejecting connections. This string may contain the substring %H, which will be replaced by the matching hostname, and/or the substring %A, which will be replaced by the matching IP address. This method returns a reference to the object itself, allowing this method call to be chained. BUGS
In Sendmail 8.11 and 8.12, a milter rejection at "connect" stage does not allow the reply message to be set -- it simply becomes "not accepting messages". However, this module still attempts to set the reply code and message in the hope that this will be fixed. The implementation of this module could be much more efficient. AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com> SEE ALSO
Mail::Milter::Object perl v5.8.8 2004-02-26 Mail::Milter::Module::ConnectMatchesHostname(3pm)

Check Out this Related Man Page

Mail::Milter::Module::ConnectDNSBL(3pm) 		User Contributed Perl Documentation		   Mail::Milter::Module::ConnectDNSBL(3pm)

NAME
Mail::Milter::Module::ConnectDNSBL - milter to accept/reject connecting hosts matching DNSBLs SYNOPSIS
use Mail::Milter::Module::ConnectDNSBL; my $milter = new Mail::Milter::Module::ConnectDNSBL('foo.spamlist.dom'); my $milter2 = &ConnectDNSBL('foo.spamlist.dom'); # convenience $milter2->set_message('Connections from %A disallowed'); DESCRIPTION
This milter module rejects any connecting host whose IPv4 address matches a given DNS Blocking List (DNSBL). It can also function as a whitelisting Chain element; see "accept_match()". The check used by this module is a simple "A" record lookup, via the standard "gethostbyname" lookup mechanism. This method does not require the use of Net::DNS and is thus typically very fast. (Note: If the connecting host is not using IPv4, this module will simply be a passthrough using SMFIS_CONTINUE.) METHODS
new(DNSBL) new(DNSBL, MATCHRECORD[, ...]) new(DNSBL, SUBREF) Creates a ConnectDNSBL object. DNSBL is the root host hierarchy to use for lookups. Three methods of matching can be used: If no additional arguments are provided, the match succeeds if there is any address entry present for the DNSBL lookup; the values are not examined. If one or more MATCHRECORD values are supplied, they are string representations of IPv4 addresses. If any of these match record values is the same as any address record returned by the DNSBL lookup, the match succeeds. If a SUBREF (reference to a subroutine; may be an anonymous inline "sub{}") is supplied, it is called for each of the address records returned by the DNSBL lookup. The subroutine should return 0 or undef to indicate a failed match, and nonzero to indicate a successful match. The subroutine receives a binary-encoded four byte scalar that should be transformed as needed with "inet_ntoa()" or "unpack". accept_match(FLAG) If FLAG is 0 (the default), a matching DNSBL will cause the connection to be rejected. If FLAG is 1, a matching DNSBL will cause this module to return SMFIS_ACCEPT instead. This allows a "ConnectDNSBL" to be used inside a "Mail::Milter::Chain" container (in accept_break(1) mode), to function as a whitelist rather than a blacklist. This method returns a reference to the object itself, allowing this method call to be chained. ignore_tempfail(FLAG) If FLAG is 0 (the default), a DNSBL lookup which fails the underlying DNS query will cause the milter to return a temporary failure result (SMFIS_TEMPFAIL). If FLAG is 1, a temporary DNS failure will be treated as if the lookup resulted in an empty record set (SMFIS_CONTINUE). This method returns a reference to the object itself, allowing this method call to be chained. set_message(MESSAGE) Sets the message used when rejecting connections. This string may contain the substring %A, which will be replaced by the matching IPv4 address, or %L, which will be replaced by the name of the matching DNSBL. This method returns a reference to the object itself, allowing this method call to be chained. BUGS
In Sendmail 8.11 and 8.12, a milter rejection at "connect" stage does not allow the reply message to be set -- it simply becomes "not accepting messages". However, this module still attempts to set the reply code and message in the hope that this will be fixed. AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com> SEE ALSO
Mail::Milter::Object perl v5.8.8 2004-02-26 Mail::Milter::Module::ConnectDNSBL(3pm)
Man Page