mirror of
https://github.com/multipleof4/ntfy.git
synced 2026-10-08 21:05:21 +00:00
Docs, fix generator
This commit is contained in:
+12
-13
@@ -355,12 +355,13 @@ This generator helps you configure your self-hosted ntfy instance. It's not full
|
|||||||
</div>
|
</div>
|
||||||
<div class="cg-field cg-inline-field">
|
<div class="cg-field cg-inline-field">
|
||||||
<label>Require email verification</label>
|
<label>Require email verification</label>
|
||||||
<select data-key="smtp-sender-verify">
|
<div class="cg-btn-group">
|
||||||
<option value="">No (default)</option>
|
<label><input type="radio" name="cg-smtp-sender-verify" value="no" checked><span>No</span></label>
|
||||||
<option value="true">Yes</option>
|
<label><input type="radio" name="cg-smtp-sender-verify" value="yes"><span>Yes</span></label>
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<input type="checkbox" data-key="smtp-sender-verify" id="cg-smtp-sender-verify-hidden" style="display:none">
|
||||||
|
</div>
|
||||||
<div id="cg-email-in-section" class="cg-hidden">
|
<div id="cg-email-in-section" class="cg-hidden">
|
||||||
<div class="cg-field"><label><strong>Incoming (publishing)</strong></label></div>
|
<div class="cg-field"><label><strong>Incoming (publishing)</strong></label></div>
|
||||||
<div class="cg-field cg-inline-field">
|
<div class="cg-field cg-inline-field">
|
||||||
@@ -1018,6 +1019,10 @@ To allow forwarding messages via e-mail, you can configure an **SMTP server for
|
|||||||
you can set the `X-Email` header to [send messages via e-mail](publish.md#e-mail-notifications) (e.g.
|
you can set the `X-Email` header to [send messages via e-mail](publish.md#e-mail-notifications) (e.g.
|
||||||
`curl -d "hi there" -H "X-Email: phil@example.com" ntfy.sh/mytopic`).
|
`curl -d "hi there" -H "X-Email: phil@example.com" ntfy.sh/mytopic`).
|
||||||
|
|
||||||
|
!!! info
|
||||||
|
On ntfy.sh, anonymous email sending was disabled due to abuse. To use the email notification feature,
|
||||||
|
you must verify your email in the web app's [Account section](https://ntfy.sh/account).
|
||||||
|
|
||||||
As of today, only SMTP servers with PLAIN auth and STARTLS are supported. To enable e-mail sending, you must set the
|
As of today, only SMTP servers with PLAIN auth and STARTLS are supported. To enable e-mail sending, you must set the
|
||||||
following settings:
|
following settings:
|
||||||
|
|
||||||
@@ -1025,6 +1030,8 @@ following settings:
|
|||||||
* `smtp-sender-addr` is the hostname:port of the SMTP server
|
* `smtp-sender-addr` is the hostname:port of the SMTP server
|
||||||
* `smtp-sender-user` and `smtp-sender-pass` are the username and password of the SMTP user
|
* `smtp-sender-user` and `smtp-sender-pass` are the username and password of the SMTP user
|
||||||
* `smtp-sender-from` is the e-mail address of the sender
|
* `smtp-sender-from` is the e-mail address of the sender
|
||||||
|
* `smtp-sender-verify` is a flag that forces email recipient verification when enabled. If set to true,
|
||||||
|
only verified email recipients can be used in the `X-Email` header.
|
||||||
|
|
||||||
Here's an example config using [Amazon SES](https://aws.amazon.com/ses/) for outgoing mail (this is how it is
|
Here's an example config using [Amazon SES](https://aws.amazon.com/ses/) for outgoing mail (this is how it is
|
||||||
configured for `ntfy.sh`):
|
configured for `ntfy.sh`):
|
||||||
@@ -1036,6 +1043,7 @@ configured for `ntfy.sh`):
|
|||||||
smtp-sender-user: "AKIDEADBEEFAFFE12345"
|
smtp-sender-user: "AKIDEADBEEFAFFE12345"
|
||||||
smtp-sender-pass: "Abd13Kf+sfAk2DzifjafldkThisIsNotARealKeyOMG."
|
smtp-sender-pass: "Abd13Kf+sfAk2DzifjafldkThisIsNotARealKeyOMG."
|
||||||
smtp-sender-from: "ntfy@ntfy.sh"
|
smtp-sender-from: "ntfy@ntfy.sh"
|
||||||
|
smtp-sender-verify: true
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, any user (including anonymous users) can send email notifications to any address. To require email
|
By default, any user (including anonymous users) can send email notifications to any address. To require email
|
||||||
@@ -1043,15 +1051,6 @@ address verification, set `smtp-sender-verify` to `true`. When enabled, anonymou
|
|||||||
and authenticated users can only send to email addresses they have verified in their account settings. Users can
|
and authenticated users can only send to email addresses they have verified in their account settings. Users can
|
||||||
also use `yes`/`true`/`1` as the `X-Email` value to send to their first verified address.
|
also use `yes`/`true`/`1` as the `X-Email` value to send to their first verified address.
|
||||||
|
|
||||||
=== "/etc/ntfy/server.yml (with email verification)"
|
|
||||||
``` yaml
|
|
||||||
smtp-sender-addr: "email-smtp.us-east-2.amazonaws.com:587"
|
|
||||||
smtp-sender-user: "AKIDEADBEEFAFFE12345"
|
|
||||||
smtp-sender-pass: "Abd13Kf+sfAk2DzifjafldkThisIsNotARealKeyOMG."
|
|
||||||
smtp-sender-from: "ntfy@ntfy.sh"
|
|
||||||
smtp-sender-verify: true
|
|
||||||
```
|
|
||||||
|
|
||||||
Please also refer to the [rate limiting](#rate-limiting) settings below, specifically `visitor-email-limit-burst`
|
Please also refer to the [rate limiting](#rate-limiting) settings below, specifically `visitor-email-limit-burst`
|
||||||
and `visitor-email-limit-burst`. Setting these conservatively is necessary to avoid abuse.
|
and `visitor-email-limit-burst`. Setting these conservatively is necessary to avoid abuse.
|
||||||
|
|
||||||
|
|||||||
Vendored
+6
-1
@@ -125,7 +125,7 @@
|
|||||||
{ key: "smtp-sender-from", env: "NTFY_SMTP_SENDER_FROM", section: "smtp-out" },
|
{ key: "smtp-sender-from", env: "NTFY_SMTP_SENDER_FROM", section: "smtp-out" },
|
||||||
{ key: "smtp-sender-user", env: "NTFY_SMTP_SENDER_USER", section: "smtp-out" },
|
{ key: "smtp-sender-user", env: "NTFY_SMTP_SENDER_USER", section: "smtp-out" },
|
||||||
{ key: "smtp-sender-pass", env: "NTFY_SMTP_SENDER_PASS", section: "smtp-out" },
|
{ key: "smtp-sender-pass", env: "NTFY_SMTP_SENDER_PASS", section: "smtp-out" },
|
||||||
{ key: "smtp-sender-verify", env: "NTFY_SMTP_SENDER_VERIFY", section: "smtp-out" },
|
{ key: "smtp-sender-verify", env: "NTFY_SMTP_SENDER_VERIFY", section: "smtp-out", type: "bool" },
|
||||||
{ key: "smtp-server-listen", env: "NTFY_SMTP_SERVER_LISTEN", section: "smtp-in" },
|
{ key: "smtp-server-listen", env: "NTFY_SMTP_SERVER_LISTEN", section: "smtp-in" },
|
||||||
{ key: "smtp-server-domain", env: "NTFY_SMTP_SERVER_DOMAIN", section: "smtp-in" },
|
{ key: "smtp-server-domain", env: "NTFY_SMTP_SERVER_DOMAIN", section: "smtp-in" },
|
||||||
{ key: "smtp-server-addr-prefix", env: "NTFY_SMTP_SERVER_ADDR_PREFIX", section: "smtp-in" },
|
{ key: "smtp-server-addr-prefix", env: "NTFY_SMTP_SERVER_ADDR_PREFIX", section: "smtp-in" },
|
||||||
@@ -172,6 +172,7 @@
|
|||||||
requireLoginHidden: modal.querySelector("#cg-require-login-hidden"),
|
requireLoginHidden: modal.querySelector("#cg-require-login-hidden"),
|
||||||
signupHidden: modal.querySelector("#cg-enable-signup-hidden"),
|
signupHidden: modal.querySelector("#cg-enable-signup-hidden"),
|
||||||
proxyCheckbox: modal.querySelector("#cg-behind-proxy"),
|
proxyCheckbox: modal.querySelector("#cg-behind-proxy"),
|
||||||
|
smtpSenderVerifyHidden: modal.querySelector("#cg-smtp-sender-verify-hidden"),
|
||||||
dbStep: modal.querySelector("#cg-wizard-db"),
|
dbStep: modal.querySelector("#cg-wizard-db"),
|
||||||
navDb: modal.querySelector("#cg-nav-database"),
|
navDb: modal.querySelector("#cg-nav-database"),
|
||||||
navEmail: modal.querySelector("#cg-nav-email"),
|
navEmail: modal.querySelector("#cg-nav-email"),
|
||||||
@@ -744,6 +745,10 @@
|
|||||||
const signupYes = modal.querySelector("input[name=\"cg-enable-signup\"][value=\"yes\"]");
|
const signupYes = modal.querySelector("input[name=\"cg-enable-signup\"][value=\"yes\"]");
|
||||||
if (signupYes && signupHidden) signupHidden.checked = signupYes.checked;
|
if (signupYes && signupHidden) signupHidden.checked = signupYes.checked;
|
||||||
|
|
||||||
|
// SMTP sender verify radio → hidden checkbox
|
||||||
|
const smtpVerifyYes = modal.querySelector("input[name=\"cg-smtp-sender-verify\"][value=\"yes\"]");
|
||||||
|
if (smtpVerifyYes && els.smtpSenderVerifyHidden) els.smtpSenderVerifyHidden.checked = smtpVerifyYes.checked;
|
||||||
|
|
||||||
return loginModeVal;
|
return loginModeVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
"account_basics_emails_dialog_verify_button": "Add email",
|
"account_basics_emails_dialog_verify_button": "Add email",
|
||||||
"account_basics_emails_dialog_code_label": "Verification code",
|
"account_basics_emails_dialog_code_label": "Verification code",
|
||||||
"account_basics_emails_dialog_code_placeholder": "e.g. 123456",
|
"account_basics_emails_dialog_code_placeholder": "e.g. 123456",
|
||||||
"account_basics_emails_dialog_code_invalid": "Verification code is invalid or expired, please try again",
|
"account_basics_emails_dialog_code_invalid": "Verification code is invalid or expired",
|
||||||
"account_basics_emails_dialog_check_verification_button": "Confirm",
|
"account_basics_emails_dialog_check_verification_button": "Confirm",
|
||||||
"account_basics_cannot_edit_or_delete_provisioned_user": "A provisioned user cannot be edited or deleted",
|
"account_basics_cannot_edit_or_delete_provisioned_user": "A provisioned user cannot be edited or deleted",
|
||||||
"account_usage_title": "Usage",
|
"account_usage_title": "Usage",
|
||||||
|
|||||||
Reference in New Issue
Block a user