Mathieu Kretchner:
> >> smtp ----> proxy.foo.com -----> default.foo.com
> >>            |
> >>            redirect_map ?
> >>            --------------> new.foo.com
> >>
> >> I'm new to postfix routing mail and I'm a little bit lost ...
> >>
> >> So I think it's not a big deal to do but I don't know HOW ?
> > 
> > Postfix routing is controlled by address classes.
> > http://www.postfix.org/ADDRESS_CLASS_README.html
> > 
> >     Wietse
> 
> Hello,
> 
> Thanks for your reactivity but the recipient field are all addressed to
> proxy.foo.com and I've to  discriminate by user account to redirect mail.
> 
> I find transport table by the link you've given to me and add :
> transport_maps = hash:/etc/postfix/transport
> to main.cf
> 
> and
> [EMAIL PROTECTED]    :[default.foo.com]
> [EMAIL PROTECTED]    :[new.foo.com]
> to
> transport file
> 
> The goal is to do a migration of our imap server. We want to attache the
> service ip to proxy.foo.com and redirect mail wherever they must go.
> 
> Am I wrong with this method ? Do I've to check elsewhere ?

You have half the solution. What you describe is a variant of
Postfix as primary MX for mail that is delivered elsewhere.

        Wietse

/etc/postfix/main.cf:
    # Do not list proxy.example.com in other address classes.
    relay_domains = proxy.example.com
    relay_recipient_maps = hash:/etc/postfix/relay_recipients
    mydestination = localhost localhost.example.com

    smtpd_recipient_restrictions = 
        permit_mynetworks reject_unauth_destination
    transport_maps = hash:/etc/postfix/transport

    # You must specify your NAT/proxy external address.
    #proxy_interfaces = 1.2.3.4

/etc/postfix/relay_recipients:
    [EMAIL PROTECTED]           x
    [EMAIL PROTECTED]           x
     . . .

/etc/postfix/transport:
    [EMAIL PROTECTED]           :[this.example.com]
    [EMAIL PROTECTED]           :[that.example.com]
     . . .


Reply via email to