{"analyzedAt":"2022-07-02T03:03:54.047Z","collected":{"metadata":{"name":"haraka-plugin-geoip-lite","scope":"unscoped","version":"1.0.15","description":"provide geographic information about mail senders.","keywords":["haraka","email","geoip","smtp","mta"],"date":"2020-09-04T03:54:05.026Z","author":{"name":"Matt Simerson","email":"matt@tnpi.net","username":"tnpi"},"publisher":{"username":"tnpi","email":"matt@tnpi.net"},"maintainers":[{"username":"msergeant","email":"helpme@gmail.com"},{"username":"msimerson","email":"haraka.mail@gmail.com"},{"username":"tnpi","email":"matt@tnpi.net"}],"repository":{"type":"git","url":"git+https://github.com/haraka/haraka-plugin-geoip.git"},"links":{"npm":"https://www.npmjs.com/package/haraka-plugin-geoip-lite","homepage":"https://github.com/haraka/haraka-plugin-geoip/tree/geoip-lite","repository":"https://github.com/haraka/haraka-plugin-geoip","bugs":"https://github.com/haraka/haraka-plugin-geoip/issues"},"license":"MIT","dependencies":{"geoip-lite":"*","haraka-net-utils":"*"},"devDependencies":{"eslint":"*","eslint-plugin-haraka":"*","haraka-test-fixtures":"*","mocha":"*"},"releases":[{"from":"2022-06-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1},{"from":"2022-04-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1},{"from":"2022-01-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1},{"from":"2021-07-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1},{"from":"2020-07-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":3}],"hasTestScript":true,"readme":"[![Build Status][ci-img]][ci-url]\n[![Windows Build status][ci-win-img]][ci-win-url]\n[![Code Climate][clim-img]][clim-url]\n[![NPM][npm-img]][npm-url]\n\n# geoip\n\nprovide geographic information about mail senders.\n\n# SYNOPSIS\n\nUse MaxMind's GeoIP databases to report geographic information about senders.\n\nThis Haraka plugin supports two geoip modules:\n\n| Plugin | geoip module |\n| ------ | ----- |\n| [haraka-plugin-geoip][5] | [maxmind](https://github.com/runk/node-maxmind) |\n| [haraka-plugin-geoip-lite][2] | [geoip-lite](https://github.com/bluesmoon/node-geoip) |\n\n# INSTALL (lite)\n\nInstall the npm geoip-lite module and update the DBs:\n\n    npm install -g geoip-lite\n    cd node_modules/geoip-lite && npm run-script updatedb license_key=YOUR_LICENSE_KEY\n\n\n# INSTALL (maxmind)\n\nThe maxmind module requires the manual download of the GeoIP databases. The npm module [maxmind-geolite-mirror][1] will download the files for you and also keep them up-to-date if you run it periodically.\n\n```bash\nmkdir -p /usr/local/share/GeoIP\nnpm install -g maxmind-geolite-mirror\n/usr/local/bin/maxmind-geolite-mirror\n```\n\n# DESCRIPTION\n\nGeoIP results are stored in connection.notes.geoip and the [haraka-results][3] object at `connection.results.get(geoip)`. The following information is typically available:\n\n    continent: NA,\n    country:   US,\n\nIf the GeoIP city database is available, the following may also be available:\n\n    region:   CA,\n    city:     San Francisco,\n    ll:       [37.7484, -122.4156],\n    distance: 1539    // in kilometers\n    range:    [ 3479299040, 3479299071 ],\n\nThis module also adds entries like this to your logs:\n\n    [geoip] US\n    [geoip] US, WA\n    [geoip] US, WA, Seattle\n    [geoip] US, WA, Seattle, 1319km\n\nCalculating the distance requires the public IP of this mail server. See config.distance.\n\n# CONFIG\n\n- distance\n\nPerforms geodesic distance calculations. Calculates the distance \"as the\ncrow flies\" from the remote mail server.\n\nThis calculation requires a 'from' IP address. This will typically be the\npublic IP of your mail server. If Haraka is bound to a private IP, net\\_utils\nwill attempt to determine your public IP using STUN. If that doesn't work, edit\nconfig/smtp.ini and set `public_ip`.\n\n- show.city\n\nshow city data in logs and headers. City data is less accurate than country.\n\n- show.region in logs and headers. Regional data are US states, Canadian\n  provinces and such.\n\nSet a connection result to true if the distance exceeds this many kilometers.\n\n- too\\_far=4000\n\n\n# SPAM PREDICTION WITH DISTANCE\n\n[Spatio-temporal Network-level Automatic Reputation Engine][4]\n\n    \"For ham, 90% of the messages travel about 4,000 km or less. On the\n    other hand, for spam, only 28% of messages stay within this range.\"\n\nObservations in 2014-2016 suggest that geodesic distance continues to be\nhighly correlated with spam.\n\n\n# LIMITATIONS\n\nThe distance calculations are more concerned with being fast than accurate. The MaxMind location data is collected from whois and is of limited accuracy. MaxMind offers more accurate data for a fee.\n\nFor distance calculations, the earth is considered a perfect sphere. In\nreality, it is not. Accuracy should be within 1%.\n\n\n# SEE ALSO\n\n- [MaxMind](http://www.maxmind.com/)\n- [Databases](http://geolite.maxmind.com/download/geoip/database)\n\n\n[1]: https://github.com/msimerson/maxmind-geolite-mirror\n[2]: https://www.npmjs.com/package/haraka-plugin-geoip-lite\n[3]: https://github.com/haraka/haraka-results\n[4]: http://www.cc.gatech.edu/~feamster/papers/snare-usenix09.pdf\n[5]: https://www.npmjs.com/package/haraka-plugin-geoip\n\n[ci-img]: https://github.com/haraka/haraka-plugin-geoip/workflows/Plugin%20Tests/badge.svg\n[ci-url]: https://github.com/haraka/haraka-plugin-geoip/actions?query=workflow%3A%22Plugin+Tests%22\n[ci-win-img]: https://github.com/haraka/haraka-plugin-geoip/workflows/Plugin%20Tests%20-%20Windows/badge.svg\n[ci-win-url]: https://github.com/haraka/haraka-plugin-geoip/actions?query=workflow%3A%22Plugin+Tests+-+Windows%22\n[clim-img]: https://codeclimate.com/github/haraka/haraka-plugin-geoip/badges/gpa.svg\n[clim-url]: https://codeclimate.com/github/haraka/haraka-plugin-geoip\n[npm-img]: https://nodei.co/npm/haraka-plugin-geoip-lite.png\n[npm-url]: https://www.npmjs.com/package/haraka-plugin-geoip-lite"},"npm":{"downloads":[{"from":"2022-07-01T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":0},{"from":"2022-06-25T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1},{"from":"2022-06-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":14},{"from":"2022-04-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":99},{"from":"2022-01-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":200},{"from":"2021-07-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":338}],"starsCount":0},"github":{"starsCount":2,"forksCount":6,"subscribersCount":4,"issues":{"count":54,"openCount":1,"distribution":{"3600":28,"10800":1,"32400":9,"97200":5,"291600":3,"874800":2,"2624400":2,"7873200":2,"23619600":1,"70858800":0,"212576400":1},"isDisabled":false},"contributors":[{"username":"lnedry","commitsCount":3},{"username":"greenkeeper[bot]","commitsCount":4},{"username":"AuspeXeu","commitsCount":1},{"username":"msimerson","commitsCount":33},{"username":"analogic","commitsCount":2}],"commits":[{"from":"2022-06-25T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":0},{"from":"2022-06-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":0},{"from":"2022-04-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":0},{"from":"2022-01-03T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":0},{"from":"2021-07-02T00:00:00.000Z","to":"2022-07-02T00:00:00.000Z","count":1}]},"source":{"files":{"readmeSize":4285,"testsSize":72551152,"hasChangelog":true},"badges":[{"urls":{"original":"https://nodei.co/npm/haraka-plugin-geoip-lite.png","shields":"https://img.shields.io/npm/v/haraka-plugin-geoip-lite.svg","content":"https://img.shields.io/npm/v/haraka-plugin-geoip-lite.json"},"info":{"service":"npm","type":"version"}}],"linters":["eslint"]}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.6,"health":0.3333333333333333,"branding":0.15},"popularity":{"communityInterest":17,"downloadsCount":33,"downloadsAcceleration":-0.06856925418569251,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.6128658331451667,"detail":{"quality":0.8177680950277717,"popularity":0.050194772797728326,"maintenance":0.9999063833075152}}}