From: Carsten Haerle <carsten.haerle@straightec.de>
To: pmg-devel@lists.proxmox.com
Cc: Carsten Haerle <carsten.haerle@straightec.de>
Subject: [PATCH pmg-api/pmg-gui/pmg-docs 0/6] fix #8231: mail proxy: make automatically trusted networks visible and the local network optional
Date: Mon, 26 Oct 2026 10:58:45 +0100 [thread overview]
Message-ID: <20261026095852.3243241-1-carsten.haerle@straightec.de> (raw)
Besides the networks configured under Mail Proxy > Networks, PMG adds the
network of the node's IP address, the default relay and all transport
hosts (if configured as IP address) to postfix' mynetworks. All hosts in
it may relay through the internal port to any destination. None of these
entries is shown in the GUI, so the Networks panel can be empty while a
whole /24 is trusted, and the local network can only be removed by
overriding the main.cf template.
This series
- adds the option 'trust_local_network' (default 1, current behaviour
unchanged) to stop trusting the local network automatically,
- lets the mynetworks API optionally list the automatic entries with
their origin ('automatic=1', without it the result is unchanged),
- shows them greyed out in the Networks panel, with a comment that tells
where each one is configured,
- resolves default relay and transport hosts configured by host name, so
that they are trusted like hosts configured by address (pmg-api 4/6),
- documents all of this.
The default relay and transport hosts stay trusted unconditionally, as
they are the mail servers that send outgoing mail through the internal
port in the recommended setup.
Patch 4/6 changes existing installations that use host names for the
default relay or transports (these hosts can now relay, as they could if
configured by address), so it is a separate patch and can be considered
on its own. The docs patch describes the behaviour with it applied.
The GUI patch (5/6) depends on pmg-api 3/6.
Tested on a single-node PMG 9.1 (pmg-api 9.1.4, pmg-gui 5.2.3):
- option on: generated mynetworks identical to before
- option off: a host of the local network gets "454 4.7.1 Relay access
denied" on port 26 for external recipients; an explicitly configured
host of the same network may still relay
- API without parameter returns the configured networks only; with
automatic=1 also local network, default relay and transport hosts with
their origin
- default relay and transport by host name are resolved and listed with
the name; a name that cannot be resolved is skipped with one warning per
config sync
While testing I noticed that adding, changing or removing a transport
only runs postmap on the transport map but does not regenerate main.cf,
so the transport host's mynetworks entry is only updated with the next
full config sync. That is independent of this series and sent
as a separate patch for the same bug.
pmg-api:
Carsten Haerle (4):
fix #8231: config: add option to not trust the local network automatically
config: factor out automatically trusted networks
fix #8231: api: mynetworks: optionally list automatically trusted networks
fix #8231: config: resolve relay and transport host names for mynetworks
src/PMG/API2/MyNetworks.pm | 47 ++++++++++++++-
src/PMG/Config.pm | 144 ++++++++++++++++++++++++++++++++-------------
2 files changed, 150 insertions(+), 41 deletions(-)
pmg-gui:
Carsten Haerle (1):
fix #8231: mail proxy: add trust local network option, show automatic networks
js/MailProxyOptions.js | 4 ++++
js/MyNetworks.js | 9 +++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
pmg-docs:
Carsten Haerle (1):
mail proxy: networks: document automatically trusted networks
pmgconfig.adoc | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--
2.53.0
next reply other threads:[~2026-10-27 9:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 9:58 Carsten Haerle [this message]
2026-10-26 9:58 ` [PATCH pmg-api 1/6] fix #8231: config: add option to not trust the local network automatically Carsten Haerle
2026-10-26 9:58 ` [PATCH pmg-api 2/6] config: factor out automatically trusted networks Carsten Haerle
2026-10-26 9:58 ` [PATCH pmg-api 3/6] fix #8231: api: mynetworks: optionally list " Carsten Haerle
2026-10-26 9:58 ` [PATCH pmg-api 4/6] fix #8231: config: resolve relay and transport host names for mynetworks Carsten Haerle
2026-10-26 9:58 ` [PATCH pmg-gui 5/6] fix #8231: mail proxy: add trust local network option, show automatic networks Carsten Haerle
2026-10-26 9:58 ` [PATCH pmg-docs 6/6] mail proxy: networks: document automatically trusted networks Carsten Haerle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261026095852.3243241-1-carsten.haerle@straightec.de \
--to=carsten.haerle@straightec.de \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.