Postfix forward/redirect?

Discussion in 'Server Operation' started by jfer, Jan 13, 2006.

  1. jfer

    jfer New Member

    how can I configure postfix to forward/redirect all incoming emails to another mail server (mail.domain.com).
     
  2. falko

    falko Super Moderator

    You can use Transports. Put the following line into /etc/postfix/main.cf:

    Code:
    transport_maps = hash:/etc/postfix/transport
    Into /etc/postfix/transport, you put
    Code:
    * smtp:<destination mailserver>
    Then run
    Code:
    postmap /etc/postfix/transport
    /etc/init.d/postfix restart
     
  3. ProServ-uk.com

    ProServ-uk.com New Member

    Hi im kinda new to postfix my self so just want to double check were you add >>>>> transport_maps = hash:/etc/postfix/transport




    Regards rickie
     
  4. soroccoheaven

    soroccoheaven New Member


    In /etc/postfix/main.cf
     
  5. ProServ-uk.com

    ProServ-uk.com New Member

    sorry asbout the last post i actually meant is there a specific place in the main.cf file it should be placed, like the top of the file the bottom...


    Regards rickie
     
  6. falko

    falko Super Moderator

    That doesn't matter at all. You can place all settings wherever you like in main.cf. :)
     
  7. ProServ-uk.com

    ProServ-uk.com New Member

    thank you falko for the reply :)
     
  8. ikiini

    ikiini New Member

    Hye I'm new to postfix and need to accomplish the same effect as above ( I need all emails coming to a certain domain to be forwarded to a single use under another domain.) so what I did, I added the domain to the transport table and the transport to the appropriate server. My problem is I am not clear on how I am to retrieve the mail sent to that domain. How does the mail know what user to go to? or how do I dictate what user all mail coming to domain blabla.com should go to on blabla2.com?

    -B
     
  9. falko

    falko Super Moderator

    Take a look at
    Code:
    man 5 transport
     
  10. tardomatic

    tardomatic New Member

    Relayhost

    You can also use:

    relayhost = smtp.server.com

    in main.cf to forward all external mail to a smart host
     

Share This Page