t94j0 / gophish-notifier

Notification webhook for GoPhish
BSD 3-Clause "New" or "Revised" License
52 stars 16 forks source link

Log more event types #8

Open domwhewell-sage opened 5 months ago

domwhewell-sage commented 5 months ago

Currently the webhook only accepts these events

Anything else causes a panic (I think the "Email Sent" event caused the panic in https://github.com/t94j0/gophish-notifier/issues/2)

I would like to see it capable of accepting the "Email Sent" event and maybe others. Having all these events could cause it to send alot more notifications out so it would also be nice to have what types of events to ingest be configurable in the config.yaml file, Like:

# Enables notifications for each of the webhook events https://docs.getgophish.com/user-guide/documentation/webhooks. Options are `email_error`, `email_sent`, `email_opened`, `clicked_link`, `submitted_data` and `email_reported`.
events:
  - email_error
  - email_sent
  - email_opened
  - clicked_link
  - submitted_data
  - email_reported

If I have time I will submit a PR for this

er4z0r commented 2 months ago

I'm currently coming at this from an awareness phish angle (i.e., not red-team) where having notifications for email sent would absolutely swamp you in a deluge of notifications. Granted it depends on how you stagger it. But keeping that in mind, it would probably make sense to have an option to configure what event types we care about.