On Tue, 11 Oct 2011, Wietse Venema wrote:
It does not get much simpler than this.

To deliver (almost) all mail to the smarthost:

   /etc/postfix/main.cf:
        myorigin = example.com
        mydestination = localhost localhost.example.com
        relayhost = mail.example.net

To deliver SOME addresses locally:

   /etc/postfix/main.cf:
        virtual_alias_maps = hash:/etc/postfix/virtual

   /etc/postfix/virtual:
        r...@example.com        root@localhost
        tar...@example.com      tarzan@localhost

Thanks for this example. But this just replace addresses of one domain and you seem to simply set myorigin to this domain.

1. My host ist bertels.local and this domain name should be added to mail addresses without domain (e.g. mails of cron etc.) -- postfix documentation says $myorigin is used for this:
http://www.postfix.org/postconf.5.html#append_at_myorigin

2. Is it correct to change mydomain to stefan-bertels.de or gmail.com?

3. How to set myorigin if my /etc/postfix/virtual file contains:

  anybo...@gmail.com  user1@localhost
  anybo...@yahoo.com  user1@localhost
  anybo...@gmx.net    user2@localhost
  anot...@mail.com    user2@localhost

Stefan

Reply via email to