In the aliases file

@dom.com:       toalldomain@localhost

toalldomains: @dom1.com, @dom2.com

make sure you have the wildcard entries setup in the virtual file

Paulo

-----Original Message-----
From: owner-postfix-us...@postfix.org
[mailto:owner-postfix-us...@postfix.org] On Behalf Of João Pagaime
Sent: Wednesday, January 18, 2012 12:25 PM
To: postfix users
Subject: Re: forwarding to 2 domains

Hello Noel Jones

thanks, that's my fallback situation: unroll all addresses from
DOM1.com and DOM2.com:

a...@dom.com  a...@dom1.com, a...@dom2.com
a...@dom.com  a...@dom1.com, a...@dom2.com
....

however I would like to avoid that because of administrative overhead
(setup and future maintenance). DOM1.com and DOM2.com are 2 separate
organizations that recently gained administrative  affinities

the simply operation of obtaining the complete address lists from
DOM1.com and DOM2.com may not be easy

best regards,
João


On Wed, Jan 18, 2012 at 5:10 PM, Noel Jones <njo...@megan.vbhcs.org> wrote:
> On 1/18/2012 10:35 AM, João Pagaime wrote:
>> Hello
>>
>> as strange as it may seem I need to forward all email coming to
>> DOM.com to DOM1.com and DOM2.com, regardless of the destination
>> address at DOM.com
>>
>> I almost got away  with a configuration like this at "
/etc/postfix/virtual"
>>
>> @DOM.com        @DOM1.com, @DOM2.com
>
> wildcard rewriting bypasses recipient validation and is strongly
> discouraged.
>
>>
>>  unfortunately postfix  only does writing on the   first domain (as
>> documented: "This  works only for the first address in a multi-address
>>    lookup result."
>>
>> can someone help out with this configuration? maybe some regexp?
>
> Use a simple script to generate virtual_alias_maps from a list of
> valid recipients.
>
> us...@example.com  us...@example1.com us...@example2.com
> us...@example.com  us...@example1.com us...@example2.com
> ...
>
>
>
>  -- Noel Jones

Reply via email to