From 54513a0327a15be1620a2433a6e040ba68836ac3 Mon Sep 17 00:00:00 2001 From: master3395 Date: Sat, 11 Apr 2026 22:03:38 +0200 Subject: [PATCH] docs: third-party AGPL notice for SnappyMail list-unsubscribe plugin Add docs/THIRD_PARTY_NOTICES.md for the bundled list-unsubscribe-header plugin (AGPL-3.0, upstream GitHub). Link from README. Add CPScripts helper to sync the plugin from a local snappymail-plugins checkout into install/. --- ...sync_snappymail_list_unsubscribe_plugin.sh | 70 +++++++++++++++++++ README.md | 5 ++ docs/THIRD_PARTY_NOTICES.md | 17 +++++ 3 files changed, 92 insertions(+) create mode 100755 CPScripts/sync_snappymail_list_unsubscribe_plugin.sh create mode 100644 docs/THIRD_PARTY_NOTICES.md diff --git a/CPScripts/sync_snappymail_list_unsubscribe_plugin.sh b/CPScripts/sync_snappymail_list_unsubscribe_plugin.sh new file mode 100755 index 000000000..e75a2c83a --- /dev/null +++ b/CPScripts/sync_snappymail_list_unsubscribe_plugin.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash +# Sync list-unsubscribe-header from a local snappymail-plugins (or upstream clone) +# checkout into install/snappymail/plugins/ for CyberPanel packaging. +# +# Usage (from CyberPanel repo root): +# export SNAPPYMAIL_PLUGINS_ROOT=/path/to/snappymail-plugins +# ./CPScripts/sync_snappymail_list_unsubscribe_plugin.sh +# +# Optional: CYBERPANEL_REPO_ROOT overrides repo root (parent of CPScripts). + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="${CYBERPANEL_REPO_ROOT:-$(cd "${SCRIPT_DIR}/.." && pwd)}" +SRC_ROOT="${SNAPPYMAIL_PLUGINS_ROOT:-}" + +if [[ -z "${SRC_ROOT}" ]]; then + echo "ERROR: Set SNAPPYMAIL_PLUGINS_ROOT to the directory containing list-unsubscribe-header/ (e.g. snappymail-plugins checkout)." >&2 + exit 1 +fi + +SRC_FILE="${SRC_ROOT%/}/list-unsubscribe-header/index.php" +DEST_DIR="${REPO_ROOT}/install/snappymail/plugins/list-unsubscribe-header" +DEST_FILE="${DEST_DIR}/index.php" + +if [[ ! -f "${SRC_FILE}" ]]; then + echo "ERROR: Source not found: ${SRC_FILE}" >&2 + exit 1 +fi + +mkdir -p "${DEST_DIR}" + +python3 - "${SRC_FILE}" "${DEST_FILE}" <<'PY' +import sys +from pathlib import Path + +src = Path(sys.argv[1]) +dst = Path(sys.argv[2]) +raw = src.read_text(encoding="utf-8", errors="strict") + +if "Bundled with CyberPanel" in raw: + out = raw +else: + if not raw.startswith("/dev/null +echo "OK: wrote ${DEST_FILE}" diff --git a/README.md b/README.md index 64628c598..3aba0b7ec 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,11 @@ Requires a live CyberPanel + OLS installation. --- +## Third-party notices + +Bundled components that use licenses other than CyberPanel's GPL-3.0 are listed in [docs/THIRD_PARTY_NOTICES.md](docs/THIRD_PARTY_NOTICES.md). + + ## Resources * Official site: [https://cyberpanel.net](https://cyberpanel.net) diff --git a/docs/THIRD_PARTY_NOTICES.md b/docs/THIRD_PARTY_NOTICES.md new file mode 100644 index 000000000..b596955cf --- /dev/null +++ b/docs/THIRD_PARTY_NOTICES.md @@ -0,0 +1,17 @@ +# Third-party notices + +This document lists separately licensed components shipped with this repository. + +## SnappyMail plugin: list-unsubscribe-header + +| Field | Value | +|--------|--------| +| **Component** | SnappyMail plugin `list-unsubscribe-header` | +| **Bundled path** | `install/snappymail/plugins/list-unsubscribe-header/index.php` | +| **Install / enable** | `plogical/snappymail_plugin_utilities.py` (called from `install/install.py` and `plogical/upgrade.py` after the upstream SnappyMail CyberPanel installer PHP step) | +| **License** | **GNU Affero General Public License v3.0** (AGPL-3.0) | +| **Upstream source** | https://github.com/master3395/snappymail-list-unsubscribe-header | + +Bundling AGPL-3.0 code imposes AGPL obligations on distribution of that component (for example, making corresponding source available to recipients as required by the license). See the upstream repository `LICENSE` file for the full text and terms. + +CyberPanel as a whole is licensed under **GPL-3.0**; see the repository root `LICENSE`. This notice does not change the license of CyberPanel’s own code.