<commit_before>
# geoip

provide geographic information about mail senders.

# SYNOPSIS

Use MaxMind's GeoIP databases to report geographic information about senders.

This plugin supports for several geoip modules:

    * [maxmind](https://github.com/runk/node-maxmind) 0.6 (maxmind v1)
    * [maxmind](https://github.com/runk/node-maxmind) 1.0+ (maxmind v2)
    * [geoip-lite](https://github.com/bluesmoon/node-geoip)

Support for geoip-lite is published separately as [haraka-plugin-geoip-lite]().

# INSTALL

The maxmind module requires the manual download of the GeoIP databases. The npm module `maxmind-geolite-mirror` will download the files for you. It will keep them up-to-date if you run it periodically.

```bash
mkdir -p /usr/local/share/GeoIP
npm install -g maxmind-geolite-mirror
/usr/local/bin/maxmind-geolite-mirror
```

# DESCRIPTION

GeoIP results are stored in connection.notes.geoip and connection.[results](https://github.com/haraka/Haraka/blob/master/docs/Results.md).geoip. The following information is typically available:

    continent: NA,
    country:   US,

If the GeoIP city database is available, the following may also be available:

    region:   CA,
    city:     San Francisco,
    ll:       [37.7484, -122.4156],
    distance: 1539    // in kilometers
    range:    [ 3479299040, 3479299071 ],<commit_msg>fix missing URL in README<commit_after>
# geoip

provide geographic information about mail senders.

# SYNOPSIS

Use MaxMind's GeoIP databases to report geographic information about senders.

This plugin supports for several geoip modules:

    * [maxmind](https://github.com/runk/node-maxmind) 0.6 (maxmind v1)
    * [maxmind](https://github.com/runk/node-maxmind) 1.0+ (maxmind v2)
    * [geoip-lite](https://github.com/bluesmoon/node-geoip)

Support for `geoip-lite` is published to npm separately as [haraka-plugin-geoip-lite](https://www.npmjs.com/package/haraka-plugin-geoip-lite).

# INSTALL

The maxmind module requires the manual download of the GeoIP databases. The npm module `maxmind-geolite-mirror` will download the files for you. It will keep them up-to-date if you run it periodically.

```bash
mkdir -p /usr/local/share/GeoIP
npm install -g maxmind-geolite-mirror
/usr/local/bin/maxmind-geolite-mirror
```

# DESCRIPTION

GeoIP results are stored in connection.notes.geoip and connection.[results](https://github.com/haraka/Haraka/blob/master/docs/Results.md).geoip. The following information is typically available:

    continent: NA,
    country:   US,

If the GeoIP city database is available, the following may also be available:

    region:   CA,
    city:     San Francisco,
    ll:       [37.7484, -122.4156],
    distance: 1539    // in kilometers
    range:    [ 3479299040, 3479299071 ],
{'fraction_non_alphanumeric': 0.10591222343126587, 'fraction_numerical': 0.031193326079071455, 'mean_word_length': 3.7226027397260273, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 9, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2905999', 'n_tokens_mistral': 986, 'n_tokens_neox': 868, 'n_words': 268}