parsedmarc
parsedmarc copied to clipboard
gmail with oauth2 credentials.json or API key or service account with credentials?
I am a little lost and can't connect to gmail via imap over 993 because of google workspace and less secure app being detected. I want to use the gmail_api option but my credentials json file seems to allow parsedmarc container to run but my kibana and elasticsearch seem to be empty and folders are not created in gmail. I can't tell if my authentication isn't fully working or if communication is broken between google and my server?
In the parsedmarc config.ini for gmail_api do I just need to include my credentials json file and it should all work? Do I have the option of using a API key instead? Or should I try the google service account method with credentials? If anyone has any examples of using the gmail api successfully I would really love to see it.
Thanks.
Yeah you just need to download the credentials.json
file and then have it available in the container and it should work. What does your config look like?
I am having issues to configure this too. If you skip the imap section and just set muy credentials, de docker does... nothing (where do I set up the mailbox where it should connect to?) If I configure the imap section and the gmail_api section it try to use the imap connection only, and an Invalid credentials error is shown...
I am a little bit lost.
[general]
save_aggregate = True
save_forensic = True
# [imap]
# IMAP login
# host = imap.gmail.com
# port = 993
# user = [email protected]
# password = password
# ssl = True
[gmail_api]
credentials_file = /etc/parsedmarc/credentials.json
[mailbox]
watch = True
archive_folder = Processed
delete = False
# advanced advanced
test = False
### NO EDIT REQURIED DOWN BELOW
[elasticsearch]
hosts = elasticsearch:9200
ssl = False
I hace created a gmail account, gone to the gcp console, enabled the Gmail API and generated a credential for a Desktop application. Do I need to set some permissions to it?
A configuration example for gmail api will be much appreciated
I am having issues to configure this too. If you skip the imap section and just set muy credentials, de docker does... nothing (where do I set up the mailbox where it should connect to?) If I configure the imap section and the gmail_api section it try to use the imap connection only, and an Invalid credentials error is shown...
I am a little bit lost.
[general] save_aggregate = True save_forensic = True # [imap] # IMAP login # host = imap.gmail.com # port = 993 # user = [email protected] # password = password # ssl = True [gmail_api] credentials_file = /etc/parsedmarc/credentials.json [mailbox] watch = True archive_folder = Processed delete = False # advanced advanced test = False ### NO EDIT REQURIED DOWN BELOW [elasticsearch] hosts = elasticsearch:9200 ssl = False
I hace created a gmail account, gone to the gcp console, enabled the Gmail API and generated a credential for a Desktop application. Do I need to set some permissions to it?
A configuration example for gmail api will be much appreciated
Hello, did you find a working file with mailbox gmail api ? Thanks
Yeah you just need to download the
credentials.json
file and then have it available in the container and it should work. What does your config look like?
Where can I get it? I'm not seeing it anywhere.
Go to the google cloud console
Make an OAuth 2 client and press download json next to the client secret.
you also need to run some python code to get your token_file, . guide here https://domainaware.github.io/parsedmarc/usage.html . search for gmail_api