From b82addc85eabce697befc25230df08fbecf71d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Lapi=C5=A1?= Date: Tue, 15 Nov 2022 19:35:20 +0100 Subject: [PATCH] wip(smtp): How to use it --- src/.vuepress/config.js | 14 ++++++++++++ src/documentation/build/build-config.md | 2 +- src/documentation/smtp/emails.md | 30 +++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 src/documentation/smtp/emails.md diff --git a/src/.vuepress/config.js b/src/.vuepress/config.js index 8b7a783..4690fda 100755 --- a/src/.vuepress/config.js +++ b/src/.vuepress/config.js @@ -165,6 +165,13 @@ module.exports = { 'export-import/project-service-export-import' ] }, + { + title: 'SMTP', + collapsable: false, + children: [ + 'smtp/emails' + ] + }, { title: 'Logs', collapsable: false, @@ -403,6 +410,13 @@ module.exports = { 'export-import/project-service-export-import' ] }, + { + title: 'SMTP', + collapsable: false, + children: [ + 'smtp/emails' + ] + }, { title: 'Logs', collapsable: false, diff --git a/src/documentation/build/build-config.md b/src/documentation/build/build-config.md index ead9391..44fc262 100644 --- a/src/documentation/build/build-config.md +++ b/src/documentation/build/build-config.md @@ -62,7 +62,7 @@ List the Zerops technologies your build uses as the **Zerops build base image** #### Supported base images -##### `nodejs@<14, 16>` +##### `nodejs@<14, 16, 18>` Includes `npm`, `yarn`, `git`, `npx`. diff --git a/src/documentation/smtp/emails.md b/src/documentation/smtp/emails.md new file mode 100644 index 0000000..f072fb0 --- /dev/null +++ b/src/documentation/smtp/emails.md @@ -0,0 +1,30 @@ +# SMTP configuration and email sending + +The default configuration of any Zerops project [private network](/documentation/routing/routing-between-project-services.html) blocks the SMTP 25 port from sending emails. The reason is primarily security and preventive protection against potential misuse of the offered [$20 credit](/documentation/overview/pricing.html#credit-and-free-zerops-credit) for the initial trial of Zerops for free for anyone. + +In practice, all **outgoing TCP ports 1 - 1024 except 22, 80, and 443**, and also all **outgoing UDP ports 1 - 65635** are blocked by the project firewall. This setting, therefore, eliminates using of the SMTP port 25 for outgoing email messages. + +## Zerops project's FW setting + +```yaml +tcp dport 22 accept +tcp dport 80 accept +tcp dport 443 accept + +tcp dport 1-1024 drop +udp dport 1-65535 drop +``` + +You will be able to use the SMTP port 25 without restrictions when your Zerops account is paid, but not when using a free credit. Actually, it would be best if you asked for this unblocking the Zerops team through our [Discord forum](https://discord.com/invite/WDvCZ54) or by sending an email to [team@zerops.io](mailto:team@zerops.io). + + +::: tip Using an IPv4 address +You'll be able to send emails over an IPv4 address even if you don't have anyone assigned to your project. In such a case, our NAT server will be used. +::: + + + +::: tip Using a shadow SMTP server +To be able to simulate SMTP traffic inside your project's network when developing or testing your applications, it's possible to install a shadow SMTP server as a service directly in your Zerops project. There are several possibilities in the OSS world on how to do it, and one of them is the [mailhog](https://github.com/mailhog/MailHog) project. You can read more about it in the article [Build a Ghost site in Zerops in a matter of minutes](https://medium.com/@mlapis/build-a-ghost-site-in-zerops-in-a-matter-of-minutes-e387a6da4b62). +::: +