On 16.11.12 23:40, /dev/rob0 wrote: > On Fri, Nov 16, 2012 at 11:29:35PM +0100, Gerald Vogt wrote: >> On Friday, November 16, 2012, Noel Jones wrote: >>> On 11/16/2012 2:30 PM, Gerald Vogt wrote: >>> >>>> 1. deliver mails to account locally. >>>> 2. forward all local mails for any other account to relayhost >>> >>> # main.cf >>> mydestination = localhost > > Probably should also have "localhost.$mydomain" there: > > http://www.postfix.org/postconf.5.html#append_dot_mydomain
Thanks! That makes the difference. Now mail to the mailbox listed in virtual is delivered locally while other mails go through the relays. The only exception now is mails addressed specifically to @localhost, e.g. account2@localhost are also delivered locally. I guess I could live with that and see if anything accumulates in mailboxes except account. Or is there an easy way to prevent this, too? Now I have this: main.cf: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = localhost.$mydomain, localhost newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES relayhost = $mydomain sample_directory = /usr/share/doc/postfix-2.6.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual virtual: account account@localhost E-Mails on the server to account account@localhost account@hostname acco...@hostname.example.com acco...@localhost.example.com all are delivered locally. So are account2@localhost accou...@localhost.example.com All other account2 receipients account2 account2@hostname accou...@hostname.example.com go through the relays. -Gerald