Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
Mail::Milter::Module::MailDomainDNSBL - milter to accept/reject mail whose sender domain matches a DNSBL SYNOPSIS
use Mail::Milter::Module::MailDomainDNSBL; my $milter = new Mail::Milter::Module::MailDomainDNSBL('foo.spamlist.dom'); my $milter2 = &MailDomainDNSBL('foo.spamlist.dom'); # convenience $milter2->set_message('Mail from %M disallowed'); DESCRIPTION
This milter module rejects any mail from a sender's domain (in the MAIL FROM part of the SMTP transaction, not in the From: header) match- ing 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. METHODS
new(DNSBL) new(DNSBL, MATCHRECORD[, ...]) new(DNSBL, SUBREF) Creates a MailDomainDNSBL 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 two arguments: a binary-encoded four byte scalar that should be transformed as needed with "inet_ntoa()" or "unpack", and the domain name being checked by the DNSBL. accept_match(FLAG) If FLAG is 0 (the default), a matching DNSBL will cause the mail to be rejected. If FLAG is 1, a matching DNSBL will cause this module to return SMFIS_ACCEPT instead. This allows a "MailDomainDNSBL" 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 messages. This string may contain the substring %M, which will be replaced by the matching e-mail 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. AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com> SEE ALSO
Mail::Milter::Object perl v5.8.8 2004-02-26 Mail::Milter::Module::MailDomainDNSBL(3pm)

Check Out this Related Man Page

RBLCHECK(1)							   User Commands						       RBLCHECK(1)

NAME
rblcheck - check if an IP address is blacklisted SYNOPSIS
rblcheck [-qtlcvh?] [-s <service>] <address> [ <address> ... ] DESCRIPTION
rblcheck is a very basic interface to DNSBL listings such as those operated by The Spamhaus Project or Spamcop. The general idea behind DNSBL listings is rapid lookup of IP addresses using DNS (for example, for blacklisting IP addresses because of abuse). Each IP address is reversed and has a domain name attached to it; for example, the IP address 127.0.0.2 would become 2.0.0.127, and then a domain such as "relays.visi.com" would be added to it. You would then try to resolve the result (ie. 2.0.0.127.relays.visi.com); if you receive a positive reply, then you know that the address is listed. Further information can also be queried, such as text descriptions of why the address was listed. OPTIONS
-q Quiet mode; outputs only matching IP address(es) - use return code (see below). -t Print a TXT record, if any. -m Stop checking after first address match in any list. -l List default DNSBL services to check. -c Clear the current list of DNSBL services. -s <service> Toggle service in the DNSBL list. -h, -? Display the help message. -v Display version information. <address> An IP address to look up; specify `-' to read multiple addresses from standard input. RETURN CODES
When invoked, rblcheck returns either 0 (to indicate error, or that the address was not in any of the listings), or a positive number (indicating the number of listings that the IP address was found in). SEE ALSO
/usr/share/doc/rblcheck/, esp. /usr/share/doc/rblcheck/rblcheck.txt.gz COPYRIGHT
Copyright (C) 1997, 1998, 1999, 2000, 2001 Edward S. Marshall Man page created for the Debian Project with the help of help2man(1) based on the output of `rblcheck -h` and the above mentioned text file by Gregor Herrmann <gregor+debian@comodo.priv.at>. rblcheck 1.5-20020316 August 2004 RBLCHECK(1)
Man Page