RE: multi relay host

classic Classic list List threaded Threaded
6 messages Options
JDN
Reply | Threaded
Open this post in threaded view
|

RE: multi relay host

JDN

Hello


Thanks for the feedback.

Can you still help me with the following?

We want to have two smtp routes for one subdomain

For example

*@eqx.vessel.com = smtp 1: a ip adress 25
                      = smtp 2: a ip adress 20026

*@bqx.vessel.com = smtp 1: a ip adress 25
                      = smtp 2: a ip adress 20026

How can we do this with the transport map? Can we give two routes for each sub domain?
I have try doing this by a.vessel.com = a-hostname.vessel.com and then mx lookup but then i have the problem I can't specify two ports 25 and 20026.
The 20026 port is bound to a ssh server sow we can send mail with high latency, therefor I need to be able to send mail over two ports.

Second question: if you can enter 2 smtp, how will they react, will they play round robin or can you give them a prio? And where can you do this?
In Case you can give a prio when does it fail over, or can we give it a time

I'm sorry for all these questions but I'm trying to setup a difficult mail system for our vessels that needs to be fully HA.





-----Original Message-----
From: Wietse Venema <[hidden email]>
Sent: 01 February 2019 16:24
To: De Petter Mattheas <[hidden email]>
Cc: [hidden email]
Subject: Re: multi relay host

[hidden email]:

> Dag wietse
>
> i have a littel question for you.
>
> we want to use postfix as a mta to handle mail to our ships.
>
> now we have a problem we want two routes from shore to vessel
>
> for each sub domain. each vessel has his own mail domain @a.vessel.com
> we we send the mail the transport map only allows one host ip.

In the transport map:

    query           response
    ==========================
    a.vessel.com    hostname-for-a.vessel.com

 

> how can we make it two host?
>
> can you use mx records in the transport map?

The transport map can reply with a domain name that has one or more MX records that resolve to one or more A records. The Postfix SMTP client will try up to 5 IP addresses.

It can also be done without DNS:

/etc/hosts:
    1.2.3.5     hostname-for-a.vessel.com
    1.2.3.6     hostname-for-a.vessel.com

/etc/host.conf
    multi on

Thank you for your interest in Postfix. Although I wrote a large part of the software, my personal email is not the point of contact for support or questions.

- Information about Postfix is at http://www.postfix.org/

- Send questions about Postfix to [hidden email] To subscribe, see: http://www.postfix.org/lists.html

        Wietse
        Wietse
************************************************************
Any reaction to this e-mail or any other mail, including any
files transmitted therewith to sender's e-mail address(es)
shall be dealt with not as private, but as business
communication(s) and shall be registered as such.
************************************************************

Reply | Threaded
Open this post in threaded view
|

Re: multi relay host

Wietse Venema
De Petter Mattheas:

>
> Hello
>
>
> Thanks for the feedback.
>
> Can you still help me with the following?
>
> We want to have two smtp routes for one subdomain
>
> For example
>
> *@eqx.vessel.com = smtp 1: a ip adress 25
>      = smtp 2: a ip adress 20026
>
> *@bqx.vessel.com = smtp 1: a ip adress 25
>      = smtp 2: a ip adress 20026

Ehm. 25 is not an IP address. Did you mean TCP port?

Transport maps currently can return only one result. You can use
DNS to go from one transport map result to multiple IP addresses,
but multiple TCP ports.

What you can do is to (also) run an SMTP daemon on port 20026 on
the smtp1 host. In Postfix, that means:

/etc/postfix/master.cf:
    20026 inet .... ... .. .. .. .. smtpd

        Wietse
JDN
Reply | Threaded
Open this post in threaded view
|

RE: multi relay host

JDN
Helllo

Indeed that's what I meant.

We want smtp 1 = a ip adress: 25, the second a ipadress:20026

We have to have two routes on the server so we can have a mail relay system.

One route should connect to the vpn and deliver mail that way on standard port 25
The second was a ssh with port forwarding, where we give the postfix as smtp route the adress of the ssh server that listen on port 20026.
And in that ssh server there was a port forwarding made with the responding smtp server on port 25, so mail could get in.

Do any of you know another program or solution that has this functionality?


Many thanks

Met vriendelijke groeten                        
Kind regards                                                 
De Petter Mattheas                                  
Technical support engineer - projects team    
IT-Department Jan De Nul Dredging N.V.
T +32 (0)53 73 95 53                                         
F +32 (0)53 21 00 31                                         
www.jandenul.com                                           


-----Original Message-----
From: [hidden email] <[hidden email]> On Behalf Of Wietse Venema
Sent: 04 February 2019 16:53
To: Postfix users <[hidden email]>
Subject: Re: multi relay host

De Petter Mattheas:

>
> Hello
>
>
> Thanks for the feedback.
>
> Can you still help me with the following?
>
> We want to have two smtp routes for one subdomain
>
> For example
>
> *@eqx.vessel.com = smtp 1: a ip adress 25
>      = smtp 2: a ip adress 20026
>
> *@bqx.vessel.com = smtp 1: a ip adress 25
>      = smtp 2: a ip adress 20026

Ehm. 25 is not an IP address. Did you mean TCP port?

Transport maps currently can return only one result. You can use DNS to go from one transport map result to multiple IP addresses, but multiple TCP ports.

What you can do is to (also) run an SMTP daemon on port 20026 on the smtp1 host. In Postfix, that means:

/etc/postfix/master.cf:
    20026 inet .... ... .. .. .. .. smtpd

        Wietse
************************************************************
Any reaction to this e-mail or any other mail, including any
files transmitted therewith to sender's e-mail address(es)
shall be dealt with not as private, but as business
communication(s) and shall be registered as such.
************************************************************

JDN
Reply | Threaded
Open this post in threaded view
|

RE: multi relay host

JDN
In reply to this post by Wietse Venema
Hello and thanks for the suggestion.


The thing is I need this in the transport map, as we have to do this for each sub domain.

Vessel A = *@vessel_A.domain.com
Has smtp relay 1 = a ip adress:25
Has Smtp 2 relay as backup with ipadress and port 20026

Vessel b = *@vessel_b.domain.com
Has smtp relay 1 = a different ip adress:25
Has Smtp 2 relay as backup with ipadress and port 20026


And so on for 90 different sub adresses.

Any ideas on how to do this?

 

Met vriendelijke groeten                        
Kind regards                                                 
De Petter Mattheas                                  
Technical support engineer - projects team    
IT-Department Jan De Nul Dredging N.V.
T +32 (0)53 73 95 53                                         
F +32 (0)53 21 00 31                                         
www.jandenul.com                                           


-----Original Message-----
From: L.P.H. van Belle <[hidden email]>
Sent: 05 February 2019 08:57
To: De Petter Mattheas <[hidden email]>
Subject: RE: multi relay host

This works for me.

http://pjrlost.blogspot.com/2012/11/smtp-delivery-to-two-mail-servers-via.html 

https://gitlab.dls-belgium.eu/tools/smptdd/tree/develop

Greetz,

Lois

> -----Oorspronkelijk bericht-----
> Van: [hidden email]
> [mailto:[hidden email]] Namens De Petter Mattheas
> Verzonden: dinsdag 5 februari 2019 7:51
> Aan: Postfix users
> Onderwerp: RE: multi relay host
>
> Helllo
>
> Indeed that's what I meant.
>
> We want smtp 1 = a ip adress: 25, the second a ipadress:20026
>
> We have to have two routes on the server so we can have a mail relay
> system.
>
> One route should connect to the vpn and deliver mail that way on
> standard port 25 The second was a ssh with port forwarding, where we
> give the postfix as smtp route the adress of the ssh server that
> listen on port 20026.
> And in that ssh server there was a port forwarding made with the
> responding smtp server on port 25, so mail could get in.
>
> Do any of you know another program or solution that has this
> functionality?
>
>
> Many thanks
>
> Met vriendelijke groeten Kind regards De Petter Mattheas Technical
> support engineer - projects team IT-Department Jan De Nul Dredging
> N.V.
> T +32 (0)53 73 95 53 F +32 (0)53 21 00 31 www.jandenul.com
>
>
> -----Original Message-----
> From: [hidden email]
> <[hidden email]> On Behalf Of Wietse Venema
> Sent: 04 February 2019 16:53
> To: Postfix users <[hidden email]>
> Subject: Re: multi relay host
>
> De Petter Mattheas:
> >
> > Hello
> >
> >
> > Thanks for the feedback.
> >
> > Can you still help me with the following?
> >
> > We want to have two smtp routes for one subdomain
> >
> > For example
> >
> > *@eqx.vessel.com = smtp 1: a ip adress 25
> >      = smtp 2: a ip adress 20026
> >
> > *@bqx.vessel.com = smtp 1: a ip adress 25
> >      = smtp 2: a ip adress 20026
>
> Ehm. 25 is not an IP address. Did you mean TCP port?
>
> Transport maps currently can return only one result. You can use DNS
> to go from one transport map result to multiple IP addresses, but
> multiple TCP ports.
>
> What you can do is to (also) run an SMTP daemon on port 20026 on the
> smtp1 host. In Postfix, that means:
>
> /etc/postfix/master.cf:
>     20026 inet .... ... .. .. .. .. smtpd
>
> Wietse
> ************************************************************
> Any reaction to this e-mail or any other mail, including any files
> transmitted therewith to sender's e-mail address(es) shall be dealt
> with not as private, but as business
> communication(s) and shall be registered as such.
> ************************************************************
>
>

Reply | Threaded
Open this post in threaded view
|

RE: multi relay host

L.P.H. van Belle
In reply to this post by JDN
All i can think of is.

Setup 3 postfix dual smtp.
Server 1, incoming relay.
Which delivers on server 2 and 3 with dual smtp.

Server 2 to  
Vessel A = *@vessel_A.domain.com
Has smtp relay 1 = a ip adress:25

Server 3 to
Vessel A = *@vessel_A.domain.com
Has Smtp 2 relay as backup with ipadress and port 20026

If you put the relay settings in sql, you can share it over all 3 servers.
Should be possible, maybe there are better ways, but i can't think of one.

Greetz

Louis



> -----Oorspronkelijk bericht-----
> Van: De Petter Mattheas [mailto:[hidden email]]
> Verzonden: dinsdag 5 februari 2019 9:09
> Aan: L.P.H. van Belle
> CC: Postfix users
> Onderwerp: RE: multi relay host
>
> Hello and thanks for the suggestion.
>
>
> The thing is I need this in the transport map, as we have to
> do this for each sub domain.
>
> Vessel A = *@vessel_A.domain.com
> Has smtp relay 1 = a ip adress:25
> Has Smtp 2 relay as backup with ipadress and port 20026
>
> Vessel b = *@vessel_b.domain.com
> Has smtp relay 1 = a different ip adress:25
> Has Smtp 2 relay as backup with ipadress and port 20026
>
>
> And so on for 90 different sub adresses.
>
> Any ideas on how to do this?
>
>  
>
> Met vriendelijke groeten                        
> Kind regards                                                 
> De Petter Mattheas                                  
> Technical support engineer - projects team    
> IT-Department Jan De Nul Dredging N.V.
> T +32 (0)53 73 95 53                                         
> F +32 (0)53 21 00 31                                         
> www.jandenul.com                                           
>
>
> -----Original Message-----
> From: L.P.H. van Belle <[hidden email]>
> Sent: 05 February 2019 08:57
> To: De Petter Mattheas <[hidden email]>
> Subject: RE: multi relay host
>
> This works for me.
>
> http://pjrlost.blogspot.com/2012/11/smtp-delivery-to-two-mail-
> servers-via.html
>
> https://gitlab.dls-belgium.eu/tools/smptdd/tree/develop
>
> Greetz,
>
> Lois
>
> > -----Oorspronkelijk bericht-----
> > Van: [hidden email]
> > [mailto:[hidden email]] Namens De Petter Mattheas
> > Verzonden: dinsdag 5 februari 2019 7:51
> > Aan: Postfix users
> > Onderwerp: RE: multi relay host
> >
> > Helllo
> >
> > Indeed that's what I meant.
> >
> > We want smtp 1 = a ip adress: 25, the second a ipadress:20026
> >
> > We have to have two routes on the server so we can have a
> mail relay
> > system.
> >
> > One route should connect to the vpn and deliver mail that way on
> > standard port 25 The second was a ssh with port forwarding,
> where we
> > give the postfix as smtp route the adress of the ssh server that
> > listen on port 20026.
> > And in that ssh server there was a port forwarding made with the
> > responding smtp server on port 25, so mail could get in.
> >
> > Do any of you know another program or solution that has this
> > functionality?
> >
> >
> > Many thanks
> >
> > Met vriendelijke groeten Kind regards De Petter Mattheas Technical
> > support engineer - projects team IT-Department Jan De Nul Dredging
> > N.V.
> > T +32 (0)53 73 95 53 F +32 (0)53 21 00 31 www.jandenul.com
> >
> >
> > -----Original Message-----
> > From: [hidden email]
> > <[hidden email]> On Behalf Of Wietse Venema
> > Sent: 04 February 2019 16:53
> > To: Postfix users <[hidden email]>
> > Subject: Re: multi relay host
> >
> > De Petter Mattheas:
> > >
> > > Hello
> > >
> > >
> > > Thanks for the feedback.
> > >
> > > Can you still help me with the following?
> > >
> > > We want to have two smtp routes for one subdomain
> > >
> > > For example
> > >
> > > *@eqx.vessel.com = smtp 1: a ip adress 25
> > >      = smtp 2: a ip adress 20026
> > >
> > > *@bqx.vessel.com = smtp 1: a ip adress 25
> > >      = smtp 2: a ip adress 20026
> >
> > Ehm. 25 is not an IP address. Did you mean TCP port?
> >
> > Transport maps currently can return only one result. You
> can use DNS
> > to go from one transport map result to multiple IP addresses, but
> > multiple TCP ports.
> >
> > What you can do is to (also) run an SMTP daemon on port
> 20026 on the
> > smtp1 host. In Postfix, that means:
> >
> > /etc/postfix/master.cf:
> >     20026 inet .... ... .. .. .. .. smtpd
> >
> > Wietse
> > ************************************************************
> > Any reaction to this e-mail or any other mail, including any files
> > transmitted therewith to sender's e-mail address(es) shall be dealt
> > with not as private, but as business
> > communication(s) and shall be registered as such.
> > ************************************************************
> >
> >
>
>

Reply | Threaded
Open this post in threaded view
|

Re: multi relay host

Wietse Venema
In reply to this post by JDN
De Petter Mattheas:
> Hello and thanks for the suggestion.
>
>
> The thing is I need this in the transport map, as we have to do this for each sub domain.

There is no support for multiple TCP ports in transport maps,
but there is a different solution.

> Vessel A = *@vessel_A.domain.com
> Has smtp relay 1 = a ip adress:25
> Has Smtp 2 relay as backup with ipadress and port 20026

Configure an extra SMTP service on port 20026 on smtp relay 1. You
can configure Postfix to receive mail on any TCP port.  Other mail
software may also be able to do that.

Then specify in transport maps:

query                   reply
============================================
vessel_A.domain.com     vessel_A.domain.com:20026

And set up MX records:

vessel_A.domain.com IN MX 10 smtp-relay-1
vessel_A.domain.com IN MX 20 smtp-relay-2

        Wietse