Server (IP) whitelisting

<ol> <li> <p>Append the <strong>mynetworks</strong> line in <code>/etc/postfix/main.cf</code> with the IP-address (or IP-range) at hand:</p> <pre><code class="language-diff">mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 &lt;192.168.1.0/24&gt;</code></pre> <blockquote> <blockquote> <blockquote> <blockquote> <p>Replace &lt;192.168.1.0/24&gt; by the IP of your server or its network range (ip/mask)!</p> </blockquote> </blockquote> </blockquote> </blockquote> </li> <li> <p>Instruct the system to reload the altered postfix configuration:</p> <pre><code class="language-shell">systemctl reload postfix</code></pre> </li> </ol> <hr /> <p>On the remote server:</p> <ol start="3"> <li> <p>Install postfix on the respective remote server(s):</p> <pre><code class="language-shell">apt install postfix</code></pre> <p>Choose the following during the interactive ncurses instalaltion wizard:</p> <ol> <li>Configration type = <code>Internet with smarthost</code></li> <li>Mail name = <code>&lt;nextcloud.example.org&gt;</code></li> <li>Smtp relay host = <code>&lt;smtp.example.org&gt;</code></li> </ol> <blockquote> <blockquote> <blockquote> <blockquote> <p>Replace the <stuff> above corresponding to the specific context at hand!</p> </blockquote> </blockquote> </blockquote> </blockquote> </li> </ol>