Skip to content

Commit 163e15a

Browse files
authored
Add email and AWS SES notification guides (#28)
* Add notification guides for email and Amazon SES
1 parent 9d6ae28 commit 163e15a

File tree

5 files changed

+160
-19
lines changed

5 files changed

+160
-19
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Email
2+
3+
!!! info
4+
Follow guidance on [enabling notifications](../../operating/setup-notifications/) first.
5+
6+
## What It Is?
7+
8+
[Amazon SES](https://aws.amazon.com/ses/) is a cost-effective email service that offers cost-effective email sending,
9+
at a cost of $0.10 per 1,000 emails.
10+
No monthly fees or upfront commitments are required.
11+
12+
## Supported Ways To Receive Notifications
13+
14+
- Email
15+
16+
## What To Know Before You Start
17+
18+
Familiarity with DNS and Amazon AWS is required, including appropriately securing your AWS account.
19+
20+
## Configuring Amazon SES
21+
22+
!!! info
23+
Full configuration options and capabilities are available via [Apprise](https://github.com/caronc/apprise/wiki/Notify_pushbullet)
24+
25+
1. Create an IAM user that has access to SES. The user should have a programmatic access key and secret key.
26+
2. Attach the [following policy](https://docs.aws.amazon.com/ses/latest/DeveloperGuide/control-user-access.html) to the user:
27+
```json
28+
{
29+
"Version":"2012-10-17",
30+
"Statement":[
31+
{
32+
"Effect":"Allow",
33+
"Action":[
34+
"ses:SendEmail",
35+
"ses:SendRawEmail"
36+
],
37+
"Resource":"*"
38+
}
39+
]
40+
}
41+
```
42+
3. Set up Amazon SES for your domain, which includes domain verification and DKIM record setup.
43+
DKIM verification is automated with Route 53.
44+
For other DNS providers, manually add the necessary DNS CNAME records for DKIM verification.
45+
4. Verify your domain to start sending emails, which can take from minutes and up to 72 hours.
46+
5. Copy the example `notification.yml.example` file to the `notification.yml` file:
47+
48+
```bash
49+
cp ~/voi/docker/notification.yml.example ~/voi/docker/notification.yml
50+
```
51+
52+
6. Update the **NOTIFICATION_URLS** value in `notification.yml` file with your Email mailto:// link
53+
54+
``` yaml
55+
NOTIFICATION_URLS="ses://<sender_account>@<sender_domain>/<access_key>/access_secret>/<region>/<recipient_email>/?from=<sender_name>"
56+
```
57+
58+
If the sender name contains whitespaces make sure you substitute them with `%20` in the `from` parameter.
59+
60+
!!! tip
61+
If you want to use multiple notification mechanisms, separate them with a comma.
62+
For example, to use both Discord and Email for notification, you would set the **NOTIFICATION_URLS** value
63+
in the `notification.yml` file to:
64+
65+
```yaml
66+
NOTIFICATION_URLS="discord://<webhook_id>/<webhook_token>,ses://<sender_account>@<sender_domain>/<access_key>/access_secret>/<region>/<recipient_email>/?from=<sender_name>"
67+
```
68+
69+
--8<-- "notification-guides/notification-test.md"

docs/notification-guides/email.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Email
2+
3+
!!! info
4+
Follow guidance on [enabling notifications](../../operating/setup-notifications/) first.
5+
6+
## What It Is?
7+
8+
Notifications can be sent via email.
9+
10+
## Supported Ways To Receive Notifications
11+
12+
- Email
13+
14+
## What To Know Before You Start
15+
16+
Email sending is done by using an existing email provider that offers SMTP services.
17+
This is a simple and easy way to send notifications to your email address, but may require some setup.
18+
19+
If you own your own domain, and control DNS settings,
20+
you can use a service such as [Amazon SES](amazon-ses.md) to send email in a cost-effective way.
21+
22+
If you do not own your own domain,
23+
or are unable to control DNS settings, you can use a free email provider such as live.com to send email.
24+
Some providers (e.g., Gmail)
25+
have security mechanisms in place that may prevent you from easily sending email using SMTP.
26+
27+
Learn more at [Apprise Notify Email](https://github.com/caronc/apprise/wiki/Notify_email)
28+
29+
### Why Don't You Offer a Free Email Notification Service?
30+
31+
Collecting and storing email addresses, that would be associated with specific Voi accounts
32+
would require us to comply with data protection laws, which would be a significant burden
33+
for us to manage.
34+
The current setup allows you to use your own email provider, and we do not have to manage any personal data.
35+
36+
## Using Live.com to Send Email
37+
38+
!!! note
39+
Full configuration options and capabilities are available via [Apprise](https://github.com/caronc/apprise/wiki/Notify_pushbullet)
40+
and may be required depending on your email provider and/or SMTP configuration.
41+
42+
1. Create a new email account used only for notifications. This is to ensure that your main email account is not compromised if the notification email account is compromised.
43+
2. Configure the notification email account to forward emails to your main email account.
44+
3. Set your notification email to have a strong password with no special characters. This is to ensure that the password can be used in the `notification.yml` file without needing to escape special characters.
45+
4. Copy the example `notification.yml.example` file to the `notification.yml` file:
46+
47+
```bash
48+
cp ~/voi/docker/notification.yml.example ~/voi/docker/notification.yml
49+
```
50+
51+
5. Update the **NOTIFICATION_URLS** value in `notification.yml` file with your Email mailto:// link
52+
53+
``` yaml
54+
NOTIFICATION_URLS="mailto:///example:[email protected]?from=Voi%20Notification"
55+
```
56+
57+
!!! tip
58+
If you want to use multiple notification mechanisms, separate them with a comma.
59+
For example, to use both Discord and Email for notification, you would set the **NOTIFICATION_URLS** value
60+
in the `notification.yml` file to:
61+
62+
```yaml
63+
NOTIFICATION_URLS="discord://<webhook_id>/<webhook_token>,mailto:///example:[email protected]?from=Voi%20Notification"
64+
```
65+
66+
--8<-- "notification-guides/notification-test.md"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Testing Your Notification Configuration
2+
3+
With your configuration in place, it's now time to test it.
4+
5+
First, we need to make sure that Voi Swarm picks up your changes to notification.yml.
6+
To do this, rerun the installation script:
7+
8+
```bash
9+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
10+
```
11+
12+
After the script has run and applied changes to the environment, we need to send a test notification to make sure
13+
everything is working as expected.
14+
15+
To do this, run the following command:
16+
17+
```bash
18+
~/voi/bin/notification-test
19+
```

docs/notification-guides/pushbullet.md

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,4 @@
4343
NOTIFICATION_URLS="discord://<webhook_id>/<webhook_token>,pbul://<access_token>"
4444
```
4545

46-
## Testing Your Notification Configuration
47-
48-
With your configuration in place it's now time to test it.
49-
50-
First we need to make sure that your changes to notification.yml is picked up by the stack.
51-
To do this, rerun the installation script:
52-
53-
```bash
54-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/VoiNetwork/voi-swarm/main/install.sh)"
55-
```
56-
57-
After the script has run and applied changes to the environment we need to send a test notification to make sure
58-
everything is working as expected.
59-
60-
To do this, run the following command:
61-
62-
```bash
63-
~/voi/bin/notification-test
64-
```
46+
--8<-- "notification-guides/notification-test.md"

mkdocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ markdown_extensions:
7070
- pymdownx.details
7171
- pymdownx.superfences
7272
- footnotes
73+
- pymdownx.snippets:
74+
base_path: "docs"
75+
check_paths: true
7376
- pymdownx.tabbed:
7477
alternate_style: true
7578
slugify: !!python/object/apply:pymdownx.slugs.slugify
@@ -105,6 +108,8 @@ nav:
105108
- Participation keys: operating/participation-keys.md
106109
- Setup notifications: operating/setup-notifications.md
107110
- Notification Guides:
111+
- Amazon SES: notification-guides/amazon-ses.md
112+
- Email: notification-guides/email.md
108113
- Pushbullet: notification-guides/pushbullet.md
109114
- Provider Guidance: provider-guidance.md
110115
- Migrating to Voi Swarm: migrating.md

0 commit comments

Comments
 (0)