My apologies,  the sender_relay contains 
/r...@ltest01.domain.com/  [1.2.3.4]

Regxp is what I will use for this map

Regards,


On 2011-02-08, at 3:48 PM, Jeroen Geilman <jer...@adaptr.nl> wrote:

> On 02/08/2011 08:47 PM, GB GB wrote:
>> Hello,
>> 
>> I noticed after configuring sender_dependent_relayhost_maps and
>> expecting it to forward mail to my listed destination does not work as
>> expected.
>> 
>> I need sender_dependent_relayhost_maps to forward mail depending what
>> the the source is.
>> Our team has split into 2 so since we have 2 relays I figured I would
>> change the root alias on the second relay and forward mail
>> depending from the from=<host>
>> 
>> The main relay root alias points to blablabla@domain and the second
>> relay got changed to albalb...@domain.com
>> So, I need to configure ALL hosts that start wth the letter "L" to go
>> to the second relay and the rest of the mails continue to be serviced
>> by the main relay
>> 
>> MAIN RELAY CONFIG
>> ---------------------------------
>> aliases
>> root: blablabla@domain
>> 
>> main.cf
>> -snip-
>> sender_dependent_relayhost_maps = regexp:/etc/postfix-hd/sender_relayhost
>> -snip-
>> 
>> sender_relayhost file
>> /root@myserver.domain/        [1.2.3.4]
>> 
>> when I look at my logs I noticed that from=<r...@ltest01.domain.com>
>> gets sent to  blablabla@domain when in reality I want it to be relayed
>> to
>> the relay defined in the sender_relay file 1.2.3.4 and get sent to
>> albalb...@domain.com
>>   
> 
> r...@ltest01.domain.com != root@myserver.domain
> 
> Your regex makes no sense, as it will only match one address.
> A normal hash: map is perfectly suited for exact matches.
> 
> --
> J.
> 

Reply via email to