| Courier-Filter documentation | Contained in the Courier-Filter distribution. |
Courier::Config - Class providing configuration information for Perl modules related to the Courier MTA
use Courier::Config;
# Courier base configuration:
my $config_dir = Courier::Config->config_dir;
my $runtime_dir = Courier::Config->runtime_dir;
my $courier_executable = Courier::Config->courier_executable;
my $courier_version = Courier::Config->courier_version;
# Courier::Filter configuration:
my $filter_conf_file = Courier::Config->filter_conf_file;
This class provides configuration information for Perl modules related to the Courier MTA, e.g. installation specific file system paths.
The following methods provide information about Courier's base configuration:
The base configuration directory of Courier.
The directory where Courier keeps the message queue (msgq, msgs, tmp)
and courierfilter sockets (filters, allfilters).
The full path of the Courier daemon executable.
The version number of the Courier installation.
The following Courier::Filter configuration information is provided:
The absolute file name of the Courier::Filter courier-filter-perl configuration file.
For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview.
Julian Mehnle <julian@mehnle.net>
| Courier-Filter documentation | Contained in the Courier-Filter distribution. |
# # Courier::Config class # # (C) 2003-2008 Julian Mehnle <julian@mehnle.net> # $Id: Config.pm 210 2008-03-21 19:30:31Z julian $ # ###############################################################################
package Courier::Config; use warnings; use strict; use version; use constant TRUE => (0 == 0); use constant FALSE => not TRUE;
# Declarations: ###############################################################################
use constant config_dir => '/etc/courier';
use constant runtime_dir => '/var/lib/courier'; # Normally '/var/run/courier'.
use constant courier_executable => '/usr/sbin/courier';
my $courier_version; sub courier_version { my ($self) = @_; my $courier_executable = $self->courier_executable; if ( not defined($courier_version) and -x $courier_executable ) { my $courier_version_string = `$courier_executable --version`; if ( $? == 0 and $courier_version_string =~ /^Courier ([^ ]+)/ ) { $courier_version = version->new($1); } } return $courier_version; }
use constant filter_conf_file => config_dir . '/filters/courier-filter-perl.conf';
# Support legacy method names: BEGIN { no warnings 'once'; *COURIER_CONFIG_DIR = \&config_dir; *COURIER_RUNTIME_DIR = \&runtime_dir; *COURIER_FILTER_CONF = \&filter_conf_file; }
TRUE;