#!/usr/bin/perl

#
# Bootstrapping module for Courier::Filter,
# the purely Perl-based filter framework for the Courier MTA.
#
# (C) 2003-2005 Julian Mehnle <julian@mehnle.net>
# $Id: pureperlfilter,v 1.12 2005/01/17 18:27:25 julian Exp $
#
##############################################################################

=head1 NAME

pureperlfilter - A Courier::Filter-based filter for the Courier MTA

=head1 VERSION

0.16

=head1 SYNOPSIS

B<filterctl> [ B<start> | B<stop> ] [ B<pureperlfilter> ]

=head1 DESCRIPTION

The B<pureperlfilter> executable is a global mail filter for the Courier MTA
and acts as glue between Courier's B<courierfilter> interface and the
B<Courier::Filter> module framework.

For an architectural and administrative overview of the B<Courier::Filter>
framework, see L<Courier::Filter::Overview>.

=head1 FILES

=over

=item F</etc/courier/filters/pureperlfilter.conf>

This is the configuration file for pureperlfilter and Courier::Filter.  See
L<Courier::Filter::Overview> for its format.

=back

=head1 SEE ALSO

L<Courier::Filter::Overview>, L<Courier::Filter>

For AVAILABILITY, SUPPORT, and LICENSE information, see
L<Courier::Filter::Overview>.

=head1 AUTHOR

Julian Mehnle <julian@mehnle.net>

=cut

use warnings;
#use diagnostics;
use strict;

use lib '/usr/share/courier-filter-perl/perl5';

use Courier::Config;
use Courier::Filter;

use constant TRUE   => (0 == 0);
use constant FALSE  => not TRUE;

our $options;
my $config_file_name = Courier::Config::COURIER_FILTER_CONF;
require $config_file_name;

my $filter = Courier::Filter->new(%$options);
exit($filter->run() || 0);

# vim:tw=79
