all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH pmg-api/pmg-gui/pmg-docs 0/6] fix #8231: mail proxy: make automatically trusted networks visible and the local network optional
@ 2026-10-26  9:58 Carsten Haerle
  2026-10-26  9:58 ` [PATCH pmg-api 1/6] fix #8231: config: add option to not trust the local network automatically Carsten Haerle
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Carsten Haerle @ 2026-10-26  9:58 UTC (permalink / raw)
  To: pmg-devel; +Cc: Carsten Haerle

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







^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-27  9:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26  9:58 [PATCH pmg-api/pmg-gui/pmg-docs 0/6] fix #8231: mail proxy: make automatically trusted networks visible and the local network optional Carsten Haerle
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

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal