fix(server): normalize mail server name (#14564)

fix #14562 
fix #14226 
fix #14192


#### PR Dependency Tree


* **PR #14564** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* SMTP and fallback SMTP name now default to empty and will use the
system hostname when not set.
* HELO hostname resolution includes stricter normalization/validation
for more reliable mail handshakes.

* **Documentation**
* Updated admin and config descriptions to explain hostname/HELO
behavior and fallback.

* **Tests**
* Added tests covering hostname normalization and rejection of invalid
HELO values.

* **Chores**
  * Updated example env and ignore rules.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
DarkSky
2026-03-03 15:51:32 +08:00
committed by GitHub
parent 75efa854bf
commit 2137f68871
8 changed files with 89 additions and 11 deletions
+2 -2
View File
@@ -91,7 +91,7 @@
"mailer": {
"SMTP.name": {
"type": "String",
"desc": "Name of the email server (e.g. your domain name)",
"desc": "Hostname used for SMTP HELO/EHLO (e.g. mail.example.com). Leave empty to use the system hostname.",
"env": "MAILER_SERVERNAME"
},
"SMTP.host": {
@@ -130,7 +130,7 @@
},
"fallbackSMTP.name": {
"type": "String",
"desc": "Name of the fallback email server (e.g. your domain name)"
"desc": "Hostname used for fallback SMTP HELO/EHLO (e.g. mail.example.com). Leave empty to use the system hostname."
},
"fallbackSMTP.host": {
"type": "String",