mirror of
https://github.com/spacebarchat/docs.git
synced 2024-11-22 10:12:31 +01:00
Documentation for fosscord mail
This commit is contained in:
parent
de1c312690
commit
a5b5a3c53c
@ -20,7 +20,7 @@ Arrays are represented by \_[number] in a config key. For example, multiple `gui
|
||||
## Available Configuration Options
|
||||
|
||||
| key | default | type | description |
|
||||
| -------------------------------------------------- | -------------------------------------------------------- | ---------------------- | --------------------------------------------------------------------- |
|
||||
| -------------------------------------------------- | -------------------------------------------------------- | ---------------------------------------- | --------------------------------------------------------------------- |
|
||||
| gateway_endpointClient | null | string | Injected into index.html if available |
|
||||
| gateway_endpointPrivate | null | string | Used for internal communication with gateway |
|
||||
| gateway_endpointPublic | null | string | Publicly announced gateway endpoint |
|
||||
@ -32,6 +32,7 @@ Arrays are represented by \_[number] in a config key. For example, multiple `gui
|
||||
| [cdn_imagorServerUrl](imagor.md) | null | string | Imagor instance endpoint for external image resizing. |
|
||||
| api_defaultVersion | 9 | string | API version to use when not specified |
|
||||
| api_activeVersions_0 | 6, 7, 8, 9 | string[] | Allowed API version numbers. [Array](#array-types). |
|
||||
| api_endpointPublic | "/api" | string | See gateway_endpointPublic |
|
||||
| general_instanceName | Fosscord Instance | string | Announced instance name |
|
||||
| general_instanceDescription | This is a Fosscord instance made in the pre-release days | string | Announced instance description |
|
||||
| general_frontPage | null | string | Announced instance front page |
|
||||
@ -93,6 +94,7 @@ Arrays are represented by \_[number] in a config key. For example, multiple `gui
|
||||
| security_statsWorldReadable | true | boolean | Whether instance stats are publically accessible or require right |
|
||||
| security_defaultRegistrationTokenExpiration | 604800000 | number | Seconds for [registration tokens](../security/regTokens.md) to expire |
|
||||
| login_requireCaptcha | false | boolean | Whether login requires captcha verification |
|
||||
| login_requireVerification | false | boolean | Whether login requires email verification |
|
||||
| register_email_required | false | boolean | Whether an email is required for registration |
|
||||
| register_email_allowlist | false | boolean | Whether `register_email_domains` is an allowlist |
|
||||
| register_email_blocklist | true | boolean | Whether `register_email_domains` is a blocklist |
|
||||
@ -111,7 +113,7 @@ Arrays are represented by \_[number] in a config key. For example, multiple `gui
|
||||
| register_allowMultipleAccounts | true | boolean | Allow multiple accounts with the same client fingerprint |
|
||||
| register_blockProxies | true | boolean | Whether proxies are blocked from registration |
|
||||
| register_incrementingDiscriminators | false | boolean | Whether discriminators are random or incrementing |
|
||||
| [register_defaultRights](../security/rights.md) | 30644591655940 | string | The rights assigned to users _upon registration_ |
|
||||
| [register_defaultRights](../security/rights.md) | 875069521787904 | string | The rights assigned to users _upon registration_ |
|
||||
| regions_default | fosscord | string | The default voice region to use |
|
||||
| regions_useDefaultAsOptimal | true | boolean | Whether to calculate closest or use default as optimal voice region |
|
||||
| regions_available_0_id | fosscord | string[] | The available voice region IDs |
|
||||
@ -142,3 +144,15 @@ Arrays are represented by \_[number] in a config key. For example, multiple `gui
|
||||
| defaults_user_premium_type | 2 | number | The premium type given to users upon registration |
|
||||
| defaults_user_verified | true | boolean | Whether users get verified email upon registration |
|
||||
| [external_twitter](embeds.md) | null | string | Twitter API key used for Twitter embeds |
|
||||
| [email_provider](../email.md) | null | "smtp", "mailgun", "mailjet", "sendgrid" | Which email transport to use |
|
||||
| email_smtp_host | null | string | SMTP Host for sending email |
|
||||
| email_smtp_port | null | number | SMTP port |
|
||||
| email_smtp_secure | null | boolean | Use TLS for SMTP |
|
||||
| email_smtp_username | null | string | SMTP username |
|
||||
| email_smtp_password | null | string | SMTP password |
|
||||
| email_mailgun_apiKey | null | string | Mailgun API key |
|
||||
| email_mailgun_domain | null | string | Mailgun domain |
|
||||
| email_mailjet_apiKey | null | string | Mailjet API key |
|
||||
| email_mailjey_apiSecret | null | string | Mailjet API secret |
|
||||
| email_sendgrid_apiKey | null | string | Sendgrid API key |
|
||||
| passwordReset_requireCaptcha | false | boolean | Require captcha to send password reset email |
|
||||
|
83
docs/setup/server/email.md
Normal file
83
docs/setup/server/email.md
Normal file
@ -0,0 +1,83 @@
|
||||
# Email
|
||||
|
||||
Fosscord can be configured to send email, to enable the following functionality:
|
||||
|
||||
- Email verification
|
||||
- Password resets
|
||||
- Password change notifications
|
||||
|
||||
Fosscord supports the following email transports:
|
||||
|
||||
- SMTP
|
||||
- [Mailjet](https://www.mailjet.com/)
|
||||
- [Mailgun](https://www.mailgun.com/)
|
||||
- [Sendgrid](https://sendgrid.com/)
|
||||
|
||||
Once you have an account with one of the above services, or an SMTP service, you can begin configuring Fosscord to send mail.
|
||||
|
||||
!!! note
|
||||
|
||||
By default users are automatically verified. To change this, update the `defaults_user_verified` [config](configuration/index.md) value to `false`.
|
||||
|
||||
Additionally, if you would like users to be forced to verify their email before using the service, set the `login_requireVerification` config to `true`.
|
||||
|
||||
Lastly, you may force users to pass a CAPTCHA before requesting a password reset by setting `passwordReset_requireCaptcha` to `true`
|
||||
|
||||
!!! warning
|
||||
|
||||
The `general_frontPage` [config](configuration/index.md) value is used to generate verification/password reset links.
|
||||
Be sure to set it to the Fosscord web app URL. For example, `https://staging.fosscord.com`
|
||||
|
||||
## Email Config
|
||||
|
||||
=== "SMTP"
|
||||
|
||||
| key | type | description |
|
||||
| ------------------- | ------- | --------------------------- |
|
||||
| email_smtp_host | string | SMTP Host for sending email |
|
||||
| email_smtp_port | number | SMTP port |
|
||||
| email_smtp_secure | boolean | Use TLS for SMTP |
|
||||
| email_smtp_username | string | SMTP username |
|
||||
| email_smtp_password | string | SMTP password |
|
||||
|
||||
=== "Mailgun"
|
||||
|
||||
| key | type | description |
|
||||
| -------------------- | ------ | --------------- |
|
||||
| email_mailgun_apiKey | string | Mailgun API key |
|
||||
| email_mailgun_domain | string | Mailgun domain |
|
||||
|
||||
=== "Mailjet"
|
||||
|
||||
| key | type | description |
|
||||
| ----------------------- | ------ | ------------------ |
|
||||
| email_mailjet_apiKey | string | Mailjet API key |
|
||||
| email_mailjey_apiSecret | string | Mailjet API secret |
|
||||
|
||||
=== "Sendgrid"
|
||||
|
||||
| key | type | description |
|
||||
| --------------------- | ------ | ---------------- |
|
||||
| email_sendgrid_apiKey | string | Sendgrid API key |
|
||||
|
||||
## Email templates
|
||||
|
||||
Fosscord's email templates are stored in [`fosscord-server/assets/email_templates`](https://github.com/fosscord/fosscord-server/tree/master/assets/email_templates).
|
||||
They are simple HTML files, which you may edit freely. Although HTML mail is very restricted, so a lot of content may not render properly.
|
||||
|
||||
Below are the available strings replaced in mail templates.
|
||||
|
||||
| string | replaced with |
|
||||
| ------------------------ | --------------------------------------------------------- |
|
||||
| `{instanceName}` | `general_instanceName` config value |
|
||||
| `{userUsername}` | The username of the user this email is being sent to |
|
||||
| `{userDiscriminator}` | The discriminator of the user this email is being sent to |
|
||||
| `{userId}` | The ID of the user this email is being sent to |
|
||||
| `{phoneNumber}` | The last 4 digits of the user's phone number. |
|
||||
| `{userEmail}` | The user's email address |
|
||||
| `{emailVerificationUrl}` | The generated email verification URL |
|
||||
| `{passwordResetUrl}` | The generated password reset URL |
|
||||
| `{ipAddress}` | The IP address that requested this email |
|
||||
| `{locationCity}` | The GeoIP city that requested this email |
|
||||
| `{locationRegion}` | The GeoIP region that requested this email |
|
||||
| `{locationCountryName}` | The GeoIP country that requested this email |
|
@ -39,7 +39,7 @@ Operator rights currently grants access to the following, in addition to all rig
|
||||
## Available rights
|
||||
|
||||
| Right | Value | When enabled |
|
||||
| ------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --------------------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `OPERATOR` | 1 << 0 | All rights |
|
||||
| `MANAGE_APPLICATIONS` | 1 << 1 | Ability to alter or remove others' applications |
|
||||
| `MANAGE_GUILDS` | 1 << 2 | Same as the per-guild `MANAGE_GUILD` permission, but applies to all guilds and DM channels, can join any guild without invite |
|
||||
@ -89,5 +89,6 @@ Operator rights currently grants access to the following, in addition to all rig
|
||||
| `EDIT_FLAGS` | 1 << 46 | Can modify other's flags |
|
||||
| `MANAGE_GROUPS` | 1 << 47 | Can manage other's groups |
|
||||
| `VIEW_SERVER_STATS` | 1 << 48 | Can view server stats /api/policies/stats |
|
||||
| `RESEND_VERIFICATION_EMAIL` | 1 << 49 | Can resend verification [emails](../email.md) (`/auth/verify/resend`) |
|
||||
|
||||
<script src="/assets/js/rightsCalculator.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user