Hi All,

I have written a POP3 protocol-handler which uses the 
PerlProcessConnectionHandler. The solution worked fine under 
Apache 2.0 and ModPerl 2.0, but after an upgrade to 
Apache 2.2 and Mod_Perl 2.0.2 it doesn't work correctly. 
(We upgraded from Ubuntu-Dapper to Ubuntu-Gutsy).

Specifically the problem is that the "sub handler" gets called 
only after the client sends a linefeed. In the old situation 
the handler started directly. The POP3 protocol needs a "+OK" response
 after the connection has been established.

I have tried to make a minimal routine that only responds "hello"
 (see below), but it has the same problem.

Looking on the Internet I have found one (and only one) similar problem:
http://grokbase.com/topic/2006/11/17/apache-qpsmtpd-troubles/7uFbEtSLsqURl19-7c3qhX5O7g0
 
(check the last reply).

I am out of options. Does anyone have an idea?


Thanks,
Dirk

Below is our Apache configuration and the module to return "Hello".

The virtual Apache configuration:
<VirtualHost 192.168.0.5:110>
  <Location ewise::EwisePop3Login>
      Order Deny,Allow
      Allow from all
  </Location>
   PerlModule                   ewise::EwisePop3Login
   PerlProcessConnectionHandler ewise::EwisePop3Login
   CustomLog /data/logs/EwisePop3Login.log combined
</VirtualHost>

The package:
package ewise::EwisePop3Login;

BEGIN {
        unshift @INC, "/data/EWISE/lib";
}
use strict;
use warnings FATAL => 'all';
use Apache2::Connection ();
use APR::Socket ();
use Apache2::Const -compile => 'OK';
use APR::Const     -compile => 'SO_NONBLOCK';

use constant BUFF_LEN => 1024;
use constant REMOTE_IP=>'84.53.99.250';

sub handler {
        my $c = shift;
        my $sock = $c->client_socket;
        my $userName;
        $sock->send("Hello\n");
        Apache2::Const::OK;
}

1;

Reply via email to