Hi,

In current qp it would be about like so:

sub hook_pre_connection {
    my ($self,$transaction,%arg) = @_;
    my $port = $arg{local_port};
}

-Jared

b-sub-bdf0...@rope.net wrote:
On Tue, 5 May 2009, Hanno Hecker wrote:

On Tue, 5 May 2009 17:20:13 +0000 (UTC)
b-sub-bdf0...@rope.net wrote:

qpsmtpd 0.31

We are using the following to determine the local port when in the
'connect' hook:

my $localport = $self->qp->connection->local_port ;

We would like to do the same thing in the 'pre_connection' hook. The above
line doesn't work, and shows 'uninitialized value' in the logs.

Is there some other way to get the local port at this stage, or do we have
to move what we want to do to the connect hook, instead?
The pre-connection hook was not working until 0.32... (or SVN rev
599 / 601). This is more than 3 years now... and lot's of bugs were
fixed .)

My mistake - version 0.32. We will be upgrading shortly.

However, I still need to get the local port number in the pre_connection
hook, or I have to move the functionality to later than what would be
ideal :-/

Inbound and outbound email scanned for spam and viruses by the
DoubleCheck Email Manager v5: http://www.doublecheckemail.com

Reply via email to