multiple relays in smtpd.conf

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

multiple relays in smtpd.conf

Christian Gut
Hi List,

is it possible to have multiple relays (you might want to say smart hosts) in smtpd?

I currently use the following line:

accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>

Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?

accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }

Kind Regards,
Christian

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Eric Faurot-3
On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:

> Hi List,
>
> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
>
> I currently use the following line:
>
> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
>
> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
>
> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
>
> Kind Regards,
> Christian
>

It's not possible at the moment.  There is ongoing work to support this feature,
along with other improvements. But it's quite a big change, and we can't give an
ETA right now.

Eric.

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Kirill Miazine
* Eric Faurot [2017-08-02 13:24]:

> On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:
>> Hi List,
>>
>> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
>>
>> I currently use the following line:
>>
>> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
>>
>> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
>>
>> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
>>
>> Kind Regards,
>> Christian
>>
> It's not possible at the moment.  There is ongoing work to support this feature,
> along with other improvements. But it's quite a big change, and we can't give an
> ETA right now.

what about defining a new name in DNS containing addresses of all
smarthosts as a workaround for the OP for now?

> Eric.
>

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Gilles Chehade-7
In reply to this post by Christian Gut
On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:

> Hi List,
>
> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
>
> I currently use the following line:
>
> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
>
> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
>
> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
>

Hi,

Unfortunately it's not possible as of today.

I'm currently working on making this possible, like I was actually doing
work for that yesterday, but it's not as easy as it looks like and there
is no chance it can make it before 6.3

I have a big interest in this working so this is among my top prio work.

Gilles

--
Gilles Chehade

https://www.poolp.org                                          @poolpOrg

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Gilles Chehade-7
In reply to this post by Kirill Miazine
On Wed, Aug 02, 2017 at 01:47:09PM +0200, Kirill Miazine wrote:

> * Eric Faurot [2017-08-02 13:24]:
> > On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:
> >> Hi List,
> >>
> >> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
> >>
> >> I currently use the following line:
> >>
> >> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
> >>
> >> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
> >>
> >> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
> >>
> >> Kind Regards,
> >> Christian
> >>
> > It's not possible at the moment.  There is ongoing work to support this feature,
> > along with other improvements. But it's quite a big change, and we can't give an
> > ETA right now.
>
> what about defining a new name in DNS containing addresses of all
> smarthosts as a workaround for the OP for now?
>

This can work in some use-cases, this is exactly what a co-worker did to
work around the limitation.


--
Gilles Chehade

https://www.poolp.org                                          @poolpOrg

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

tomr
In reply to this post by Kirill Miazine


On 08/02/17 21:47, Kirill Miazine wrote:

> * Eric Faurot [2017-08-02 13:24]:
>> On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:
>>> Hi List,
>>>
>>> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
>>>
>>> I currently use the following line:
>>>
>>> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
>>>
>>> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
>>>
>>> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
>>>
>>> Kind Regards,
>>> Christian
>>>
>> It's not possible at the moment.  There is ongoing work to support this feature,
>> along with other improvements. But it's quite a big change, and we can't give an
>> ETA right now.
>
> what about defining a new name in DNS containing addresses of all
> smarthosts as a workaround for the OP for now?

Or, if it's for planned maintenance only, a single address (changed in
advance of the maint window) should also work I'd reckon.

Also: is this not a purpose to which relayd could usefully put using a
'check script'?

t

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Christian Gut
In reply to this post by Gilles Chehade-7

> On 2.Aug. 2017, at 14:09, Gilles Chehade <[hidden email]> wrote:
>
> On Wed, Aug 02, 2017 at 01:47:09PM +0200, Kirill Miazine wrote:
>> * Eric Faurot [2017-08-02 13:24]:
>>> On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:
>>>> Hi List,
>>>>
>>>> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
>>>>
>>>> I currently use the following line:
>>>>
>>>> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
>>>>
>>>> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
>>>>
>>>> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
>>>>
>>>> Kind Regards,
>>>> Christian
>>>>
>>> It's not possible at the moment.  There is ongoing work to support this feature,
>>> along with other improvements. But it's quite a big change, and we can't give an
>>> ETA right now.
>>
>> what about defining a new name in DNS containing addresses of all
>> smarthosts as a workaround for the OP for now?
>>
>
> This can work in some use-cases, this is exactly what a co-worker did to
> work around the limitation.

How will smtpd operate then? Does it use the DNS records in a round robin fashion or does it try them one after another if they fail?

Christian
Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Gilles Chehade-7
On Wed, Aug 02, 2017 at 02:47:27PM +0200, Christian Gut wrote:

>
> > On 2.Aug. 2017, at 14:09, Gilles Chehade <[hidden email]> wrote:
> >
> > On Wed, Aug 02, 2017 at 01:47:09PM +0200, Kirill Miazine wrote:
> >> * Eric Faurot [2017-08-02 13:24]:
> >>> On Wed, Aug 02, 2017 at 11:44:47AM +0200, Christian Gut wrote:
> >>>> Hi List,
> >>>>
> >>>> is it possible to have multiple relays (you might want to say smart hosts) in smtpd?
> >>>>
> >>>> I currently use the following line:
> >>>>
> >>>> accept from local for any relay via smarthost.example.org <http://smarthost.example.org/>
> >>>>
> >>>> Now I would like to have multiple smart hosts in there for backup reasons, if one of the smart hosts is in maintainance. Is something like this possible?
> >>>>
> >>>> accept from local for any relay via { smarthost1.example.org <http://smarthost1.example.org/>, smarthost2.example.org <http://smarthost2.example.org/> }
> >>>>
> >>>> Kind Regards,
> >>>> Christian
> >>>>
> >>> It's not possible at the moment.  There is ongoing work to support this feature,
> >>> along with other improvements. But it's quite a big change, and we can't give an
> >>> ETA right now.
> >>
> >> what about defining a new name in DNS containing addresses of all
> >> smarthosts as a workaround for the OP for now?
> >>
> >
> > This can work in some use-cases, this is exactly what a co-worker did to
> > work around the limitation.
>
> How will smtpd operate then? Does it use the DNS records in a round robin fashion or does it try them one after another if they fail?
>

smtpd maintains states about its routes to a destination.

what will happen is that it will resolve your relay hostname into all of
its addresses and attempts to route to them. if a route is broken, it is
marked as such for a small period and reattempted later, meanwhile there
will be routes that aren't marked as broken and which smtpd will be able
to use.


--
Gilles Chehade

https://www.poolp.org                                          @poolpOrg

Reply | Threaded
Open this post in threaded view
|

Re: multiple relays in smtpd.conf

Ronan Viel
In reply to this post by tomr
I agree with tomr, I would try to find a workaround to this issue by sending the traffic to relayd, using a redirection to target host after a 'check send nothing expect 220* '

Ronan

> Le 2 août 2017 à 14:14, tomr <[hidden email]> a écrit :
> ...
> Also: is this not a purpose to which relayd could usefully put using a
> 'check script'?
>
> t