You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* giteaofficial/main:
Rework mailer settings (go-gitea#18982)
Add default value for clone URLs (go-gitea#20600)
[skip ci] Updated translations via Crowdin
docs: zh-cn translations for fail2ban setup (go-gitea#20588)
Should also support upper-case README files (go-gitea#20581)
Fix typos in backup documentation (go-gitea#20567)
Copy file name to clipboardExpand all lines: custom/conf/app.example.ini
+35-27
Original file line number
Diff line number
Diff line change
@@ -1503,50 +1503,58 @@ ROUTER = console
1503
1503
;; Prefix displayed before subject in mail
1504
1504
;SUBJECT_PREFIX =
1505
1505
;;
1506
-
;; Mail server
1507
-
;; Gmail: smtp.gmail.com:587
1508
-
;; QQ: smtp.qq.com:465
1509
-
;; As per RFC 8314 using Implicit TLS/SMTPS on port 465 (if supported) is recommended,
1510
-
;; otherwise STARTTLS on port 587 should be used.
1511
-
;HOST =
1512
-
;;
1513
-
;; Disable HELO operation when hostnames are different.
1514
-
;DISABLE_HELO =
1515
-
;;
1516
-
;; Custom hostname for HELO operation, if no value is provided, one is retrieved from system.
1506
+
;; Mail server protocol. One of "smtp", "smtps", "smtp+startls", "smtp+unix", "sendmail", "dummy".
1507
+
;; - sendmail: use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
1508
+
;; - dummy: send email messages to the log as a testing phase.
1509
+
;; If your provider does not explicitly say which protocol it uses but does provide a port,
1510
+
;; you can set SMTP_PORT instead and this will be inferred.
1511
+
;; (Before 1.18, this was controlled via MAILER_TYPE and IS_TLS_ENABLED.)
1512
+
;PROTOCOL =
1513
+
;;
1514
+
;; Mail server address, e.g. smtp.gmail.com.
1515
+
;; For smtp+unix, this should be a path to a unix socket instead.
1516
+
;; (Before 1.18, this was combined with SMTP_PORT as HOST.)
1517
+
;SMTP_ADDR =
1518
+
;;
1519
+
;; Mail server port. Common ports are:
1520
+
;; 25: insecure SMTP
1521
+
;; 465: SMTP Secure
1522
+
;; 587: StartTLS
1523
+
;; If no protocol is specified, it will be inferred by this setting.
1524
+
;; (Before 1.18, this was combined with SMTP_ADDR as HOST.)
1525
+
;SMTP_PORT =
1526
+
;;
1527
+
;; Enable HELO operation. Defaults to true.
1528
+
;ENABLE_HELO = true
1529
+
;;
1530
+
;; Custom hostname for HELO operation.
1531
+
;; If no value is provided, one is retrieved from system.
1517
1532
;HELO_HOSTNAME =
1518
1533
;;
1519
-
;; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead.
1520
-
;SKIP_VERIFY = false
1534
+
;; If set to `true`, completely ignores server certificate validation errors.
1535
+
;; This option is unsafe. Consider adding the certificate to the system trust store instead.
1536
+
;FORCE_TRUST_SERVER_CERT = false
1521
1537
;;
1522
-
;; Use client certificate
1523
-
;USE_CERTIFICATE = false
1524
-
;CERT_FILE = custom/mailer/cert.pem
1525
-
;KEY_FILE = custom/mailer/key.pem
1526
-
;;
1527
-
;; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.)
1528
-
;; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically.
1529
-
;IS_TLS_ENABLED = false
1538
+
;; Use client certificate in connection.
1539
+
;USE_CLIENT_CERT = false
1540
+
;CLIENT_CERT_FILE = custom/mailer/cert.pem
1541
+
;CLIENT_KEY_FILE = custom/mailer/key.pem
1530
1542
;;
1531
1543
;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" <[email protected]>` format
1532
1544
;FROM =
1533
1545
;;
1534
1546
;; Sometimes it is helpful to use a different address on the envelope. Set this to use ENVELOPE_FROM as the from on the envelope. Set to `<>` to send an empty address.
1535
1547
;ENVELOPE_FROM =
1536
1548
;;
1537
-
;; Mailer user name and password
1538
-
;; Please Note: Authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via STARTTLS) or `HOST=localhost`.
1549
+
;; Mailer user name and password, if required by provider.
1539
1550
;USER =
1540
1551
;;
1541
1552
;; Use PASSWD = `your password` for quoting if you use special characters in the password.
1542
1553
;PASSWD =
1543
1554
;;
1544
-
;; Send mails as plain text
1555
+
;; Send mails only in plain text, without HTML alternative
1545
1556
;SEND_AS_PLAIN_TEXT = false
1546
1557
;;
1547
-
;; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log)
-`HELO_HOSTNAME`: **\<empty\>**: Custom hostname for HELO operation.
652
-
-`HOST`: **\<empty\>**: SMTP mail host address and port (example: smtp.gitea.io:587).
653
-
- As per RFC 8314, if supported, Implicit TLS/SMTPS on port 465 is recommended, otherwise opportunistic TLS via STARTTLS on port 587 should be used.
654
-
-`IS_TLS_ENABLED` : **false** : Forcibly use TLS to connect even if not on a default SMTPS port.
655
-
- Note, if the port ends with `465` Implicit TLS/SMTPS/SMTP over TLS will be used despite this setting.
656
-
- Otherwise if `IS_TLS_ENABLED=false` and the server supports `STARTTLS` this will be used. Thus if `STARTTLS` is preferred you should set `IS_TLS_ENABLED=false`.
657
-
-`FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or
-`ENVELOPE_FROM`: **\<empty\>**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
650
+
-`PROTOCOL`: **\<empty\>**: Mail server protocol. One of "smtp", "smtps", "smtp+startls", "smtp+unix", "sendmail", "dummy". _Before 1.18, this was inferred from a combination of `MAILER_TYPE` and `IS_TLS_ENABLED`._
651
+
- SMTP family, if your provider does not explicitly say which protocol it uses but does provide a port, you can set SMTP_PORT instead and this will be inferred.
652
+
-**sendmail** Use the operating system's `sendmail` command instead of SMTP. This is common on Linux systems.
653
+
-**dummy** Send email messages to the log as a testing phase.
654
+
- Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`, `FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`.
655
+
- Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`.
656
+
-`SMTP_ADDR`: **\<empty\>**: Mail server address. e.g. smtp.gmail.com. For smtp+unix, this should be a path to a unix socket instead. _Before 1.18, this was combined with `SMTP_PORT` under the name `HOST`._
657
+
-`SMTP_PORT`: **\<empty\>**: Mail server port. If no protocol is specified, it will be inferred by this setting. Common ports are listed below. _Before 1.18, this was combined with `SMTP_ADDR` under the name `HOST`._
658
+
- 25: insecure SMTP
659
+
- 465: SMTP Secure
660
+
- 587: StartTLS
661
+
-`USE_CLIENT_CERT`: **false**: Use client certificate for TLS/SSL.
-`FORCE_TRUST_SERVER_CERT`: **false**: If set to `true`, completely ignores server certificate validation errors. This option is unsafe. Consider adding the certificate to the system trust store instead.
660
665
-`USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
661
666
-`PASSWD`: **\<empty\>**: Password of mailing user. Use \`your password\` for quoting if you use special characters in the password.
662
-
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or `HOST=localhost`. See [Email Setup]({{< relref "doc/usage/email-setup.en-us.md" >}}) for more information.
663
-
-`SEND_AS_PLAIN_TEXT`: **false**: Send mails as plain text.
664
-
-`SKIP_VERIFY`: **false**: Whether or not to skip verification of certificates; `true` to disable verification.
665
-
-**Warning:** This option is unsafe. Consider adding the certificate to the system trust store instead.
666
-
-**Note:** Gitea only supports SMTP with STARTTLS.
667
-
-`USE_CERTIFICATE`: **false**: Use client certificate.
668
-
-`CERT_FILE`: **custom/mailer/cert.pem**
669
-
-`KEY_FILE`: **custom/mailer/key.pem**
667
+
- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via `STARTTLS`) or SMTP host is localhost. See [Email Setup]({{< relref "doc/usage/email-setup.en-us.md" >}}) for more information.
668
+
-`ENABLE_HELO`: **true**: Enable HELO operation.
669
+
-`HELO_HOSTNAME`: **(retrieved from system)**: HELO hostname.
670
+
-`FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \<[email protected]\> format.
671
+
-`ENVELOPE_FROM`: **\<empty\>**: Address set as the From address on the SMTP mail envelope. Set to `<>` to send an empty address.
670
672
-`SUBJECT_PREFIX`: **\<empty\>**: Prefix to be placed before e-mail subject lines.
-**sendmail** Use the operating system's `sendmail` command instead of SMTP.
674
-
This is common on Linux systems.
675
-
-**dummy** Send email messages to the log as a testing phase.
676
-
- Note that enabling sendmail will ignore all other `mailer` settings except `ENABLED`,
677
-
`FROM`, `SUBJECT_PREFIX` and `SENDMAIL_PATH`.
678
-
- Enabling dummy will ignore all settings except `ENABLED`, `SUBJECT_PREFIX` and `FROM`.
679
-
-`SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be
680
-
command or full path).
681
-
-`SENDMAIL_ARGS`: **_empty_**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`)
673
+
-`SENDMAIL_PATH`: **sendmail**: The location of sendmail on the operating system (can be command or full path).
674
+
-`SENDMAIL_ARGS`: **\<empty\>**: Specify any extra sendmail arguments. (NOTE: you should be aware that email addresses can look like options - if your `sendmail` command takes options you must set the option terminator `--`)
682
675
-`SENDMAIL_TIMEOUT`: **5m**: default timeout for sending email through sendmail
683
676
-`SENDMAIL_CONVERT_CRLF`: **true**: Most versions of sendmail prefer LF line endings rather than CRLF line endings. Set this to false if your version of sendmail requires CRLF line endings.
684
677
-`SEND_BUFFER_LEN`: **100**: Buffer length of mailing queue. **DEPRECATED** use `LENGTH` in `[queue.mailer]`
678
+
-`SEND_AS_PLAIN_TEXT`: **false**: Send mails only in plain text, without HTML alternative.
\*Note: `--tempdir` refers to the temporary directory of the docker environment used by Gitea; if you have not specified a custom `--tempdir`, then Gitea uses `/tmp` or the `TMPDIR` environment variable of the docker container. For `--tempdir` adjust your `docker exec` command options accordingly.
0 commit comments