diff --git a/parsedmarc/resources/dbip-country-lite.mmdb b/parsedmarc/resources/dbip-country-lite.mmdb deleted file mode 100755 index ef80379..0000000 Binary files a/parsedmarc/resources/dbip-country-lite.mmdb and /dev/null differ diff --git a/parsedmarc/resources/dbip/README.md b/parsedmarc/resources/dbip/README.md new file mode 100644 index 0000000..4048143 --- /dev/null +++ b/parsedmarc/resources/dbip/README.md @@ -0,0 +1,7 @@ +# About + +`dbip-country-lite.mmdb` is provided by [dbip][dbip] under a +[ Creative Commons Attribution 4.0 International License][cc]. + +[dbip]: https://db-ip.com/db/lite.php +[cc]: http://creativecommons.org/licenses/by/4.0/ diff --git a/parsedmarc/resources/dbip/__init__.py b/parsedmarc/resources/dbip/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/parsedmarc/resources/dbip/dbip-country-lite.mmdb b/parsedmarc/resources/dbip/dbip-country-lite.mmdb new file mode 100644 index 0000000..a126d1d Binary files /dev/null and b/parsedmarc/resources/dbip/dbip-country-lite.mmdb differ diff --git a/parsedmarc/resources/senders/README.md b/parsedmarc/resources/senders/README.md new file mode 100644 index 0000000..1ebd729 --- /dev/null +++ b/parsedmarc/resources/senders/README.md @@ -0,0 +1,14 @@ +# About + +## Credit + +`senders.sqlite` contains information from [dmarc.io][dmarc.io] that is licensed under a +[Creative Commons Attribution-ShareAlike 4.0 International License][cc]. + +## License + +`senders.sqlite` is licensed under a +[Creative Commons Attribution-ShareAlike 4.0 International License][cc]. + +[dmarc.io]: https://dmarc.io/ +[cc]: https://creativecommons.org/licenses/by-sa/4.0/ \ No newline at end of file diff --git a/parsedmarc/resources/senders/__init__.py b/parsedmarc/resources/senders/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/parsedmarc/resources/senders/senders.sqlite b/parsedmarc/resources/senders/senders.sqlite new file mode 100644 index 0000000..e69de29 diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index ceb98f2..f973a37 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -31,7 +31,7 @@ import geoip2.errors import publicsuffixlist from parsedmarc.log import logger -import parsedmarc.resources +import parsedmarc.resources.dbip parenthesis_regex = re.compile(r'\s*\(.*\)\s*') @@ -272,7 +272,7 @@ def get_ip_address_country(ip_address, db_path=None): break if db_path is None: - with pkg_resources.path(parsedmarc.resources, + with pkg_resources.path(parsedmarc.resources.dbip, "dbip-country-lite.mmdb") as path: db_path = path