{"id":13547774,"url":"https://github.com/emersion/neutron","last_synced_at":"2025-04-02T20:30:45.897Z","repository":{"id":41384231,"uuid":"53275173","full_name":"emersion/neutron","owner":"emersion","description":"Self-hosted server for the ProtonMail client","archived":true,"fork":false,"pushed_at":"2018-01-07T15:30:58.000Z","size":292,"stargazers_count":516,"open_issues_count":31,"forks_count":41,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-01T23:15:19.928Z","etag":null,"topics":["imap","mail","protonmail","smtp","webmail"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emersion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-06T20:45:15.000Z","updated_at":"2025-03-05T07:40:29.000Z","dependencies_parsed_at":"2022-09-12T04:10:31.067Z","dependency_job_id":null,"html_url":"https://github.com/emersion/neutron","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fneutron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fneutron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fneutron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emersion%2Fneutron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emersion","download_url":"https://codeload.github.com/emersion/neutron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246887825,"owners_count":20850150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["imap","mail","protonmail","smtp","webmail"],"created_at":"2024-08-01T12:01:00.883Z","updated_at":"2025-04-02T20:30:44.987Z","avatar_url":"https://github.com/emersion.png","language":"Go","funding_links":[],"categories":["Go","others"],"sub_categories":[],"readme":"# neutron\n\n[![Build Status](https://travis-ci.org/emersion/neutron.svg?branch=master)](https://travis-ci.org/emersion/neutron)\n[![GoDoc](https://godoc.org/github.com/emersion/neutron?status.svg)](https://godoc.org/github.com/emersion/neutron)\n\nSelf-hosted server for [Protonmail client](https://github.com/ProtonMail/WebClient).\n\n\u003e This project is not affiliated or supported by ProtonMail.\n\n## What is it?\n\nNeutron is a server that will allow the ProtonMail client to be used with\n_backends_. Several backends are available right now:\n* IMAP: this will read and store messages on your IMAP server. Received messages\n  will stay as is (that is, unencrypted) but messages saved from the web client\n  will be encrypted. You will login to the web client with your IMAP username\n  and password.\n* SMTP: this will send messages using your SMTP server. Messages are sent\n  encrypted to the server. If a recipient's public key is not found, the server\n  will decrypt the message before sending it to this recipient.\n* Filesystem: settings, contacts, keys are stored on disk. Keys are always\n  stored encrypted.\n* Memory: all is stored in memory and will be destroyed when the server is\n  stopped.\n\nNeutron is modular so it's easy to create new backends and handle more scenarios.\n\nKeep in mind that Neutron is less secure than ProtonMail: most servers don't\nuse full-disk encryption and aren't under 1,000 meters of granite rock in\nSwitzerland. Also, SRP is not yet supported ([#35](https://github.com/emersion/neutron/issues/35)).\nIf you use Neutron, make sure to [donate to ProtonMail](https://protonmail.com/donate)!\n\n## Install\n\n* Debian, Ubuntu \u0026 Fedora: ~~install from https://packager.io/gh/emersion/neutron\n  and run with `neutronmail run web`~~\n* Other platforms: no packages yet, you'll have to build from source (see below)\n\n### Configuration\n\nSee `config.json`. You'll have to change IMAP and SMTP settings to match your\nmail server config.\n\n```js\n{\n\t\"Memory\": {\n\t\t\"Enabled\": true,\n\t\t\"Populate\": false, // Populate server with default neutron user\n\t\t\"Domains\": [\"emersion.fr\"] // Available e-mail domains\n\t},\n\t\"Imap\": { // IMAP server config\n\t\t\"Enabled\": true,\n\t\t\"Hostname\": \"mail.gandi.net\",\n\t\t\"Tls\": true,\n\t\t\"Suffix\": \"@emersion.fr\" // Will be appended to username when authenticating\n\t},\n\t\"Smtp\": { // SMTP server config\n\t\t\"Enabled\": true,\n\t\t\"Hostname\": \"mail.gandi.net\",\n\t\t\"Port\": 587,\n\t\t\"Suffix\": \"@emersion.fr\" // Will be appended to username when authenticating\n\t},\n\t\"Disk\": { // Store keys, contacts and settings on disk\n\t\t\"Enabled\": true,\n\t\t\"Keys\": { \"Directory\": \"db/keys\" }, // PGP keys location\n\t\t\"Contacts\": { \"Directory\": \"db/contacts\" },\n\t\t\"UsersSettings\": { \"Directory\": \"db/settings\" },\n\t\t\"Addresses\": { \"Directory\": \"db/addresses\" }\n\t}\n}\n```\n\n### Usage\n\nTo generate keys for a new user the first time, just click _Sign up_ on the\nlogin page and enter your IMAP credentials.\n\n### Options\n\n* `-config`: specify a custom config file\n* `-help`: show help\n\n## Build\n\nRequirements:\n* Go (to build the server)\n* Node, NPM (to build the client)\n\n```shell\n# Get the code\ngo get -u github.com/emersion/neutron\ncd $GOPATH/src/github.com/emersion/neutron\n\n# Build the client\ngit submodule init\ngit submodule update\nmake build-client\n\n# Start the server\nmake start\n```\n\n### Docker\n\n```shell\nmake build-docker\ndocker build -t neutron .\ndocker create -p 4000:4000 -v $PWD/config.json:/config.json -v $PWD/db:/db neutron\n```\n\n## Backends\n\nAll backends must implement the [backend interface](https://github.com/emersion/neutron/blob/master/backend/backend.go).\nThe main backend interface is split into multiple other backend interfaces for\ndifferent roles: `ContactsBackend`, `LabelsBackend` and so on. This allows to\nbuild modular backends, e.g. a `MessagesBackend` which stores messages on an\nIMAP server with a `ContactsBackend` which stores contacts on a LDAP server and\na `SendBackend` which sends outgoing messages to a SMTP server.\n\nWriting a backend is just a matter of implementing the necessary functions. You\ncan read the [`memory` backend](https://github.com/emersion/neutron/tree/master/backend/memory)\nto understand how to do that. Docs for the backend are available here:\nhttps://godoc.org/github.com/emersion/neutron/backend#Backend\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fneutron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femersion%2Fneutron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femersion%2Fneutron/lists"}