Giter Club home page Giter Club logo

Comments (6)

rabihaggle avatar rabihaggle commented on September 1, 2024

docker compose
parsedmarc:
image: patschi/parsedmarc:latest
volumes:
- ./data/conf/parsedmarc/:/etc/parsedmarc/
- ./data/data/geoipupdate/:/usr/share/GeoIP:z,ro
restart: always
ports:
- 8080:8080
networks:
- parsedmarc-network
depends_on:
elasticsearch:
condition: service_healthy

from parsedmarc-dockerized.

rabihaggle avatar rabihaggle commented on September 1, 2024

config.ini

[general]
save_aggregate = True
save_forensic = True

[gmail_api]
credentials_file = /etc/parsedmarc/secret.json

NO EDIT REQURIED DOWN BELOW

[elasticsearch]
hosts = elasticsearch:9200
ssl = False

from parsedmarc-dockerized.

qwell avatar qwell commented on September 1, 2024

This was the only way I managed to get things to work:

  1. Add a new OAuth 2.0 Client ID at https://console.cloud.google.com/apis/credentials. Once created, click Download JSON on the Client ID page and move it to data/conf/parsedmarc/credentials.json

  2. In data/conf/parsedmarc/config.ini, add

[gmail_api]
credentials_file = /etc/parsedmarc/credentials.json
oauth2_port = 8080
bind_addr = 0.0.0.0
  1. Run docker compose up --no-start to build the containers.

  2. Apply my patch for /opt/pypy/lib/pypy3/site-packages/parsedmarc/cli.py and /opt/pypy/lib/pypy3/site-packages/parsedmarc/mail/gmail.py so that it actually understands the bind_addr option.

  3. Run docker compose up and stare at the logs intently for a few minutes, to hopefully catch the one line out of the thousands that says to click it to authorize parsedmarc to access Gmail.

I'm sure there was quite a bit more to it than that, and it's almost certainly not going to work, but best of luck to any future readers.

I use this script to handle the patching and start everything.

from parsedmarc-dockerized.

patschi avatar patschi commented on September 1, 2024

Appreciate the details from qwell here, but it looks like more a parsedmarc-sided limitation/issue and not related to this packaging project. Hence, closing this one. Hopefully the workaround does the trick.

Feel free to let me know if someone disagrees.

from parsedmarc-dockerized.

qwell avatar qwell commented on September 1, 2024

My request here would be to improve documentation for what the config is actually supposed to look like and what needs to be done on the Google side to get the client ID and the like. I've ultimately stopped using parsedmarc, so I'm not really ready to put in that work. You're more than welcome to use info from my comment if you do decide to though.

I would otherwise agree. Changes from my patch really should be committed upstream (and so I'll just say that my diff and script are public domain -- anybody can use it for any reason whatsoever).

from parsedmarc-dockerized.

patschi avatar patschi commented on September 1, 2024

Unfortunately neither do I know the parsedmarc code nor am I using Google Mail, so it's hard for me to judge on any code-relevant changes to the upstream project. I'd ask you to create a issue at https://github.com/domainaware/parsedmarc/issues maybe, and contribute it upstream.

So you'd also not need to run any "hacky" workarounds during patching.

from parsedmarc-dockerized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.