keep the square brackets around the IP as "remote_host" if the reverse lookup failed

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@957 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2008-11-16 08:28:29 +00:00 committed by Ask Bjørn Hansen
parent e7bcc3fcf9
commit 59ed062aa9

View File

@ -54,7 +54,7 @@ sub start_connection {
# if the local dns resolver doesn't filter it out we might get
# ansi escape characters that could make a ps axw do "funny"
# things. So to be safe, cut them out.
$remote_host =~ tr/a-zA-Z\.\-0-9//cd;
$remote_host =~ tr/a-zA-Z\.\-0-9\[\]//cd;
$first_0 = $0 unless $first_0;
my $now = POSIX::strftime("%H:%M:%S %Y-%m-%d", localtime);