{"id":13453045,"url":"https://github.com/simple-login/app","last_synced_at":"2026-04-08T16:04:03.723Z","repository":{"id":37412505,"uuid":"228877522","full_name":"simple-login/app","owner":"simple-login","description":"The SimpleLogin back-end and web app","archived":false,"fork":false,"pushed_at":"2026-04-08T14:08:55.000Z","size":17794,"stargazers_count":6578,"open_issues_count":224,"forks_count":574,"subscribers_count":51,"default_branch":"master","last_synced_at":"2026-04-08T15:23:44.134Z","etag":null,"topics":["aliases","email","flask","hacktoberfest","simplelogin"],"latest_commit_sha":null,"homepage":"https://simplelogin.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simple-login.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"simplelogin"}},"created_at":"2019-12-18T16:14:58.000Z","updated_at":"2026-04-08T14:00:50.000Z","dependencies_parsed_at":"2026-02-13T15:08:30.118Z","dependency_job_id":null,"html_url":"https://github.com/simple-login/app","commit_stats":{"total_commits":4535,"total_committers":77,"mean_commits":"58.896103896103895","dds":0.6833517089305403,"last_synced_commit":"0d7c946ba85efe1f295078a5e84700051675039c"},"previous_names":[],"tags_count":313,"template":false,"template_full_name":null,"purl":"pkg:github/simple-login/app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-login%2Fapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-login%2Fapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-login%2Fapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-login%2Fapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simple-login","download_url":"https://codeload.github.com/simple-login/app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simple-login%2Fapp/sbom","scorecard":{"id":825497,"data":{"date":"2025-08-11","repo":{"name":"github.com/simple-login/app","commit":"532d69844d2b37a0665fce1b357849388b03ce3e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Code-Review","score":6,"reason":"Found 9/14 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Affero General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/main.yml:119"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:127: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:132: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:150: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:165: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:184: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:204: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:240: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:114: update your workflow using https://app.stepsecurity.io/secureworkflow/simple-login/app/main.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Warn: containerImage not pinned by hash: Dockerfile:7: pin your Docker image by updating ubuntu:22.04 to ubuntu:22.04@sha256:1aa979d85661c488ce030ac292876cf6ed04535d3a237e49f61542d8e5de5ae0","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   2 containerImage dependencies pinned","Info:   1 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"68 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2023-120 / GHSA-45c4-8wx5-qw6w","Warn: Project is vulnerable to: PYSEC-2024-24 / GHSA-5h86-8mv2-jq9f","Warn: Project is vulnerable to: GHSA-5m98-qgg9-wh84","Warn: Project is vulnerable to: GHSA-7gpw-8wmc-pm8g","Warn: Project is vulnerable to: GHSA-8495-4g3g-x7pr","Warn: Project is vulnerable to: PYSEC-2024-26 / GHSA-8qpw-xqxj-h4r2","Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: PYSEC-2023-246 / GHSA-gfw2-4jvh-wgfg","Warn: Project is vulnerable to: GHSA-pjjw-qhg8-p2p9","Warn: Project is vulnerable to: PYSEC-2023-250 / GHSA-q3qx-c6g2-7pw2","Warn: Project is vulnerable to: PYSEC-2023-251 / GHSA-qvrw-v9rv-5rjx","Warn: Project is vulnerable to: PYSEC-2024-221 / GHSA-pr2m-px7j-xg65","Warn: Project is vulnerable to: GHSA-wgjv-9j3q-jhg8","Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: GHSA-39hc-v87j-747x","Warn: Project is vulnerable to: GHSA-3ww4-gg4f-jr7f","Warn: Project is vulnerable to: GHSA-5cpq-8wj7-hf2v","Warn: Project is vulnerable to: GHSA-9v9h-cgj8-h64p","Warn: Project is vulnerable to: GHSA-h4gh-qq45-vh27","Warn: Project is vulnerable to: PYSEC-2023-254 / GHSA-jfhm-5ghh-2f97","Warn: Project is vulnerable to: GHSA-jm77-qphf-c4w8","Warn: Project is vulnerable to: GHSA-v8gr-m533-ghj9","Warn: Project is vulnerable to: GHSA-w7pp-m8wf-vj6r","Warn: Project is vulnerable to: GHSA-x4qr-2fvf-3mr5","Warn: Project is vulnerable to: GHSA-3rq5-2g8h-59hc","Warn: Project is vulnerable to: PYSEC-2023-62 / GHSA-m2qf-hxjv-5gpq","Warn: Project is vulnerable to: GHSA-43qf-4rqw-9q2g","Warn: Project is vulnerable to: GHSA-7rxf-gvfg-47g4","Warn: Project is vulnerable to: GHSA-84pr-m4jr-85g5","Warn: Project is vulnerable to: GHSA-8vgw-p6qm-5gr7","Warn: Project is vulnerable to: PYSEC-2024-71 / GHSA-hxwh-jpp2-84pm","Warn: Project is vulnerable to: PYSEC-2023-177 / GHSA-x7m3-jprg-wc5g","Warn: Project is vulnerable to: GHSA-hc5x-x2vx-497g","Warn: Project is vulnerable to: GHSA-w3h3-4rj7-4ph4","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-29gw-9793-fvw7","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2024-104 / GHSA-cw2r-4p82-qv79","Warn: Project is vulnerable to: GHSA-gwp4-mcv4-w95j","Warn: Project is vulnerable to: GHSA-j857-7rvv-vj97","Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: GHSA-j225-cvw7-qrx7","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2020-100 / GHSA-xrx6-fmxq-rjj2","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: GHSA-2m57-hf25-phgg","Warn: Project is vulnerable to: GHSA-g7vv-2v7x-gj9p","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2024-187 / GHSA-rqc4-2hc7-8c8v","Warn: Project is vulnerable to: PYSEC-2024-188 / GHSA-mg3v-6m49-jhp3","Warn: Project is vulnerable to: GHSA-2g68-c3qc-8985","Warn: Project is vulnerable to: GHSA-f9vj-2wh5-fj8j","Warn: Project is vulnerable to: PYSEC-2023-221 / GHSA-hrfv-mqp8-q5rw","Warn: Project is vulnerable to: PYSEC-2023-57 / GHSA-px8h-6qxv-m22q","Warn: Project is vulnerable to: GHSA-q34m-jh98-gwm2","Warn: Project is vulnerable to: PYSEC-2023-58 / GHSA-xg9f-g7g7-2323","Warn: Project is vulnerable to: PYSEC-2022-203","Warn: Project is vulnerable to: GHSA-593m-55hh-j8gv","Warn: Project is vulnerable to: GHSA-m4ch-4m5f-2gp6","Warn: Project is vulnerable to: GHSA-5j4c-8p2g-v4jx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T16:32:52.146Z","repository_id":37412505,"created_at":"2025-08-23T16:32:52.147Z","updated_at":"2025-08-23T16:32:52.147Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31562697,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["aliases","email","flask","hacktoberfest","simplelogin"],"created_at":"2024-07-31T08:00:32.041Z","updated_at":"2026-04-08T16:04:03.712Z","avatar_url":"https://github.com/simple-login.png","language":"Python","readme":"\n\n[SimpleLogin](https://simplelogin.io) | Protect your online identity with email alias\n---\n\u003cp\u003e\n\u003ca href=\"https://chrome.google.com/webstore/detail/dphilobhebphkdjbpfohgikllaljmgbn\"\u003e\n    \u003cimg src=\"https://img.shields.io/chrome-web-store/rating/dphilobhebphkdjbpfohgikllaljmgbn?label=Chrome%20Extension\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://addons.mozilla.org/firefox/addon/simplelogin/\"\u003e\n\u003cimg src=\"https://img.shields.io/amo/rating/simplelogin?label=Firefox%20Add-On\u0026logo=SimpleLogin\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"./LICENSE\"\u003e\n\u003cimg src=\"https://img.shields.io/github/license/simple-login/app\"\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://twitter.com/simplelogin\"\u003e\n\u003cimg src=\"https://img.shields.io/twitter/follow/simplelogin?style=social\"\u003e\n\u003c/a\u003e\n\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://simplelogin.io\"\u003e\n        \u003cimg src=\"./docs/hero.png\" height=\"600px\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nYour email address is your **online identity**. When you use the same email address everywhere, you can be easily tracked.\nMore information on https://simplelogin.io\n\nThis README contains instructions on how to self host SimpleLogin.\n\nOnce you have your own SimpleLogin instance running, you can change the `API URL` in SimpleLogin's Chrome/Firefox extension, Android/iOS app to your server.\n\nSimpleLogin roadmap is at https://github.com/simple-login/app/projects/1 and our forum at https://github.com/simple-login/app/discussions, feel free to submit new ideas or vote on features.\n\n### Prerequisites\n\n- a Linux server (either a VM or dedicated server). This doc shows the setup for Ubuntu 18.04 LTS but the steps could be adapted for other popular Linux distributions. As most of components run as Docker container and Docker can be a bit heavy, having at least 2 GB of RAM is recommended. The server needs to have the port 25 (email), 80, 443 (for the webapp), 22 (so you can ssh into it) open.\n\n- a domain that you can config the DNS. It could be a sub-domain. In the rest of the doc, let's say it's `mydomain.com` for the email and `app.mydomain.com` for SimpleLogin webapp. Please make sure to replace these values by your domain name whenever they appear in the doc. A trick we use is to download this README file on your computer and replace all `mydomain.com` occurrences by your domain.\n\nExcept for the DNS setup that is usually done on your domain registrar interface, all the below steps are to be done on your server. The commands are to run with `bash` (or any bash-compatible shell like `zsh`) being the shell. If you use other shells like `fish`, please make sure to adapt the commands.\n\n### Some utility packages\n\nThese packages are used to verify the setup. Install them by:\n\n```bash\nsudo apt update \u0026\u0026 sudo apt install -y dnsutils\n```\n\nCreate a directory to store SimpleLogin data:\n\n```bash\nmkdir sl\nmkdir sl/pgp # to store PGP key\nmkdir sl/db # to store database\nmkdir sl/upload # to store quarantine emails\n```\n\n### DKIM\n\nFrom Wikipedia https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail\n\n\u003e DomainKeys Identified Mail (DKIM) is an email authentication method designed to detect forged sender addresses in emails (email spoofing), a technique often used in phishing and email spam.\n\nSetting up DKIM is highly recommended to reduce the chance your emails ending up in the recipient's Spam folder.\n\nFirst you need to generate a private and public key for DKIM:\n\n```bash\nopenssl genrsa -out dkim.key -traditional 1024\nopenssl rsa -in dkim.key -pubout -out dkim.pub.key\n```\n\nYou will need the files `dkim.key` and `dkim.pub.key` for the next steps.\n\nFor email gurus, we have chosen 1024 key length instead of 2048 for DNS simplicity as some registrars don't play well with long TXT record.\n\n### DNS\n\nPlease note that DNS changes could take up to 24 hours to propagate. In practice, it's a lot faster though (~1 minute or so in our test). In DNS setup, we usually use domain with a trailing dot (`.`) at the end to force using absolute domain.\n\n\n#### MX record\nCreate a **MX record** that points `mydomain.com.` to `app.mydomain.com.` with priority 10.\n\nTo verify if the DNS works, the following command\n\n```bash\ndig @1.1.1.1 mydomain.com mx\n```\n\nshould return:\n\n```\nmydomain.com.\t3600\tIN\tMX\t10 app.mydomain.com.\n```\n\n#### A record\nAn **A record** that points `app.mydomain.com.` to your server IP.\nIf you are using CloudFlare, we recommend to disable the \"Proxy\" option.\nTo verify, the following command\n\n```bash\ndig @1.1.1.1 app.mydomain.com a\n```\n\nshould return your server IP.\n\n#### DKIM\nSet up DKIM by adding a TXT record for `dkim._domainkey.mydomain.com.` with the following value:\n\n```\nv=DKIM1; k=rsa; p=PUBLIC_KEY\n```\n\nwith `PUBLIC_KEY` being your `dkim.pub.key` but\n- remove the `-----BEGIN PUBLIC KEY-----` and `-----END PUBLIC KEY-----`\n- join all the lines on a single line.\n\nFor example, if your `dkim.pub.key` is\n\n```\n-----BEGIN PUBLIC KEY-----\nab\ncd\nef\ngh\n-----END PUBLIC KEY-----\n```\n\nthen the `PUBLIC_KEY` would be `abcdefgh`.\n\nYou can get the `PUBLIC_KEY` by running this command:\n\n```bash\nsed \"s/-----BEGIN PUBLIC KEY-----/v=DKIM1; k=rsa; p=/g\" $(pwd)/dkim.pub.key | sed 's/-----END PUBLIC KEY-----//g' |tr -d '\\n' | awk 1\n```\n\nTo verify, the following command\n\n```bash\ndig @1.1.1.1 dkim._domainkey.mydomain.com txt\n```\n\nshould return the above value.\n\n#### SPF\n\nFrom Wikipedia https://en.wikipedia.org/wiki/Sender_Policy_Framework\n\n\u003e Sender Policy Framework (SPF) is an email authentication method designed to detect forging sender addresses during the delivery of the email\n\nSimilar to DKIM, setting up SPF is highly recommended.\nAdd a TXT record for `mydomain.com.` with the value:\n\n```\nv=spf1 mx ~all\n```\n\nWhat it means is only your server can send email with `@mydomain.com` domain.\nTo verify, the following command\n\n```bash\ndig @1.1.1.1 mydomain.com txt\n```\n\nshould return the above value.\n\n#### DMARC\n\nFrom Wikipedia https://en.wikipedia.org/wiki/DMARC\n\n\u003e It (DMARC) is designed to give email domain owners the ability to protect their domain from unauthorized use, commonly known as email spoofing\n\nSetting up DMARC is also recommended.\nAdd a TXT record for `_dmarc.mydomain.com.` with the following value\n\n```\nv=DMARC1; p=quarantine; adkim=r; aspf=r\n```\n\nThis is a `relaxed` DMARC policy. You can also use a more strict policy with `v=DMARC1; p=reject; adkim=s; aspf=s` value.\n\nTo verify, the following command\n\n```bash\ndig @1.1.1.1 _dmarc.mydomain.com txt\n```\n\nshould return the set value.\n\nFor more information on DMARC, please consult https://tools.ietf.org/html/rfc7489\n\n### Docker\n\nNow the boring DNS stuffs are done, let's do something more fun!\n\nIf you don't already have Docker installed on your server, please follow the steps on [Docker CE for Ubuntu](https://docs.docker.com/v17.12/install/linux/docker-ce/ubuntu/) to install Docker.\n\nYou can also install Docker using the [docker-install](https://github.com/docker/docker-install) script which is\n\n```bash\ncurl -fsSL https://get.docker.com | sh\n```\n\n### Prepare the Docker network\n\nThis Docker network will be used by the other Docker containers run in the next steps.\nLater, we will setup Postfix to authorize this network.\n\n```bash\nsudo docker network create -d bridge \\\n    --subnet=10.0.0.0/24 \\\n    --gateway=10.0.0.1 \\\n    sl-network\n```\n\n### Postgres\n\nThis section creates a Postgres database using Docker.\n\nIf you already have a Postgres database in use, you can skip this section and just copy the database configuration (i.e. host, port, username, password, database name) to use in the next sections.\n\nRun a Postgres Docker container as your Postgres database server. Make sure to replace `myuser` and `mypassword` with something more secret.\n\n```bash\ndocker run -d \\\n    --name sl-db \\\n    -e POSTGRES_PASSWORD=mypassword \\\n    -e POSTGRES_USER=myuser \\\n    -e POSTGRES_DB=simplelogin \\\n    -p 127.0.0.1:5432:5432 \\\n    -v $(pwd)/sl/db:/var/lib/postgresql/data \\\n    --restart always \\\n    --network=\"sl-network\" \\\n    postgres:12.1\n```\n\nTo test whether the database operates correctly or not, run the following command:\n\n```bash\ndocker exec -it sl-db psql -U myuser simplelogin\n```\n\nyou should be logged in the postgres console. Type `exit` to exit postgres console.\n\n### Postfix\n\nInstall `postfix` and `postfix-pgsql`. The latter is used to connect Postfix and the Postgres database in the next steps.\n\n```bash\nsudo apt-get install -y postfix postfix-pgsql -y\n```\n\nChoose \"Internet Site\" in Postfix installation window then keep using the proposed value as *System mail name* in the next window.\n\n![](./docs/postfix-installation.png)\n![](./docs/postfix-installation2.png)\n\nReplace `/etc/postfix/main.cf` with the following content. Make sure to replace `mydomain.com` by your domain.\n\n```\n# POSTFIX config file, adapted for SimpleLogin\nsmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)\nbiff = no\n\n# appending .domain is the MUA's job.\nappend_dot_mydomain = no\n\n# Uncomment the next line to generate \"delayed mail\" warnings\n#delay_warning_time = 4h\n\nreadme_directory = no\n\n# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on\n# fresh installs.\ncompatibility_level = 2\n\n# TLS parameters\nsmtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem\nsmtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key\nsmtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache\nsmtp_tls_session_cache_database = btree:${data_directory}/smtp_scache\nsmtp_tls_security_level = may\nsmtpd_tls_security_level = may\n\n# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for\n# information on enabling SSL in the smtp client.\n\nalias_maps = hash:/etc/aliases\nmynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 10.0.0.0/24\n\n# Set your domain here\nmydestination =\nmyhostname = app.mydomain.com\nmydomain = mydomain.com\nmyorigin = mydomain.com\n\nrelay_domains = pgsql:/etc/postfix/pgsql-relay-domains.cf\ntransport_maps = pgsql:/etc/postfix/pgsql-transport-maps.cf\n\n# HELO restrictions\nsmtpd_delay_reject = yes\nsmtpd_helo_required = yes\nsmtpd_helo_restrictions =\n    permit_mynetworks,\n    reject_non_fqdn_helo_hostname,\n    reject_invalid_helo_hostname,\n    permit\n\n# Sender restrictions:\nsmtpd_sender_restrictions =\n    permit_mynetworks,\n    reject_non_fqdn_sender,\n    reject_unknown_sender_domain,\n    permit\n\n# Recipient restrictions:\nsmtpd_recipient_restrictions =\n   reject_unauth_pipelining,\n   reject_non_fqdn_recipient,\n   reject_unknown_recipient_domain,\n   permit_mynetworks,\n   reject_unauth_destination,\n   reject_rbl_client zen.spamhaus.org=127.0.0.[2..11],\n   reject_rhsbl_sender dbl.spamhaus.org=127.0.1.[2..99],\n   reject_rhsbl_helo dbl.spamhaus.org=127.0.1.[2..99],\n   reject_rhsbl_reverse_client dbl.spamhaus.org=127.0.1.[2..99],\n   warn_if_reject reject_rbl_client zen.spamhaus.org=127.255.255.[1..255],\n   reject_rbl_client bl.spamcop.net,\n   permit\n```\n\nCheck that the ssl certificates `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key` exist. Depending on the linux distribution you are using they may or may not be present. If they are not, you will need to generate them with this command:\n\n```bash\nopenssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem\n```\n\nCreate the `/etc/postfix/pgsql-relay-domains.cf` file with the following content.\nMake sure that the database config is correctly set, replace `mydomain.com` with your domain, update 'myuser' and 'mypassword' with your postgres credentials.\n\n```\n# postgres config\nhosts = localhost\nuser = myuser\npassword = mypassword\ndbname = simplelogin\n\nquery = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true\n    UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1;\n```\n\nCreate the `/etc/postfix/pgsql-transport-maps.cf` file with the following content.\nAgain, make sure that the database config is correctly set, replace `mydomain.com` with your domain, update 'myuser' and 'mypassword' with your postgres credentials.\n\n```\n# postgres config\nhosts = localhost\nuser = myuser\npassword = mypassword\ndbname = simplelogin\n\n# forward to smtp:127.0.0.1:20381 for custom domain AND email domain\nquery = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true\n    UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1;\n```\n\nFinally, restart Postfix\n\n```bash\nsudo systemctl restart postfix\n```\n\n### Run SimpleLogin Docker containers\n\nTo run SimpleLogin, you need a config file at `$(pwd)/simplelogin.env`. Below is an example that you can use right away, make sure to\n\n- replace `mydomain.com` by your domain,\n- set `FLASK_SECRET` to a secret string,\n- update 'myuser' and 'mypassword' with your database credentials used in previous step.\n\nAll possible parameters can be found in [config example](example.env). Some are optional and are commented out by default.\nSome have \"dummy\" values, fill them up if you want to enable these features (Paddle, AWS, etc).\n\n```.env\n# WebApp URL\nURL=http://app.mydomain.com\n\n# domain used to create alias\nEMAIL_DOMAIN=mydomain.com\n\n# transactional email is sent from this email address\nSUPPORT_EMAIL=support@mydomain.com\n\n# custom domain needs to point to these MX servers\nEMAIL_SERVERS_WITH_PRIORITY=[(10, \"app.mydomain.com.\")]\n\n# By default, new aliases must end with \".{random_word}\". This is to avoid a person taking all \"nice\" aliases.\n# this option doesn't make sense in self-hosted. Set this variable to disable this option.\nDISABLE_ALIAS_SUFFIX=1\n\n# the DKIM private key used to compute DKIM-Signature\nDKIM_PRIVATE_KEY_PATH=/dkim.key\n\n# DB Connection\nDB_URI=postgresql://myuser:mypassword@sl-db:5432/simplelogin\n\nFLASK_SECRET=put_something_secret_here\n\nGNUPGHOME=/sl/pgp\n\nLOCAL_FILE_UPLOAD=1\n\nPOSTFIX_SERVER=10.0.0.1\n```\n\n\nBefore running the webapp, you need to prepare the database by running the migration:\n\n```bash\ndocker run --rm \\\n    --name sl-migration \\\n    -v $(pwd)/sl:/sl \\\n    -v $(pwd)/sl/upload:/code/static/upload \\\n    -v $(pwd)/dkim.key:/dkim.key \\\n    -v $(pwd)/dkim.pub.key:/dkim.pub.key \\\n    -v $(pwd)/simplelogin.env:/code/.env \\\n    --network=\"sl-network\" \\\n    simplelogin/app:3.4.0 flask db upgrade\n```\n\nThis command could take a while to download the `simplelogin/app` docker image.\n\nInit data\n\n```bash\ndocker run --rm \\\n    --name sl-init \\\n    -v $(pwd)/sl:/sl \\\n    -v $(pwd)/simplelogin.env:/code/.env \\\n    -v $(pwd)/dkim.key:/dkim.key \\\n    -v $(pwd)/dkim.pub.key:/dkim.pub.key \\\n    --network=\"sl-network\" \\\n    simplelogin/app:3.4.0 python init_app.py\n```\n\nNow, it's time to run the `webapp` container!\n\n```bash\ndocker run -d \\\n    --name sl-app \\\n    -v $(pwd)/sl:/sl \\\n    -v $(pwd)/sl/upload:/code/static/upload \\\n    -v $(pwd)/simplelogin.env:/code/.env \\\n    -v $(pwd)/dkim.key:/dkim.key \\\n    -v $(pwd)/dkim.pub.key:/dkim.pub.key \\\n    -p 127.0.0.1:7777:7777 \\\n    --restart always \\\n    --network=\"sl-network\" \\\n    simplelogin/app:3.4.0\n```\n\nNext run the `email handler`\n\n```bash\ndocker run -d \\\n    --name sl-email \\\n    -v $(pwd)/sl:/sl \\\n    -v $(pwd)/sl/upload:/code/static/upload \\\n    -v $(pwd)/simplelogin.env:/code/.env \\\n    -v $(pwd)/dkim.key:/dkim.key \\\n    -v $(pwd)/dkim.pub.key:/dkim.pub.key \\\n    -p 127.0.0.1:20381:20381 \\\n    --restart always \\\n    --network=\"sl-network\" \\\n    simplelogin/app:3.4.0 python email_handler.py\n```\n\nAnd finally the `job runner`\n\n```bash\ndocker run -d \\\n    --name sl-job-runner \\\n    -v $(pwd)/sl:/sl \\\n    -v $(pwd)/sl/upload:/code/static/upload \\\n    -v $(pwd)/simplelogin.env:/code/.env \\\n    -v $(pwd)/dkim.key:/dkim.key \\\n    -v $(pwd)/dkim.pub.key:/dkim.pub.key \\\n    --restart always \\\n    --network=\"sl-network\" \\\n    simplelogin/app:3.4.0 python job_runner.py\n```\n\n### Nginx\n\nInstall Nginx and make sure to replace `mydomain.com` by your domain\n\n```bash\nsudo apt-get install -y nginx\n```\n\nThen, create `/etc/nginx/sites-enabled/simplelogin` with the following lines:\n\n```nginx\nserver {\n    server_name  app.mydomain.com;\n\n    location / {\n        proxy_pass              http://localhost:7777;\n    \tproxy_set_header        Host $host;\n    }\n}\n```\n\nNote: If `/etc/nginx/sites-enabled/default` exists, delete it or certbot will fail due to the conflict. The `simplelogin` file should be the only file in `sites-enabled`.\n\nReload Nginx with the command below\n\n```bash\nsudo systemctl reload nginx\n```\n\nAt this step, you should also setup the SSL for Nginx. [Here's our guide how](./docs/ssl.md).\n\n### Enjoy!\n\nIf all the above steps are successful, open http://app.mydomain.com/ and create your first account!\n\nBy default, new accounts are not premium so don't have unlimited alias. To make your account premium,\nplease go to the database, table \"users\" and set \"lifetime\" column to \"1\" or \"TRUE\":\n\n```\ndocker exec -it sl-db psql -U myuser simplelogin\nUPDATE users SET lifetime = TRUE;\nexit\n```\n\nOnce you've created all your desired login accounts, add these lines to `/simplelogin.env` to disable further registrations:\n\n```.env\nDISABLE_REGISTRATION=1\nDISABLE_ONBOARDING=true\n```\n\nThen restart the web app to apply: `docker restart sl-app`\n\n### Donations Welcome\n\nYou don't have to pay anything to SimpleLogin to use all its features.\nIf you like the project, you can make a donation on our Open Collective page at https://opencollective.com/simplelogin\n\n### Misc\n\nThe above self-hosting instructions correspond to a freshly Ubuntu server and doesn't cover all possible server configuration.\nBelow are pointers to different topics:\n\n- [Troubleshooting](docs/troubleshooting.md)\n- [Enable SSL](docs/ssl.md)\n- [UFW - uncomplicated firewall](docs/ufw.md)\n- [SES - Amazon Simple Email Service](docs/ses.md)\n- [Upgrade existing SimpleLogin installation](docs/upgrade.md)\n- [Enforce SPF](docs/enforce-spf.md)\n- [Postfix TLS](docs/postfix-tls.md)\n- [Postfix - DNSBL with Spamhaus](docs/spamhaus-dqs.md)\n\n## ❤️ Contributors\n\nThanks go to these wonderful people:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.linkedin.com/in/vandungnguyen/\"\u003e\u003cimg src=\"https://simplelogin.io/about/dung.jpg\" width=\"100px;\" alt=\"Dung Nguyen Van\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDung Nguyen Van\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.linkedin.com/in/giuseppe-f-83449ba4/\"\u003e\u003cimg src=\"https://simplelogin.io/about/giuseppe.jpeg\" width=\"100px;\" alt=\"Giuseppe Federico\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eGiuseppe Federico\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/NinhDinh\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/1419742?s=460\u0026v=4\" width=\"100px;\" alt=\"Ninh Dinh\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eNinh Dinh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/ntung\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/663341?s=460\u0026v=4\" width=\"100px;\" alt=\"Tung Nguyen V. N.\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eTung Nguyen V. N.\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://www.linkedin.com/in/nguyenkims/\"\u003e\u003cimg src=\"https://simplelogin.io/about/me.jpeg\" width=\"100px;\" alt=\"Son Nguyen Kim\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSon Nguyen Kim\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/developStorm\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/59678453?s=460\u0026u=3813d29a125b3edeb44019234672b704f7b9b76a\u0026v=4\" width=\"100px;\" alt=\"Raymond Nook\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRaymond Nook\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/SibrenVasse\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/5833571?s=460\u0026u=78aea62ffc215885a0319437fc629a7596ddea31\u0026v=4\" width=\"100px;\" alt=\"Sibren Vasse\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSibren Vasse\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/TheLastProject\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/1885159?s=460\u0026u=ebeeb346c4083c0d493a134f4774f925d3437f98\u0026v=4\" width=\"100px;\" alt=\"Sylvia van Os\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eSylvia van Os\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n","funding_links":["https://opencollective.com/simplelogin"],"categories":["CSS","Mail Services","Python","Security","Projects","Apps","flask","Self-Hosted Services"],"sub_categories":["Email Alias Services (Anonymous Forwarding)","Privacy","Open Source Projects","Mail","Misc"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-login%2Fapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimple-login%2Fapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimple-login%2Fapp/lists"}