Randy Ramsdell:
[ Charset ISO-8859-1 unsupported, converting... ]
> On 09/26/11 14:36, Noel Jones wrote:
> > On 9/26/2011 1:31 PM, Randy Ramsdell wrote:
> >> On 09/26/11 14:18, Noel Jones wrote:
> >>> On 9/26/2011 1:00 PM, Randy Ramsdell wrote:
> >>>> On 09/22/11 13:45, Randy Ramsdell wrote:
> >>>>> I cannot find the the way to grab all "to's" rewritten to go to a
> >>>>> single "to:". We need to send all mail coming out of our QA
> >>>>> environment and send that to a single, probably, local address.
> >>>>> The list of senders will be in the thousands and so using a
> >>>>> catchall for these has to be configured.
> >>>>>
> >>>>> We will also select a few "to's" where we send these off as normal.
> >>>>>
> >>>>> No external to our network mail we need to be routed.
> >>>>>
> >>>>> So far I read about transport maps and the address rewriting but
> >>>>> don't see a way or the best way to accomplish this.
> >>>>>
> >>>>> Advice appreciated,
> >>>>> Randy Ramsdell
> >>>> When virtual_alias_maps using two maps as suggested.
> >>>>
> >>>> virtual_alias_maps =
> >>>>           hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.pcre
> >>>>
> >>>> This has order correct ?i.e As in the maps are checked sequentially?
> >>>>
> >>>>
> >>> The maps are checked sequentially and recursively. Recursion stops
> >>> when the result is the same as the input key or "not found".
> >>>
> >>> For this application, you would need 1-1 "identity" mappings in the
> >>> hash file, and a catchall in the pcre.
> >>>
> >>>
> >>>     -- Noel Jones
> >> r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual
> >> real@madeupdomain     rramsdell@nonlocaldomain
> > need to add an identity mapping to the hash file:
> >
> > rramsdell@nonlocaldomain   rramsdell@nonlocaldomain
> >
> >
> >
> >
> >
> >>
> >> r...@mail1-test.dfb.qa.vn:/etc/postfix # cat virtual.pcre
> >> /./                     itstaff
> >>
> >>
> >> This per Wietse.
> >>
> >> Debug :
> >>
> >> Sep 26 13:54:43 mail1-test postfix/smtpd[6842]: maps_find:
> >> virtual_alias_maps: hash:/etc/postfix/virtual(0,lock|fold_fix):
> >> real@madeupdomain = rramsdell@nonlocaldomain
> >>
> >> . . .
> >>
> >> Sep 26 13:54:53 mail1-test postfix/local[6848]: C311517A7BF:
> >> to=<itst...@mail1.dfb.qa.vn>, orig_to=<real@madeupdomain>,
> >> relay=local, delay=19, delays=19/0/0/0.05, dsn=2.0.0, status=sent
> >> (delivered to maildir)
> >>
> >> This looks like it matches virtual and then applies the pcre virtual.
> >>
> >>
> > Yes, that's what recursion does.
> >
> >
> >
> >
> >    -- Noel Jones
> 
> /etc/postfix/virtual:
>       #f...@example.com  stays itself.
>       f...@example.com        f...@example.com
> 
>       #b...@example.com  goes elsewhere.
>       b...@example.com        other@elsewhere
> 
> /etc/postfix/virtual.pcre:
>       # Everything else goes to the mailsink.
>       /./                     mails...@example.net
> 
> ?

Plus the portion of my example that you left out, and that lists
the PCRE file last in the virtual_alias_maps settings.

        Wietse

Reply via email to