From 75e0f9e5680b7f54d7ab1be99eaf37fb6ae1312d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Tue, 6 Aug 2002 12:34:03 +0000 Subject: [PATCH] check that we are being started under tcpserver git-svn-id: https://svn.perl.org/qpsmtpd/branches/v010@40 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/TcpServer.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Qpsmtpd/TcpServer.pm b/lib/Qpsmtpd/TcpServer.pm index 72e27df..8df452a 100644 --- a/lib/Qpsmtpd/TcpServer.pm +++ b/lib/Qpsmtpd/TcpServer.pm @@ -5,6 +5,9 @@ use base qw(Qpsmtpd); sub start_connection { my $self = shift; + die "Qpsmtpd::TcpServer must be started by tcpserver\n" + unless $ENV{TCPREMOTEIP}; + my $remote_host = $ENV{TCPREMOTEHOST} || ( $ENV{TCPREMOTEIP} ? "[$ENV{TCPREMOTEIP}]" : "[noip!]"); my $remote_info = $ENV{TCPREMOTEINFO} ? "$ENV{TCPREMOTEINFO}\@$remote_host" : $remote_host; my $remote_ip = $ENV{TCPREMOTEIP};