Cowbay via Postfix-users:
> On 2024/3/28 00:25, Samuel Goodies via Postfix-users wrote:
> > Hi guys. I'm inheriting a job that has an email server hosting several 
> > domains, and I'm wanting to move them behind our firewall and route mail 
> > from the main mail server to an offsite postfix server that will in turn 
> > send them out to wherever they need to go, kind of like my own homemade 
> > smarthost. Because of security we need to keep it all in house, so a paid 
> > smarthost isn't an option. This postfix server will only take mail from the 
> > server and send it out, and return bounce/errors to the main host. It won't 
> > accept any? incoming mail.
> > 
> I'm a postfix user and try to image your plan.
>                                               
>     ___________
>    (           )
>   (  internet   )
>    (___________)
>         ^
>         |
>         v
>   __________________
> | MAIN MAIL SERVER |
>   ~~~~~~~~~~~~~~~~~~
>         ^
>         |
>         v
> _________________________
> //////   FIREWALL ///////
> ~~~~~~~~~~~~~~~~~~~~~~~~~
>         ^
>         |
>         v
>   ________________________
> | OFFSITE POSTFIX SERVER |
>   ~~~~~~~~~~~~~~~~~~~~~~~~
>    ^         ^
>    |         |       .... "send them out to wherever they need to go"
>    v         v
> [DOMAIN1] [DOMAIN2] .... "several domains"
> 
> If this is what you said, then the "OFFSITE POSTFIX SERVER" is a relay only 
> mail server. The "several domains" are the destinations.
> 

In the offsite server's master.cf, open the port 25 service

smtp      inet  n       -       n       -       -       smtpd

In the offssite server's main.cf, permit relaying from your main
mail server network(s) and reject mail from other systems.

mynetworks = 10.0.1.1, ...
smtpd_relay_restrictions = permit_mynetworks, reject

In the main server's main.cf, send mail through the offssite server:

relayhost = [name-of-offsite-server]

Where the [] are used to suppress MX lookups.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to