diff --git a/ct/pmg.sh b/ct/pmg.sh new file mode 100644 index 00000000..1139b050 --- /dev/null +++ b/ct/pmg.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +APP="PMG" +var_tags="mail;debian12" +var_cpu="2" +var_ram="4096" +var_disk="10" +var_os="debian" +var_version="12" +var_unprivileged="1" + +header_info "$APP" +base_settings + +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + msg_info "Updating ${APP}" + apt-get update + apt-get -y upgrade + msg_ok "Updated ${APP}" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:8006/${CL}" diff --git a/install/pmg-install.sh b/install/pmg-install.sh new file mode 100644 index 00000000..b8c2ba8a --- /dev/null +++ b/install/pmg-install.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: thost96 (thost96) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apt-get -qq -y install \ + curl \ + sudo \ + mc \ + wget +msg_ok "Installed Dependencies" + +msg_info "Installing Proxmox Mail Gateway" +wget -q https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg +echo "deb http://download.proxmox.com/debian/pmg bookworm pmg-no-subscription" > /etc/apt/sources.list.d/pmg.list +$STD apt-get -qq update >/dev/null && apt-get -qq -y install proxmox-mailgateway-container >/dev/null +msg_ok "Installed Proxmox Mail Gateway" + +motd_ssh +customize + +msg_info "Cleaning up" +$STD apt-get -y autoremove +$STD apt-get -y autoclean +msg_ok "Cleaned" diff --git a/json/pmg.json b/json/pmg.json new file mode 100644 index 00000000..897faefe --- /dev/null +++ b/json/pmg.json @@ -0,0 +1,39 @@ +{ + "name": "Promox Mail Gateway", + "slug": "pmg", + "categories": [ + 1 + ], + "date_created": "2025-01-31", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 8006, + "documentation": "https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html", + "website": "https://www.proxmox.com/en/products/proxmox-mail-gateway/overview", + "logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png", + "description": "Proxmox Mail Gateway is the leading open-source email security solution helping you to protect your mail server against all email threats from the moment they emerge.", + "install_methods": [ + { + "type": "default", + "script": "ct/pmg.sh", + "resources": { + "cpu": 2, + "ram": 4096, + "hdd": 10, + "os": "debian", + "version": "12" + } + } + ], + "default_credentials": { + "username": "root", + "password": null + }, + "notes": [ + { + "text": "Set a root password if using autologin. This will be the PMG password. `passwd root`", + "type": "warning" + } + ] +}