New Script: Proxmox Mail Gateway (#1906)

* Proxmox Mail Gateway LXC

* improvements

* renamed to long name and added install check

* Update proxmox-mail-gateway.sh

* Update proxmox-mail-gateway.sh

* Update proxmox-mail-gateway.json

* Update proxmox-mail-gateway-install.sh

* Update proxmox-mail-gateway.sh

* Update proxmox-mail-gateway.sh

* Update proxmox-mail-gateway-install.sh

---------

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
Thorsten 2025-02-10 23:43:44 +01:00 committed by GitHub
parent dff4e735f0
commit 85bf9f319b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 118 additions and 0 deletions

View File

@ -0,0 +1,43 @@
#!/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
# Source: https://www.proxmox.com/en/products/proxmox-mail-gateway
APP="Proxmox-Mail-Gateway"
var_tags="mail"
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
if [[ ! -e /usr/bin/pmgproxy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating ${APP}"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
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}"

View File

@ -0,0 +1,36 @@
#!/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 -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 update
$STD apt-get -y install proxmox-mailgateway-container
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"

View File

@ -0,0 +1,39 @@
{
"name": "Promox Mail Gateway",
"slug": "proxmox-mail-gateway",
"categories": [
1
],
"date_created": "2025-02-04",
"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/proxmox-mail-gateway.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"
}
]
}