Skip to content

Commit 85bf9f3

Browse files
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 <[email protected]>
1 parent dff4e73 commit 85bf9f3

File tree

3 files changed

+118
-0
lines changed

3 files changed

+118
-0
lines changed

ct/proxmox-mail-gateway.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: thost96 (thost96)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://www.proxmox.com/en/products/proxmox-mail-gateway
7+
8+
APP="Proxmox-Mail-Gateway"
9+
var_tags="mail"
10+
var_cpu="2"
11+
var_ram="4096"
12+
var_disk="10"
13+
var_os="debian"
14+
var_version="12"
15+
var_unprivileged="1"
16+
17+
header_info "$APP"
18+
base_settings
19+
20+
variables
21+
color
22+
catch_errors
23+
24+
function update_script() {
25+
header_info
26+
check_container_storage
27+
check_container_resources
28+
if [[ ! -e /usr/bin/pmgproxy ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
29+
msg_info "Updating ${APP}"
30+
apt-get update &>/dev/null
31+
apt-get -y upgrade &>/dev/null
32+
msg_ok "Updated ${APP}"
33+
exit
34+
}
35+
36+
start
37+
build_container
38+
description
39+
40+
msg_ok "Completed Successfully!\n"
41+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
42+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
43+
echo -e "${TAB}${GATEWAY}${BGN}https://${IP}:8006/${CL}"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: thost96 (thost96)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
8+
color
9+
verb_ip6
10+
catch_errors
11+
setting_up_container
12+
network_check
13+
update_os
14+
15+
msg_info "Installing Dependencies"
16+
$STD apt-get -y install \
17+
curl \
18+
sudo \
19+
mc \
20+
wget
21+
msg_ok "Installed Dependencies"
22+
23+
msg_info "Installing Proxmox Mail Gateway"
24+
wget -q https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
25+
echo "deb http://download.proxmox.com/debian/pmg bookworm pmg-no-subscription" > /etc/apt/sources.list.d/pmg.list
26+
$STD apt-get update
27+
$STD apt-get -y install proxmox-mailgateway-container
28+
msg_ok "Installed Proxmox Mail Gateway"
29+
30+
motd_ssh
31+
customize
32+
33+
msg_info "Cleaning up"
34+
$STD apt-get -y autoremove
35+
$STD apt-get -y autoclean
36+
msg_ok "Cleaned"

json/proxmox-mail-gateway.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Promox Mail Gateway",
3+
"slug": "proxmox-mail-gateway",
4+
"categories": [
5+
1
6+
],
7+
"date_created": "2025-02-04",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8006,
12+
"documentation": "https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html",
13+
"website": "https://www.proxmox.com/en/products/proxmox-mail-gateway/overview",
14+
"logo": "https://raw.githubusercontent.com/home-assistant/brands/master/core_integrations/proxmoxve/icon.png",
15+
"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.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/proxmox-mail-gateway.sh",
20+
"resources": {
21+
"cpu": 2,
22+
"ram": 4096,
23+
"hdd": 10,
24+
"os": "debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": "root",
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "Set a root password if using autologin. This will be the PMG password. `passwd root`",
36+
"type": "warning"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)