Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

cookpad/sisito-api

Repository files navigation

sisito-api

Sisito API server.

Build Status

Maintenance notice

This project is no longer maintained.

Usage

$ sisito-api --help
Usage of ./sisito-api:
  -config string
      config file path (default "sisito-api.toml")
  -version
      show version

Getting Started

cd docker
docker-compose build
docker-compose up
$ curl -u foo:bar localhost:8080/blacklist
{"recipients":["foo@example.com"]}

API

$ curl -u foo:bar localhost:8080/blacklist
{"recipients":["foo@example.com"]}
$ curl -u foo:bar localhost:8080/listed?recipient=foo@example.com
{"listed":true}
$ curl -s -u foo:bar localhost:8080/recent?recipient=foo@example.com | jq .
{
  "addresser": "no-reply@sender.example.com",
  "alias": "foo@example.com",
  "created_at": "2017-03-01T00:00:00Z",
  "deliverystatus": "5.0.0",
  "destination": "example.com",
  "diagnosticcode": "550 Unknown user foo@example.com",
  "digest": "767e74eab7081c41e0b83630511139d130249666",
  "lhost": "mail.sender.example.com",
  "messageid": "foo_example_com_message_id",
  "reason": "filtered",
  "recipient": "foo@example.com",
  "rhost": "mail.example.com",
  "senderdomain": "sender.example.com",
  "smtpagent": "MTA::Postfix",
  "smtpcommand": "DATA",
  "softbounce": true,
  "subject": "how are you?",
  "timestamp": "2017-03-01T00:00:00Z",
  "timezoneoffset": "+0900",
  "updated_at": "2017-03-01T00:00:00Z",
  "whitelisted": false
}