项目作者: digineo

项目描述 :
Microservice to analyze bounce messages
高级语言: Ruby
项目地址: git://github.com/digineo/sisimai-web.git
创建时间: 2020-06-05T07:59:03Z
项目社区:https://github.com/digineo/sisimai-web

开源协议:MIT License

下载


sisimai-web

Simple Sinatra web application to inspect bounce emails using Sisimai.

We try to follow the Sisimai releases. Feel free to
open an issue or create a pull request, should we fall behind.

Installation from source

Download the code, install the dependencies and start the server.

  1. $ git clone https://github.com/digineo/sisimai-web
  2. $ cd sisimai-web
  3. $ bundle install
  4. $ bundle exec rackup --host 127.0.0.1 --port 3000

Installation with Docker

We automatically build and push Docker images the project’s container registry.

  1. $ docker pull ghcr.io/digineo/sisimai-web
  2. $ docker run -d -p 3000:3000 ghcr.io/digineo/sisimai-web
Image tag corresponds to
ghcr.io/digineo/sisimai-web:master latest Git master branch
ghcr.io/digineo/sisimai-web:4 latest Release in the 4.x series
ghcr.io/digineo/sisimai-web:4.25.15 a specific release
ghcr.io/digineo/sisimai-web:latest the latest build from the above

Note: You might find earlier versions on the Docker Hub, as digineode/sisimai-web;
these releases are now deprecated and unsupported. Expect the Docker Hub repository
to vanish in the near future.

Usage

After starting the application, the (API only) endpoint becomes available
at http://localhost:3000/.

Have a bounce mail:

  1. $ head -5 message.eml
  2. Received: by m.sender.com (Postfix)
  3. id 7A3371230; Sun, 22 Jan 2012 22:17:05 -0800 (PST)
  4. Date: Sun, 22 Jan 2012 22:17:05 -0800 (PST)
  5. From: MAILER-DAEMON@sender.com (Mail Delivery System)
  6. Subject: Undelivered Mail Returned to Sender

… and POST it to the endpoint:

  1. $ curl -sXPOST --data-binary @message.eml http://localhost:3000/ | \
  2. jq 'with_entries(select(.key == ("action","reason","softbounce")))'
  3. {
  4. "action": "failed",
  5. "reason": "userunknown",
  6. "softbounce": 0
  7. }

Credits

Sisimai is an excellent bounce mail parser library by azumakuniyuki.

The test messages for the test suite were extracted from
emiles-go-bounce-parser.

License

Copyright (c) 2020, Dominik Menke, Digineo GmbH

MIT, see LICENSE for details.