mailcow-dockerized-docs/docs/firststeps-local_mta.md

20 Zeilen
871 B
Markdown

2017-05-06 00:22:26 +02:00
The easiest option would be to disable the listener on port 25/tcp.
**Postfix** users disable the listener by commenting the following line (starting with `smtp` or `25`) in `/etc/postfix/master.cf`:
```
#smtp inet n - - - - smtpd
```
2017-07-05 12:05:40 +02:00
2017-07-25 10:04:18 +02:00
Furthermore, to relay over a dockerized mailcow, you may want to add `172.22.1.1` as relayhost and remove the Docker interface from "inet_interfaces":
2017-07-05 12:05:40 +02:00
```
postconf -e 'relayhost = 172.22.1.1'
2017-07-25 10:04:18 +02:00
postconf -e "mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128"
postconf -e "inet_interfaces = loopback-only"
2017-07-05 12:05:40 +02:00
```
"172.22.1.1" is the mailcow created network gateway in Docker.
Relaying over this interface is necessary (instead of - for example - relaying directly over ${MAILCOW_HOSTNAME}) to relay over a known internal network.
2017-05-06 00:22:26 +02:00
Restart Postfix after applying your changes.