Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

courier::filter::logger(3pm) [debian man page]

Courier::Filter::Logger(3pm)				User Contributed Perl Documentation			      Courier::Filter::Logger(3pm)

NAME
Courier::Filter::Logger - Abstract base class for loggers used by the Courier::Filter framework SYNOPSIS
Courier::Filter logging use Courier::Filter::Logger::My; # Need to use a non-abstract sub-class. my $logger = Courier::Filter::Logger::My->new(%options); # For use in an individual filter module: my $module = Courier::Filter::Module::My->new( ... logger => $logger, ... ); # For use as a global Courier::Filter logger object: my $filter = Courier::Filter->new( ... logger => $logger, ... ); Deriving new logger classes package Courier::Filter::Logger::My; use base qw(Courier::Filter::Logger); DESCRIPTION
Sub-classes of Courier::Filter::Logger are used by the Courier::Filter mail filtering framework and its filter modules for the logging of errors and message rejections to arbitrary targets, like file handles or databases. When overriding a method in a derived class, do not forget calling the inherited method from your overridden method. Constructor The following constructor is provided and may be overridden: new(%options): returns Courier::Filter::Logger Creates a new logger using the %options given as a list of key/value pairs. Initializes the logger, by creating/opening I/O handles, connecting to databases, etc.. "Courier::Filter::Logger::new()" creates a hash-ref as an object of the invoked class, and stores the %options in it, but does nothing else. Destructor The following destructor is provided and may be overridden: destroy Uninitializes the logger, by closing I/O handles, disconnecting from databases, etc.. "Courier::Filter::Logger::destroy()" does nothing. Sub-classes may override this method and define clean-up behavior. Instance methods The following instance methods are provided and may be overridden: log_error($text) Logs the error message given as $text (a string which may contain newlines). "Courier::Filter::Logger::log_error()" does nothing and should be overridden. log_rejected_message($message, $reason) Logs the Courier::Message given as $message as having been rejected due to $reason (a string which may contain newlines). "Courier::Filter::Logger::log_rejected_message()" does nothing and should be overridden. SEE ALSO
Courier::Filter, Courier::Filter::Module. For a list of prepared loggers that come with Courier::Filter, see "Bundled Courier::Filter loggers" in Courier::Filter::Overview. For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Logger(3pm)

Check Out this Related Man Page

Courier::Filter::Module::FakeDate(3pm)			User Contributed Perl Documentation		    Courier::Filter::Module::FakeDate(3pm)

NAME
Courier::Filter::Module::FakeDate - Fake "Date:" message header filter module for the Courier::Filter framework SYNOPSIS
use Courier::Filter::Module::FakeDate; my $module = Courier::Filter::Module::Header->new( forward_tolerance => { # years, months, weeks, days, hours, minutes, seconds hours => 2 }, backward_tolerance => { # years, months, weeks, days, hours, minutes, seconds days => 5 }, ignore_unparseable => 0, logger => $logger, inverse => 0, trusting => 0, testing => 0, debugging => 0 ); my $filter = Courier::Filter->new( ... modules => [ $module ], ... ); DESCRIPTION
This class is a filter module class for use with Courier::Filter. It matches a message if it has a "Date" header field that lies too far in the future or the past, relative to the local system's time. If the message has a "Resent-Date" header field (see RFC 2822, 3.6.6), that one is examined instead, because the message could simply be an old one that has recently been re-sent, which is perfectly legitimate behavior. In the case of a match, the response tells the sender that their "Date" header is implausible and that they should check their clock. Note: Times in different time zones are compared correctly. Note: When using this filter module, it is essential that the local system's own clock is set correctly, or there will be an increased risk of legitimate messages getting rejected. Constructor The following constructor is provided: new(%options): returns Courier::Filter::Module::FakeDate Creates a new FakeDate filter module. %options is a list of key/value pairs representing any of the following options: forward_tolerance backward_tolerance The maximum durations by which a message's "Date" or "Resent-Date" header may diverge into the future and the past, respectively, from the local system's time. Each duration must be specified as a hash-ref containing one or more time units and their respective quantity/ies, just as specified by DateTime::Duration. "forward_tolerance" defaults to 2 hours. "backward_tolerance" defaults to 5 days to account for transmission delays. For example: forward_tolerance => { hours => 4 }, backward_tolerance => { days => 1, hours => 12 } ignore_unparseable A boolean value controlling whether messages whose "Date" or "Resent-Date" header does not loosely conform to RFCs 822 or 2822 should be ignored (true) or matched (false). Defaults to false. All options of the Courier::Filter::Module constructor are also supported. Please see "new" in Courier::Filter::Module for their descriptions. Instance methods See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods. SEE ALSO
Courier::Filter::Module, Courier::Filter::Overview. For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Module::FakeDate(3pm)
Man Page