parsedmarc icon indicating copy to clipboard operation
parsedmarc copied to clipboard

Running from Jupyter Notebook

Open toroskilly opened this issue 3 years ago • 2 comments

I am running parsedmarc successfully from a Jupyter Notebook, but have reached the point where the IP database is more than a month old. parsedmarc is really cool, I am a massive fan.

I am using Jupyter, because I am new to Python and am still working out how I want to use this info, etc. Jupyter helps me isolate parts of my scripts, whilst I blunder along.

I interact directly with my Outlook Application, to get the raw reports, rather than using an IMAP config. So, I imagined that all I needed to do to get the latest IP database was put the following in my parsedmarc.ini file (Windows user) and setup GeoIPUpdate (which I have done):

[general]
ip_db_path = C:\ProgramData\MaxMind\GeoIPUpdate\GeoIP

I believe I may come across some issues with the above, because I have not specified IMAP or file_path in the config file. Is there something I can add to get around this?

However, before I can test the above, I am unsure of how I can reference the Config file from my IPYNB script. Could I just put the ip_db_path in my script and forget the Config file?

toroskilly avatar Aug 09 '22 14:08 toroskilly

If you are running from a notebook, I would expect that you'd use the get_dmarc_reports_from_mbox function directly and not use the config file or really anything from cli.py. In that case you'd put ip_db_path in your script.

nathanthorpe avatar Aug 12 '22 00:08 nathanthorpe

Remember that the ip_db_path option wants a file, not just a path.

leonardo0014 avatar Oct 23 '22 18:10 leonardo0014