Postfix to act as Open Relay Server with HA for ISP

Discussion in 'Installation/Configuration' started by kryspek, Apr 19, 2017.

  1. kryspek

    kryspek New Member

    Hello,
    I'm completely new to this whole story with Relay servers, I've been given task to set up Open source relay server with high authority. The scenario is:
    Isp that im currently working with wants a separate server to forward emails to it's destination. Mainly used for printers etc to send out notifications to users. Mail server is currently set up on a different server, running office 365. It has to be an Open Relay, I've been looking through many sources and still can't get the whole understanding of it.

    My question is how to set up Postfix on Ubuntu to act as ONLY open relay server on a separate server, and from my understanding how to point the Server 1 Office 365 to send mail through the relay server, which then will deliver mail to it's destination. I know Open relay is bad for spammers, but i believe there's settings in postfix to allow what networks are allowed to relay emails through it.

    Need more information? Feel free to ask me!
    Thanks for help!
     
  2. iNet Specialists

    iNet Specialists New Member

    This is actually fairly easy using Postfix, and it is NOT considered an open relay as long as you identify the places where email is coming from when it is passed to Postfix using the IP Address(es) of the source. Postfix will accept and relay emails from trusted SMTP clients that appear in 'mynetworks'.
    You should read the sections about 'mynetworks' in the postconf(5) man pages.
    Code:
    Enter this at the command line...
    $ man 5 postconf
    Then type '/mynetworks' to highlight relevant areas
    You should also implement correct SPF, DKIM, and DMARC policies for ALL domains that are sending email through the Postfix server to both prevent spam and increase deliver-ability. Otherwise, the Postfix server may get blacklisted or worse.
    As for allowing O365 to send through Postfix:
    1. Add the IP Address of the O365 tenant to 'mynetworks' in main.cf and restart the Postfix service
    2. Create a "connector" from O365 to the IP Address of the Postfix server in the admin area of Exchange Online
    Note: The connector can be used for 'rules', specific domains, or all the time. Just set it up as appropriate to the situation.
     
    DDArt likes this.

Share This Page