{"id":37196334,"url":"https://github.com/nathanaelle/shitenno","last_synced_at":"2026-01-14T22:50:17.694Z","repository":{"id":64306195,"uuid":"48950005","full_name":"nathanaelle/shitenno","owner":"nathanaelle","description":"unified auth for nginx mail / postfix / dovecot","archived":false,"fork":false,"pushed_at":"2017-12-29T06:29:53.000Z","size":42,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-15T04:14:13.230Z","etag":null,"topics":["auth","dovecot","go","golang","http","nginx","postfix"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nathanaelle.png","metadata":{"files":{"readme":"ReadMe.markdown","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-03T15:10:41.000Z","updated_at":"2023-06-02T09:04:24.000Z","dependencies_parsed_at":"2022-12-06T08:22:32.345Z","dependency_job_id":null,"html_url":"https://github.com/nathanaelle/shitenno","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nathanaelle/shitenno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanaelle%2Fshitenno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanaelle%2Fshitenno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanaelle%2Fshitenno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanaelle%2Fshitenno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nathanaelle","download_url":"https://codeload.github.com/nathanaelle/shitenno/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nathanaelle%2Fshitenno/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28436933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auth","dovecot","go","golang","http","nginx","postfix"],"created_at":"2026-01-14T22:50:16.928Z","updated_at":"2026-01-14T22:50:17.687Z","avatar_url":"https://github.com/nathanaelle.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shitenno\n\n\n## What is Shitenno ?\n\nShitenno is an unification proxy for postfix, dovecot and nginx mail.\n\n### Use Case\n\nThe use case is mainly for distributed servers as VPS with imap nginx proxy on some VPS, postfix SMTP on others with a virtual users.\n\nThe common solution are :\n\n  * cron replication of user file backed database\n  * a common database like MySQL, LDAP\n\nThese solutions implies :\n\n  * a lot of scripts\n  * a lot of SPoF and failure sources\n  * Strong coupling between the database and each app\n  * With great complexity comes lots of bugs and security issues\n\nwith shitenno, you have :\n\n  * a proxy for each 3rd party's api, which abstract them in a single HTTP API\n  * upstart, runit or systemd that can spawn the process\n  * a loose coupling between database schema and each 3rd party schema constraint\n  * less complexity\n  * 1 SPoF that can be respawned by upstart, runit or systemd\n\n\n### Main goals\n\n  * [x] postfix socketmap\n  * [x] dovecot proxy dict\n  * [x] nginx mail auth\n  * [x] HTTP client\n  * [x] HTTPS OCSP verification\n  * [x] HTTPS SNI verification\n  * [x] HTTPS HPKP verification\n  * [ ] Logging with syslog5424\n  * [ ] Health monitoring\n  * [ ] HTTP Caching\n  * [ ] TLS Client Certificate\n  * [ ] Custom CA pool\n\n\n## Security Statements\n\n  * this code was audited 0 time\n\n\n## Shitenno Configuration\n\nFor the full options list see [conf/shitenno.conf](conf/shitenno.conf)\n\n\n### Minimal config for postfix\n\n```\nRemoteURL = \"https://remote.tld/path/\"\n\n[Postfix]\n\n```\n\n### Minimal config for postfix and nginx\n\n```\nRemoteURL = \"https://remote.tld/path/\"\n\n[Postfix]\n\n[Nginx]\n\n```\n\n## Tierce Configuration\n\n### Postfix\n\n```\ntransport_maps\t\t= proxy:socketmap:unix:/var/run/shitenno-postfix:verb1\nvirtual_alias_maps\t= proxy:socketmap:unix:/var/run/shitenno-postfix:verb2\n```\n\n### Dovecot\n\n```\nuri = proxy:/var/run/shitenno-dovecot:somewhere\n```\n\n### Nginx\n\n```\nhttp {\n\tupstream shitenno {\n\t\tserver\tunix:/var/run/shitenno-nginx;\n\t}\n\n\tserver {\n\t\tlisten\t\t127.0.0.1:1234;\n\t\tlocation\t/auth_imap {\n\t\t\tproxy_pass      http://shitenno;\n\t\t}\n\t}\n}\n\nmail {\n\tauth_http\tlocalhost:1234/auth_imap;\n}\n```\n\n## HTTP backend\n\nthe HTTP Backend is declared in field `RemoteURL`.\n\nfor each request from nginx, dovecot, postfix, a the request is rewritten as a `JSON` and `POST`ed to the backend.\n\n\n### Common Request\n```\n{\n        \"Verb\": \"verb1\",\n        \"Object\": query_payload\n}\n```\n\n\n### Common Reply\n```\n{\n        \"Verb\": \"verb1\",\n        \"Object\": query_payload,\n        \"Status\": \"OK\" or \"KO\",\n        \"Data\": reply_payload\n}\n```\n\n\n### Postfix\n\nthe verb is the table name in the configuration.\n\nthe `query payload` and `reply payload` are always a string as described in [http://www.postfix.org/postmap.1.html](http://www.postfix.org/postmap.1.html).\n\n\n### Dovecot\n\nthe verb is : `userdb` or `passdb`.\n\nthe `query payload` are :\n```\n{\n        \"Context\": some dovecot context,\n        \"Object\": object requested\n}\n```\n\nthe `reply payload` are ad-hoc reply for `userdb` or `passdb` query verb as in [http://wiki2.dovecot.org/AuthDatabase/Dict](http://wiki2.dovecot.org/AuthDatabase/Dict).\n\n\n### Nginx\n\nthe verb is always `nginx`.\n\nthe `query payload` and `reply payload` are `JSON` as described in [http://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol](http://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol).\n\n\n## License\n2-Clause BSD\n\n\n## Todo\n\n  * write comments\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanaelle%2Fshitenno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnathanaelle%2Fshitenno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnathanaelle%2Fshitenno/lists"}