Giter Site home page Giter Site logo

postmark-webhook-receiver's Introduction

postmark

Go Report Card CodeFactor codebeat badge MIT license

Real-time notifications from Postmark webhooks

⚡ Receive notifications via webhooks

⚡ Save events in MySQL / PostgreSQL / SQLite

Best use-case

⚡ Handle repeated abuses on the application-side before sending transactional emails to a fake/bad email address

Features

Version: 0.1.1

Message type Supported
Transactional
Inbound
Broadcasts

Setup

  • You need a MySQL / PostgreSQL instance, or you can use SQLite
  • Download the binary go install github.com/pilinux/postmark@latest
  • Create a free project on Sentry to track errors
    • Choose Go as the platform
    • Save the DNS (format: https://[email protected]/secret_number)
  • Change the filename from .env.sample to .env
  • Update the following variables in the .env file (DO NOT DELETE other non-used variables)
    • APP_PORT
    • SentryDSN
    • USERNAME
    • PASSWORD
    • DBDRIVER
    • DBUSER
    • DBPASS
    • DBNAME
    • DBHOST
    • DBPORT
    • DBTIMEZONE
  • Execute the binary file. It will automatically create a new table postmark_outbounds and migrate the database.
  • On Postmark,
    • select your server and browse the transactional message stream
    • select Add webhook
    • add the following information:
      • Webhook URL: http(s)://<your_ip_or_domain:port>/webhooks/v1/outbound-events If you run the application behind a reverse proxy (NGINX / Apache) and configure a domain, then the URL will be http(s)://<your_domain>/webhooks/v1/outbound-events
      • add Basic auth credentials
      • select the events Postmark should forward to your server

postmark_outbounds database

Name Comment
id primary key
created_at data creation time in the database
updated_at
deleted_at
record_type Delivery / Bounce / SpamComplaint / Open / Click / SubscriptionChange
type HardBounce / SpamComplaint
type_code 1 (for bounce) / 100001 (for spam complaint) / 0 (others)
message_id Postmark message ID
tag user-defined tag
from from email
to destination email
event_at timestamp from Postmark
server_id Postmark server ID

License

© piLinux 2022

Released under the MIT license

This project is built with GoREST.

postmark-webhook-receiver's People

Contributors

pilinux avatar dependabot[bot] avatar

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.