Преглед изворни кода

Update features and donate page (#4480)

* Update features and donate page

* Add v-add-mail-domain hooks info

And v-delete-mail-domain hook
Jaap Marcus пре 1 година
родитељ
комит
bf63228bba
3 измењених фајлова са 56 додато и 2 уклоњено
  1. 3 2
      docs/_data/features.js
  2. 52 0
      docs/docs/server-administration/email.md
  3. 1 0
      docs/donate.md

+ 3 - 2
docs/_data/features.js

@@ -2,7 +2,7 @@
 
 /** @type {FeatureListItem[]} */
 export const users = [
-	{ text: 'Support for SFTP chroot jails' },
+	{ text: 'Support for SFTP and SSH chroot jails' },
 	{ text: 'Two-Factor Authentication support for the Admin Panel' },
 	{ text: 'SSH keys for login via SFTP and SSH' },
 ];
@@ -15,7 +15,7 @@ export const webDomains = [
 	{ text: 'MultiIP support for Web/Mail/DNS' },
 	{ text: 'Support for PHP  version 5.6 up to 8.3 with PHP8.2 as default' },
 	{
-		text: 'One-Click Install Apps',
+		text: 'One-Click Install Apps (Via CLI or Admin Panel)',
 		items: [
 			{ text: 'WordPress' },
 			{ text: 'Dokuwiki' },
@@ -27,6 +27,7 @@ export const webDomains = [
 			{ text: 'OpenCart' },
 			{ text: 'Prestashop' },
 			{ text: 'Symphony' },
+			{ text: 'Joomla' },
 		],
 	},
 ];

+ 52 - 0
docs/docs/server-administration/email.md

@@ -196,3 +196,55 @@ hide client_send = ^SMTP_RELAY_USER^SMTP_RELAY_PASS
 ```
 
 [See forum topic for more info](https://forum.hestiacp.com/t/oracle-cloud-email-as-relay-doesnt-works/11304/19?)
+
+## Setting up mail hooks
+
+Some SMTP relay services might require you to set the domain within the SMTP relay account. To automate this hooks have been added to v-add-mail-domain and v-delete-mail domains.
+
+Create: $HESTIA/data/extensions/add-mail-domain.sh and $HESTIA/data/extensions/v-delete-mail-domain.sh
+
+### Proxmox mail server
+
+See: [Github](https://github.com/hestiacp/hestiacp/pull/4365)
+
+```bash
+# v-add-mail-domain
+SMTP_RELAY_PMG_USER="user"
+SMTP_RELAY_PMG_PASS="password"
+SMTP_RELAY_PMG_HOST="host"
+SMTP_RELAY_PMG_PORT="port"
+
+pmg_auth=$(curl -s --request POST -d "username=$SMTP_RELAY_PMG_USER&password=$SMTP_RELAY_PMG_PASS" \
+	--url https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/access/ticket)
+pmg_ticket=$(echo $pmg_auth | jq -r '.data.ticket')
+pmg_csrf=$(echo $pmg_auth | jq -r '.data.CSRFPreventionToken')
+if [ -n "$pmg_ticket" ]; then
+	pmg_config_domain=$(curl -s --request POST -d "domain=$domain" \
+		-H "CSRFPreventionToken: $pmg_csrf" -H "Cookie: PMGAuthCookie=$pmg_ticket" \
+		https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/config/domains)
+	pmg_config_transport=$(curl -s --request POST -d "domain=$domain&host=$SMTP_RELAY_PMG_LOCAL_IP" \
+		-H "CSRFPreventionToken: $pmg_csrf" -H "Cookie: PMGAuthCookie=$pmg_ticket" \
+		https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/config/transport)
+fi
+
+# v-delete-mail-domain.sh
+SMTP_RELAY_PMG_USER="user"
+SMTP_RELAY_PMG_PASS="password"
+SMTP_RELAY_PMG_HOST="host"
+SMTP_RELAY_PMG_PORT="port"
+
+if [ -n "$SMTP_RELAY_PMG" ]; then
+	pmg_auth=$(curl -s --request POST -d "username=$SMTP_RELAY_PMG_USER&password=$SMTP_RELAY_PMG_PASS" \
+		--url https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/access/ticket)
+	pmg_ticket=$(echo $pmg_auth | jq -r '.data.ticket')
+	pmg_csrf=$(echo $pmg_auth | jq -r '.data.CSRFPreventionToken')
+	if [ -n "$pmg_ticket" ]; then
+		pmg_config_domain=$(curl -s --request DELETE \
+			-H "CSRFPreventionToken: $pmg_csrf" -H "Cookie: PMGAuthCookie=$pmg_ticket" \
+			https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/config/domains/$domain)
+		pmg_config_transport=$(curl -s --request DELETE \
+			-H "CSRFPreventionToken: $pmg_csrf" -H "Cookie: PMGAuthCookie=$pmg_ticket" \
+			https://$SMTP_RELAY_PMG_HOST:$SMTP_RELAY_PMG_PORT/api2/json/config/transport/$domain)
+	fi
+fi
+```

+ 1 - 0
docs/donate.md

@@ -15,3 +15,4 @@ Here are our official donation platforms:
   - Ethereum: 0xfF3Dd2c889bd0Ff73d8085B84A314FC7c88e5D51
   - Binance: bnb1l4ywvw5ejfmsgjdcx8jn5lxj7zsun8ktfu7rh8
   - Smart Chain: 0xfF3Dd2c889bd0Ff73d8085B84A314FC7c88e5D51
+  - Monero/XMR: 45p5eKWfp3kYcY3cBtKq2TWpp5HGYFAbre2Xd76sRhWGXfahAj5MkxzV2oPF2VqU617pwS5JZh1h4gy6jTm73vE7PnQ48Rs