https://bugs.contribs.org/show_bug.cgi?id=9033
--- Comment #34 from John Crisp <[email protected]> ---
I'll attach the updated plugin but I'm stuck on one small piece.
I was trying to log the city name if it was found - so it could be potentially
used at some other time.
If you look in sub geoip2_lookup {
You can see
# City Information in case we want to play later
my $city = $self->qp->connection->notes('geoip_city');
#warn ("At City (check): $city");
if ($city eq '') {
$self->log(LOGINFO, "Information: City NA RemoteIP $ip");
}
else {
$self->log(LOGINFO, "Information: City $city RemoteIP $ip");
}
So if empty, log NA and if there is something it then logs the name. It works
fine if it find something, but if there is the4 following error if it doesn't:
@400000005b213e7032ce9d5c Use of uninitialized value $city in string eq at
/usr/share/qpsmtpd/plugins/check_badcountries line 266.
@400000005b213e7032dc1e64 4802 (connect) check_badcountries: Information: City
NA RemoteIP 209.85.128.172
Any ideas ? Just my rubbish perl letting me down here !
New test rpm is here with the code.
https://www.reetspetit.com/smeserver/6/repoview/smeserver-geoip.html
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug._______________________________________________
Mail for each SME Contribs bug report
To unsubscribe, e-mail [email protected]
Searchable archive at https://lists.contribs.org/mailman/public/contribteam/