msimerson / mail-dmarc

Mail::DMARC, a complete DMARC implementation in Perl
Other
33 stars 22 forks source link

dmarc_view_reports --geoip v6 support #101

Closed jeanpaulgalea closed 8 years ago

jeanpaulgalea commented 8 years ago

Hello,

We run your software on IPv6 enabled networks and the dmarc_view_reports --geoip only supports lookups for IPv4.

I personally want to lookup both type of addresses and only display the country code; so currently I use cut/awk/sed/whatever to drop the continent & city fields.

What do you think about the following? Is it something that you would accept upstream?

1) Replace the current --geoip code to use the MaxMind v6 database, which includes entries for v4 addresses too. The lookup for v4 requires the address to be prefixed with ::ffff: (e.g. ::ffff:127.0.0.1), which is easy to handle. Although this might make some of your existing users unhappy when upgrading, because they will need to change the MaxMind database type. Ideally I don't want to keep support for v4 only, because it complicates the library calls.

2) Add --geoip-country, --geoip-city, --geoip-continent flags to only show certain fields. Specifying --geoip is equivalent to having all three enabled.

Cheers.

msimerson commented 8 years ago

I would accept a patch like this. Folks that don't want the new Maxmind DB format can choose not to upgrade.

msimerson commented 8 years ago

closed by #103