haraka / haraka-plugin-geoip

provide geographic information about mail senders
https://www.npmjs.com/package/haraka-plugin-geoip
MIT License
4 stars 11 forks source link

Fixed issue with missing iso_code #24

Closed lnedry closed 6 years ago

lnedry commented 6 years ago

If the GeoIP database doesn't have an iso_code for an IP address, an exception is thrown.

Plugin geoip failed: TypeError: Cannot read property 'iso_code' of undefined at Plugin.exports.received_headers (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-geoip/index.js:277:35) at Plugin.exports.add_headers (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-geoip/index.js:181:19) at Object.plugins.run_next_hook (/usr/lib/node_modules/Haraka/plugins.js:506:28) at callback (/usr/lib/node_modules/Haraka/plugins.js:462:32) at Plugin.exports.hook_data_post (/usr/lib/node_modules/Haraka/node_modules/haraka-plugin-p0f/index.js:248:16) at Object.plugins.run_next_hook (/usr/lib/node_modules/Haraka/plugins.js:506:28) at Object.plugins.run_hooks (/usr/lib/node_modules/Haraka/plugins.js:421:13) at MessageStream.end_callback (/usr/lib/node_modules/Haraka/connection.js:1695:17) at MessageStream._write (/usr/lib/node_modules/Haraka/messagestream.js:138:37) at ChunkEmitter. (/usr/lib/node_modules/Haraka/messagestream.js:64:18)

smfreegard commented 6 years ago

Thanks for the patch.