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

Mail::Milter::Chain(3pm)				User Contributed Perl Documentation				  Mail::Milter::Chain(3pm)

NAME
Mail::Milter::Chain - Perl extension for chaining milter callbacks SYNOPSIS
use Mail::Milter::Chain; my $chain = new Mail::Milter::Chain({ connect => &foo, ... }, ...); $chain->register({ connect => &bar, ... }); $chain->register({ connect => &baz, ... }); $chain->accept_break(1); use Sendmail::Milter; ... Sendmail::Milter::register('foo', $chain, SMFI_CURR_ACTS); DESCRIPTION
Mail::Milter::Chain allows multiple milter callback sets to be registered in a single milter server instance, simulating multiple milters running in separate servers. This is typically much less resource intensive than running each milter in its own server process. Any contained milter returning SMFIS_REJECT, SMFIS_TEMPFAIL, or SMFIS_DISCARD will terminate the entire chain and return the respective code up to the containing chain or milter server. Normally, a milter returning SMFIS_ACCEPT will remove only that milter from the chain, allowing others to continue processing the message. Alternatively, SMFIS_ACCEPT can be made to terminate the entire chain as is done for error results; see "accept_break()" below. A "Mail::Milter::Chain" is itself a milter callback hash reference, and can thus be passed directly to "Sendmail::Milter::register()" or another Mail::Milter::Chain container. IMPORTANT CAVEAT: Once this object has been registered with a parent container (a milter or another chain), DO NOT call "register()" on this object any longer. This will result in difficult to diagnose problems at callback time. METHODS
new([HASHREF, ...]) Creates a Mail::Milter::Chain object. For convenience, accepts one or more hash references corresponding to individual callback sets that will be registered with this chain. accept_break(FLAG) If FLAG is 0 (the default), SMFIS_ACCEPT will only remove the current milter from the list of callbacks, thus simulating a completely independent milter server. If FLAG is 1, SMFIS_ACCEPT will terminate the entire chain and propagate SMFIS_ACCEPT up to the parent chain or milter server. This allows a milter to provide a sort of "whitelist" effect, where SMFIS_ACCEPT speaks for the entire chain rather than just one milter callback set. This method returns a reference to the object itself, allowing this method call to be chained. register(HASHREF) Registers a callback set with this chain. Do not call after this chain has itself been registered with a parent container (chain or milter server). AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com> SEE ALSO
Mail::Milter, Sendmail::Milter perl v5.8.8 2004-02-26 Mail::Milter::Chain(3pm)
Man Page