Hi. Perhaps i’m doing something wrong, but I can’t get mail relay to work following the instructions here: https://mailinabox.email/advanced-configuration.html
I am using Ubuntu 18.04 on both the mail server and the remote server.
I did get it working in the end, with the following changes:
On the remote server, I had to specify the
/etc/postfix/main.cf, for example
relayhost = box.example.com. If I don’t specify
relayhost, then mail is not relayed at all.
On the mail server, to prevent “Relay access denied;” errors, I had to include the IP addresses of the remote server. In
/etc/postfix/main.cf, I updated to
mynetwork" field to include the IPV4 and IPV6 addresses of the remote server, for example:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 X.X.X.X X:X:X:X::1
Now mail relay works correctly from the remote machine. I understand the docs here mention the info is valid for Ubuntu 14.04 but i didn’t expect the approach to be different for 18.04.
Am I doing something wrong that I have to make the changes mentioned above? Or is this correct approach for Ubuntu 18.04?