Le mercredi 20 avril 2011 16:52, Joseph Brennan a écrit : > --On Wednesday, April 20, 2011 16:26 +0200 fakessh <[email protected]> > > wrote: > > i wrote a minimal perl script without succes > > > > exemple a perl script > > my $gi = Geo::IP->open("/usr/share/GeoIP/GeoIP.dat", GEOIP_STANDARD); > > my ($country, $region) = $gi->region_by_name($Helo); > > action_add_header("X-Header-Country", "$country"); > > action_add_header("X-Header-Region", "$region"); > > > > can you tell me how to make it work. headers are added but empty > > I'm not familiar with Geo::IP, but you seem to be getting no output > from the function. If it expects an IP address, use $RelayAddr. > > $Helo is whatever string the remote host says, and sometimes it is > garbage. Maybe you just had one of those cases. > > Joseph Brennan > Columbia University Information Technology >
changes made without any result: here is my code
my $gi = Geo::IP->open("/usr/share/GeoIP/GeoIP.dat",
GEOIP_STANDARD);
my ($country, $region) = $gi->region_by_name($RelayAddr);
action_add_header("X-Header-Country", "$country");
action_add_header("X-Header-Region", "$region");
--
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
gpg --keyserver pgp.mit.edu --recv-key 092164A7
pgpUYOh7gGbht.pgp
Description: PGP signature
_______________________________________________ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list [email protected] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

