mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-28 04:36:11 +01:00
Backport #26068 by @felixvictor The setting `MAILER_TYPE` is deprecated. According to the config cheat sheet, it should be `PROTOCOL`. Co-authored-by: Felix Victor <felix.victor.na@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
a12d036a68
commit
72b55c8094
|
@ -31,7 +31,7 @@ Note: For Internet-facing sites consult documentation of your MTA for instructio
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = sendmail
|
PROTOCOL = sendmail
|
||||||
SENDMAIL_PATH = /usr/sbin/sendmail
|
SENDMAIL_PATH = /usr/sbin/sendmail
|
||||||
SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option.
|
SENDMAIL_ARGS = "--" ; most "sendmail" programs take options, "--" will prevent an email address being interpreted as an option.
|
||||||
```
|
```
|
||||||
|
@ -44,10 +44,9 @@ Directly use SMTP server as relay. This option is useful if you don't want to se
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
SMTP_ADDR = mail.mydomain.com
|
SMTP_ADDR = mail.mydomain.com
|
||||||
SMTP_PORT = 587
|
SMTP_PORT = 587
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
USER = gitea@mydomain.com
|
USER = gitea@mydomain.com
|
||||||
PASSWD = `password`
|
PASSWD = `password`
|
||||||
```
|
```
|
||||||
|
@ -80,7 +79,7 @@ SMTP_PORT = 465
|
||||||
FROM = example.user@gmail.com
|
FROM = example.user@gmail.com
|
||||||
USER = example.user
|
USER = example.user
|
||||||
PASSWD = `***`
|
PASSWD = `***`
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtp
|
||||||
IS_TLS_ENABLED = true
|
IS_TLS_ENABLED = true
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ Gitea 具有邮件功能,用于发送事务性邮件(例如注册确认邮
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = sendmail
|
PROTOCOL = sendmail
|
||||||
SENDMAIL_PATH = /usr/sbin/sendmail
|
SENDMAIL_PATH = /usr/sbin/sendmail
|
||||||
SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。
|
SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--" 将防止电子邮件地址被解释为选项。
|
||||||
```
|
```
|
||||||
|
@ -44,10 +44,9 @@ SENDMAIL_ARGS = "--" ; 大多数 "sendmail" 程序都接受选项,使用 "--"
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
FROM = gitea@mydomain.com
|
FROM = gitea@mydomain.com
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
SMTP_ADDR = mail.mydomain.com
|
SMTP_ADDR = mail.mydomain.com
|
||||||
SMTP_PORT = 587
|
SMTP_PORT = 587
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
USER = gitea@mydomain.com
|
USER = gitea@mydomain.com
|
||||||
PASSWD = `password`
|
PASSWD = `password`
|
||||||
```
|
```
|
||||||
|
@ -80,8 +79,7 @@ SMTP_PORT = 465
|
||||||
FROM = example.user@gmail.com
|
FROM = example.user@gmail.com
|
||||||
USER = example.user
|
USER = example.user
|
||||||
PASSWD = `***`
|
PASSWD = `***`
|
||||||
MAILER_TYPE = smtp
|
PROTOCOL = smtps
|
||||||
IS_TLS_ENABLED = true
|
|
||||||
```
|
```
|
||||||
|
|
||||||
请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。
|
请注意,您需要创建并使用一个 [应用密码](https://support.google.com/accounts/answer/185833?hl=en) 并在您的 Google 帐户上启用 2FA。您将无法直接使用您的 Google 帐户密码。
|
||||||
|
|
|
@ -306,7 +306,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- GITEA__mailer__ENABLED=true
|
- GITEA__mailer__ENABLED=true
|
||||||
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
||||||
- GITEA__mailer__MAILER_TYPE=smtp
|
- GITEA__mailer__PROTOCOL=smtp
|
||||||
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
||||||
- GITEA__mailer__IS_TLS_ENABLED=true
|
- GITEA__mailer__IS_TLS_ENABLED=true
|
||||||
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
||||||
|
|
|
@ -274,7 +274,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- GITEA__mailer__ENABLED=true
|
- GITEA__mailer__ENABLED=true
|
||||||
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
||||||
- GITEA__mailer__MAILER_TYPE=smtp
|
- GITEA__mailer__PROTOCOL=smtp
|
||||||
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
||||||
- GITEA__mailer__IS_TLS_ENABLED=true
|
- GITEA__mailer__IS_TLS_ENABLED=true
|
||||||
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
||||||
|
|
|
@ -303,9 +303,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- GITEA__mailer__ENABLED=true
|
- GITEA__mailer__ENABLED=true
|
||||||
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
||||||
- GITEA__mailer__MAILER_TYPE=smtp
|
- GITEA__mailer__PROTOCOL=smtps
|
||||||
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
||||||
- GITEA__mailer__IS_TLS_ENABLED=true
|
|
||||||
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
||||||
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
|
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
|
||||||
```
|
```
|
||||||
|
|
|
@ -287,9 +287,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- GITEA__mailer__ENABLED=true
|
- GITEA__mailer__ENABLED=true
|
||||||
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
- GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set}
|
||||||
- GITEA__mailer__MAILER_TYPE=smtp
|
- GITEA__mailer__PROTOCOL=smtps
|
||||||
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
- GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set}
|
||||||
- GITEA__mailer__IS_TLS_ENABLED=true
|
|
||||||
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
- GITEA__mailer__USER=${GITEA__mailer__USER:-apikey}
|
||||||
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
|
- GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}"""
|
||||||
```
|
```
|
||||||
|
|
|
@ -58,7 +58,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-mssql/data/attachments
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
MAILER_TYPE = dummy
|
PROTOCOL = dummy
|
||||||
FROM = mssql-{{TEST_TYPE}}-test@gitea.io
|
FROM = mssql-{{TEST_TYPE}}-test@gitea.io
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
|
|
|
@ -58,7 +58,7 @@ SSH_TRUSTED_USER_CA_KEYS = ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCb4DC1dMFnJ6pXW
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
MAILER_TYPE = dummy
|
PROTOCOL = dummy
|
||||||
FROM = mysql-{{TEST_TYPE}}-test@gitea.io
|
FROM = mysql-{{TEST_TYPE}}-test@gitea.io
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
|
|
|
@ -59,7 +59,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-pgsql/data/attachments
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
MAILER_TYPE = dummy
|
PROTOCOL = dummy
|
||||||
FROM = pgsql-{{TEST_TYPE}}-test@gitea.io
|
FROM = pgsql-{{TEST_TYPE}}-test@gitea.io
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
|
|
|
@ -55,7 +55,7 @@ PATH = tests/{{TEST_TYPE}}/gitea-{{TEST_TYPE}}-sqlite/data/attachments
|
||||||
|
|
||||||
[mailer]
|
[mailer]
|
||||||
ENABLED = true
|
ENABLED = true
|
||||||
MAILER_TYPE = dummy
|
PROTOCOL = dummy
|
||||||
FROM = sqlite-{{TEST_TYPE}}-test@gitea.io
|
FROM = sqlite-{{TEST_TYPE}}-test@gitea.io
|
||||||
|
|
||||||
[service]
|
[service]
|
||||||
|
|
Loading…
Reference in a new issue