How to relay ALL mails, even local ones?

xonu
2013-03-26
2013-03-26
  • xonu
    xonu
    2013-03-26

    Hello,

    I have a PHP based website sending emails. This website is hosted on example.com, but emails are managed by an entirely different server.

    The challenge is to tell postfix to relay ALL emails even local ones like support@example.com
    Emails sent to apparently local addresses bounce because user 'support' is unknown.

    The work-around I found working for me is to set virtual_transport = relay (which is equal virtual by default) in the /etc/postfix/main.cf. It works fine but appears to me like a quick and dirty solution.

    Is there a more elgant solution like defining example.com as a domain for relay?

     
  • GingerDog
    GingerDog
    2013-03-26

    Hi,

    Firstly, this is a mailing list / forum for PostfixAdmin - a web interface for managing Postfix virtual domains/users/aliases etc. It's not really a general forum for Postfix issues. There are better places on the internet for such questions.

    Secondly - I'd probably use the relayhost= parameter in main.cf - and ensure the server isn't configured to think it's the final destination for any mail. See http://www.postfix.org/postconf.5.html#relayhost

    David.