More updates to bring into line with current qpsmtpd, esp with regard to config and plugin locations.

Docs updated


git-svn-id: https://svn.perl.org/qpsmtpd/trunk@867 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Matt Sergeant 2008-03-18 19:36:25 +00:00
parent 6c42523a92
commit f2e786d34f

View File

@ -23,6 +23,8 @@ sub handler {
my Apache2::Connection $c = shift; my Apache2::Connection $c = shift;
$c->client_socket->opt_set(APR::Const::SO_NONBLOCK => 0); $c->client_socket->opt_set(APR::Const::SO_NONBLOCK => 0);
die "SetEnv QPSMTPD_CONFIG must be given" unless $ENV{QPSMTPD_CONFIG};
my $qpsmtpd = Qpsmtpd::Apache->new(); my $qpsmtpd = Qpsmtpd::Apache->new();
$qpsmtpd->start_connection( $qpsmtpd->start_connection(
ip => $c->remote_ip, ip => $c->remote_ip,
@ -91,13 +93,6 @@ sub run {
$self->read_input(); $self->read_input();
} }
sub config_dir {
my ($self, $config) = @_;
-e "$_/$config" and return $_
for "$self->{qpdir}/config";
return "/var/qmail/control";
}
sub getline { sub getline {
my $self = shift; my $self = shift;
my $c = $self->{conn} || die "Cannot getline without a conn"; my $c = $self->{conn} || die "Cannot getline without a conn";
@ -181,9 +176,11 @@ Apache::Qpsmtpd - a mod_perl-2 connection handler for qpsmtpd
</Perl> </Perl>
<VirtualHost _default_:25> <VirtualHost _default_:25>
PerlSetVar QpsmtpdDir /path/to/qpsmtpd SetEnv QPSMTPD_CONFIG /path/to/qpsmtpd/config
PerlModule Apache::Qpsmtpd PerlModule Apache::Qpsmtpd
PerlProcessConnectionHandler Apache::Qpsmtpd PerlProcessConnectionHandler Apache::Qpsmtpd
# can specify this in config/plugin_dirs if you wish:
PerlSetVar qpsmtpd.plugin_dirs /path/to/qpsmtpd/plugins
PerlSetVar qpsmtpd.loglevel 4 PerlSetVar qpsmtpd.loglevel 4
</VirtualHost> </VirtualHost>
@ -202,14 +199,10 @@ module.
=head1 BUGS =head1 BUGS
Currently the F<check_early_talker> plugin will not work because it Probably a few. Make sure you test your plugins carefully.
relies on being able to do C<select()> on F<STDIN> which does not
work here. It should be possible with the next release of mod_perl
to do a C<poll()> on the socket though, so we can hopefully get
that working in the future.
Other operations that perform directly on the STDIN/STDOUT filehandles The Apache scoreboard (/server-status/) mostly works and shows
will not work. connections, but could do with some enhancements specific to SMTP.
=head1 AUTHOR =head1 AUTHOR