|
@@ -67,7 +67,7 @@ docker run --name sl -it --rm \
|
|
Then open http://localhost:7777, you should be able to login with `john@wick.com/password` account!
|
|
Then open http://localhost:7777, you should be able to login with `john@wick.com/password` account!
|
|
|
|
|
|
To use SimpleLogin aliases, you need to deploy it on your server with some DNS setup though,
|
|
To use SimpleLogin aliases, you need to deploy it on your server with some DNS setup though,
|
|
-the following section will show a step-by-step guide on how to get your own email forwarder service!
|
|
|
|
|
|
+the following section will show a step-by-step guide on how to get your own email forwarder service!
|
|
|
|
|
|
# Table of Contents
|
|
# Table of Contents
|
|
|
|
|
|
@@ -156,7 +156,7 @@ An **A record** that points `app.mydomain.com.` to your server IP. To verify, th
|
|
|
|
|
|
```bash
|
|
```bash
|
|
dig @1.1.1.1 app.mydomain.com a
|
|
dig @1.1.1.1 app.mydomain.com a
|
|
-```
|
|
|
|
|
|
+```
|
|
|
|
|
|
should return your server IP.
|
|
should return your server IP.
|
|
|
|
|
|
@@ -194,7 +194,7 @@ To verify, the following command
|
|
|
|
|
|
```bash
|
|
```bash
|
|
dig @1.1.1.1 dkim._domainkey.mydomain.com txt
|
|
dig @1.1.1.1 dkim._domainkey.mydomain.com txt
|
|
-```
|
|
|
|
|
|
+```
|
|
|
|
|
|
should return the above value.
|
|
should return the above value.
|
|
|
|
|
|
@@ -209,10 +209,10 @@ Add a TXT record for `mydomain.com.` with the value:
|
|
|
|
|
|
```
|
|
```
|
|
v=spf1 mx -all
|
|
v=spf1 mx -all
|
|
-```
|
|
|
|
|
|
+```
|
|
|
|
|
|
-What it means is only your server can send email with `@mydomain.com` domain.
|
|
|
|
-To verify, the following command
|
|
|
|
|
|
+What it means is only your server can send email with `@mydomain.com` domain.
|
|
|
|
+To verify, the following command
|
|
|
|
|
|
```bash
|
|
```bash
|
|
dig @1.1.1.1 mydomain.com txt
|
|
dig @1.1.1.1 mydomain.com txt
|
|
@@ -241,7 +241,7 @@ To verify, the following command
|
|
dig @1.1.1.1 _dmarc.mydomain.com txt
|
|
dig @1.1.1.1 _dmarc.mydomain.com txt
|
|
```
|
|
```
|
|
|
|
|
|
-should return the set value.
|
|
|
|
|
|
+should return the set value.
|
|
|
|
|
|
For more information on DMARC, please consult https://tools.ietf.org/html/rfc7489
|
|
For more information on DMARC, please consult https://tools.ietf.org/html/rfc7489
|
|
|
|
|
|
@@ -272,7 +272,7 @@ sudo docker network create -d bridge \
|
|
|
|
|
|
### Postgres
|
|
### Postgres
|
|
|
|
|
|
-This section creates a Postgres database using Docker.
|
|
|
|
|
|
+This section creates a Postgres database using Docker.
|
|
|
|
|
|
If 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.
|
|
If 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.
|
|
|
|
|
|
@@ -376,7 +376,7 @@ smtpd_recipient_restrictions =
|
|
permit
|
|
permit
|
|
```
|
|
```
|
|
|
|
|
|
-Create the `/etc/postfix/pgsql-relay-domains.cf` file with the following content.
|
|
|
|
|
|
+Create the `/etc/postfix/pgsql-relay-domains.cf` file with the following content.
|
|
Make sure that the database config is correctly set and replace `mydomain.com` with your domain.
|
|
Make sure that the database config is correctly set and replace `mydomain.com` with your domain.
|
|
|
|
|
|
```
|
|
```
|
|
@@ -386,11 +386,11 @@ user = myuser
|
|
password = mypassword
|
|
password = mypassword
|
|
dbname = simplelogin
|
|
dbname = simplelogin
|
|
|
|
|
|
-query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
|
|
|
|
|
|
+query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
|
|
UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
|
UNION SELECT '%s' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
|
```
|
|
```
|
|
|
|
|
|
-Create the `/etc/postfix/pgsql-transport-maps.cf` file with the following content.
|
|
|
|
|
|
+Create the `/etc/postfix/pgsql-transport-maps.cf` file with the following content.
|
|
Again, make sure that the database config is correctly set and replace `mydomain.com` with your domain.
|
|
Again, make sure that the database config is correctly set and replace `mydomain.com` with your domain.
|
|
|
|
|
|
```
|
|
```
|
|
@@ -401,7 +401,7 @@ password = mypassword
|
|
dbname = simplelogin
|
|
dbname = simplelogin
|
|
|
|
|
|
# forward to smtp:127.0.0.1:20381 for custom domain AND email domain
|
|
# forward to smtp:127.0.0.1:20381 for custom domain AND email domain
|
|
-query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true
|
|
|
|
|
|
+query = SELECT 'smtp:127.0.0.1:20381' FROM custom_domain WHERE domain = '%s' AND verified=true
|
|
UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
|
UNION SELECT 'smtp:127.0.0.1:20381' WHERE '%s' = 'mydomain.com' LIMIT 1;
|
|
```
|
|
```
|
|
|
|
|
|
@@ -539,7 +539,7 @@ You could make a donation to SimpleLogin on our Patreon page at https://www.patr
|
|
The above self-hosting instructions correspond to a freshly Ubuntu server and doesn't cover all possible server configuration.
|
|
The above self-hosting instructions correspond to a freshly Ubuntu server and doesn't cover all possible server configuration.
|
|
Below are pointers to different topics:
|
|
Below are pointers to different topics:
|
|
|
|
|
|
-- [UFW - uncomplicated firewall](docs/ufw.md)
|
|
|
|
|
|
+- [UFW - uncomplicated firewall](docs/ufw.md)
|
|
- [SES - Amazon Simple Email Service](docs/ses.md)
|
|
- [SES - Amazon Simple Email Service](docs/ses.md)
|
|
|
|
|
|
## Contributing
|
|
## Contributing
|
|
@@ -560,7 +560,7 @@ Then make sure all tests pass
|
|
pytest
|
|
pytest
|
|
```
|
|
```
|
|
|
|
|
|
-Install npm packages
|
|
|
|
|
|
+Install npm packages
|
|
|
|
|
|
```bash
|
|
```bash
|
|
cd static && npm install
|
|
cd static && npm install
|
|
@@ -760,7 +760,7 @@ Output: Same output as for `/api/auth/login` endpoint
|
|
|
|
|
|
Input:
|
|
Input:
|
|
- email
|
|
- email
|
|
-- password
|
|
|
|
|
|
+- password
|
|
|
|
|
|
Output: 200 means user is going to receive an email that contains an *activation code*. User needs to enter this code to confirm their account -> next endpoint.
|
|
Output: 200 means user is going to receive an email that contains an *activation code*. User needs to enter this code to confirm their account -> next endpoint.
|
|
|
|
|
|
@@ -769,7 +769,7 @@ Output: 200 means user is going to receive an email that contains an *activation
|
|
|
|
|
|
Input:
|
|
Input:
|
|
- email
|
|
- email
|
|
-- code: the activation code
|
|
|
|
|
|
+- code: the activation code
|
|
|
|
|
|
Output:
|
|
Output:
|
|
- 200: account is activated. User can login now
|
|
- 200: account is activated. User can login now
|
|
@@ -782,7 +782,7 @@ Input:
|
|
- email
|
|
- email
|
|
|
|
|
|
Output:
|
|
Output:
|
|
-- 200: user is going to receive an email that contains the activation code.
|
|
|
|
|
|
+- 200: user is going to receive an email that contains the activation code.
|
|
|
|
|
|
#### GET /api/aliases
|
|
#### GET /api/aliases
|
|
|
|
|
|
@@ -806,7 +806,8 @@ If success, 200 with the list of aliases, for example:
|
|
"nb_block": 0,
|
|
"nb_block": 0,
|
|
"nb_forward": 0,
|
|
"nb_forward": 0,
|
|
"nb_reply": 0,
|
|
"nb_reply": 0,
|
|
- "enabled": true
|
|
|
|
|
|
+ "enabled": true,
|
|
|
|
+ "note": "This is a note"
|
|
},
|
|
},
|
|
{
|
|
{
|
|
"creation_date": "2020-02-04 16:23:02+00:00",
|
|
"creation_date": "2020-02-04 16:23:02+00:00",
|
|
@@ -816,7 +817,8 @@ If success, 200 with the list of aliases, for example:
|
|
"nb_block": 0,
|
|
"nb_block": 0,
|
|
"nb_forward": 0,
|
|
"nb_forward": 0,
|
|
"nb_reply": 0,
|
|
"nb_reply": 0,
|
|
- "enabled": false
|
|
|
|
|
|
+ "enabled": false,
|
|
|
|
+ "note": null
|
|
}
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -828,7 +830,7 @@ Delete an alias
|
|
|
|
|
|
Input:
|
|
Input:
|
|
- `Authentication` header that contains the api key
|
|
- `Authentication` header that contains the api key
|
|
-- `alias_id` in url.
|
|
|
|
|
|
+- `alias_id` in url.
|
|
|
|
|
|
Output:
|
|
Output:
|
|
If success, 200.
|
|
If success, 200.
|
|
@@ -846,7 +848,7 @@ Enable/disable alias
|
|
|
|
|
|
Input:
|
|
Input:
|
|
- `Authentication` header that contains the api key
|
|
- `Authentication` header that contains the api key
|
|
-- `alias_id` in url.
|
|
|
|
|
|
+- `alias_id` in url.
|
|
|
|
|
|
Output:
|
|
Output:
|
|
If success, 200 along with the new alias status:
|
|
If success, 200 along with the new alias status:
|