Update deployments/services/email/Proxmox Mail Gateway/Enabling Direct Unfiltered Communication Between Mailcow and PMG.md
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 3s
Automatic Documentation Deployment / Sync Docs to https://kb.bunny-lab.io (push) Successful in 3s
This commit is contained in:
+17
-8
@@ -92,7 +92,9 @@ Configure PMG as a trusted forwarding host in the Mailcow WebUI.
|
|||||||
## Configure Postfix Trusted Networks
|
## Configure Postfix Trusted Networks
|
||||||
The forwarding-host entry does not replace Postfix `mynetworks`. Add PMG to `mynetworks` so Postfix treats SMTP sessions from PMG as trusted and evaluates `permit_mynetworks` before sender-domain restrictions.
|
The forwarding-host entry does not replace Postfix `mynetworks`. Add PMG to `mynetworks` so Postfix treats SMTP sessions from PMG as trusted and evaluates `permit_mynetworks` before sender-domain restrictions.
|
||||||
|
|
||||||
### Inspect the Active Configuration
|
### Inspect the Existing Trusted Networks
|
||||||
|
Before modifying `mynetworks`, determine the currently active value. Mailcow automatically populates `mynetworks` with its loopback and Docker networks. Defining your own value replaces that automatically generated configuration, so you must preserve the existing entries.
|
||||||
|
|
||||||
On the Mailcow host, run:
|
On the Mailcow host, run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -100,29 +102,36 @@ cd /opt/mailcow-dockerized
|
|||||||
docker compose exec postfix-mailcow postconf mynetworks
|
docker compose exec postfix-mailcow postconf mynetworks
|
||||||
```
|
```
|
||||||
|
|
||||||
The validated Bunny Lab configuration is:
|
Example output:
|
||||||
|
|
||||||
|
```text
|
||||||
|
mynetworks = 127.0.0.0/8 172.22.1.0/24 [::1]/128
|
||||||
|
```
|
||||||
|
|
||||||
|
At this point, append the PMG address as a single-host CIDR. Do not remove any existing networks.
|
||||||
|
|
||||||
|
Expected result:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
mynetworks = 127.0.0.0/8 172.22.1.0/24 [::1]/128 192.168.3.15/32
|
mynetworks = 127.0.0.0/8 172.22.1.0/24 [::1]/128 192.168.3.15/32
|
||||||
```
|
```
|
||||||
|
|
||||||
Preserve every existing loopback and Mailcow Docker network. The PMG address must be appended as a single-host CIDR.
|
|
||||||
|
|
||||||
### Update the Persistent Postfix Override
|
### Update the Persistent Postfix Override
|
||||||
Edit the Mailcow Postfix override file:
|
|
||||||
|
Edit the Postfix override file:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
nano /opt/mailcow-dockerized/data/conf/postfix/extra.cf
|
nano /opt/mailcow-dockerized/data/conf/postfix/extra.cf
|
||||||
```
|
```
|
||||||
|
|
||||||
Set the complete `mynetworks` value:
|
If `mynetworks` config line already exists, append the PMG address while preserving the existing values. If the key does not exist, create it using the value discovered in the previous step.
|
||||||
|
|
||||||
```ini title="/opt/mailcow-dockerized/data/conf/postfix/extra.cf"
|
```ini title="/opt/mailcow-dockerized/data/conf/postfix/extra.cf"
|
||||||
mynetworks = 127.0.0.0/8 172.22.1.0/24 [::1]/128 192.168.3.15/32
|
mynetworks = 127.0.0.0/8 172.22.1.0/24 [::1]/128 192.168.3.15/32
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! warning "Preserve Existing Networks"
|
!!! warning "Do Not Replace Existing Networks"
|
||||||
Defining `mynetworks` replaces the automatically derived value. Do not remove `127.0.0.0/8`, `172.22.1.0/24`, or `[::1]/128` from the validated Bunny Lab configuration.
|
The `mynetworks` directive replaces Mailcow's automatically generated value. Removing the existing loopback or Docker networks may prevent Postfix from functioning correctly. Always preserve the existing entries and append the PMG address.
|
||||||
|
|
||||||
### Restart Mailcow Postfix
|
### Restart Mailcow Postfix
|
||||||
Apply the persistent override:
|
Apply the persistent override:
|
||||||
|
|||||||
Reference in New Issue
Block a user