Re: multiple relays in smtpd.conf

2017-08-02 Thread Ronan Viel
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  a écrit :
> ...
> Also: is this not a purpose to which relayd could usefully put using a
> 'check script'?
> 
> t



Re: multiple relays in smtpd.conf

2017-08-02 Thread Gilles Chehade
On Wed, Aug 02, 2017 at 02:47:27PM +0200, Christian Gut wrote:
> 
> > On 2.Aug. 2017, at 14:09, Gilles Chehade  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 
>  
>  
>  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 
>  , 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



Re: multiple relays in smtpd.conf

2017-08-02 Thread Christian Gut

> On 2.Aug. 2017, at 14:09, Gilles Chehade  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 
 
 
 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 
 , 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


Re: multiple relays in smtpd.conf

2017-08-02 Thread tomr


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 
>>> 
>>>
>>> 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 
>>> , 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



Re: multiple relays in smtpd.conf

2017-08-02 Thread Gilles Chehade
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 
> >> 
> >>
> >> 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 
> >> , 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



Re: multiple relays in smtpd.conf

2017-08-02 Thread Gilles Chehade
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 
> 
> 
> 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 
> , 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



Re: multiple relays in smtpd.conf

2017-08-02 Thread 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 
>> 
>>
>> 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 
>> , 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.
>



Re: multiple relays in smtpd.conf

2017-08-02 Thread Eric Faurot
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 
> 
> 
> 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 
> , 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.



multiple relays in smtpd.conf

2017-08-02 Thread 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 


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 
, smarthost2.example.org 
 }

Kind Regards,
Christian