Am 29.09.2014 um 20:43 schrieb Marek Kozlowski: > On 09/29/2014 08:39 PM, Wietse Venema wrote: >> Marek Kozlowski: >> [ Charset ISO-8859-2 converted... ] >>> On 09/29/2014 08:30 PM, Wietse Venema wrote: >>>> Marek Kozlowski: >>>>> Maybe a stupid question... >>>>> I'd like to allow incoming (or local) mail only addressed to aliases >>>>> specified in `vitual_alias_maps' and `alias_map' but reject recipient >>>>> addresses using user names. >>>> >>>> /etc/postfix/main.cf: >>>> local_recipient_maps = >>> >>> >>> Do you mean: >>> >>> local_recipient_maps = $vitual_alias_maps, $alias_maps >> >> No. I mean what I wrote. > > I don't understand :-( > > "Don't do this on systems that receive mail directly from the Internet. > With today's worms and viruses, Postfix will become a backscatter > source: it accepts mail for non-existent recipients and then tries to > return that mail as "undeliverable" to the often forged sender address." > > http://www.postfix.org/LOCAL_RECIPIENT_README.html
just list all your valid addresses in local_recipient_maps and you are done - in fact there is no need for virtual and what not - it just works that way for some hundret domains over 6 years now and you can do the same with files instead of mysql - the inbound MX in fact creats postmaps files from that data append_dot_mydomain = no parent_domain_matches_subdomains = mydestination = mysql:/etc/postfix/mysql-mydestination.cf local_recipient_maps = mysql:/etc/postfix/mysql-recipients.cf transport_maps = mysql:/etc/postfix/mysql-transport.cf cat /etc/postfix/mysql-mydestination.cf user = dbmailro password = ********* dbname = dbmail hosts = unix:/var/lib/mysql/mysql.sock query = select transport from dbma_mta where mydestination='%s'; cat /etc/postfix/mysql-recipients.cf user = dbmailro password = ********* dbname = dbmail hosts = unix:/var/lib/mysql/mysql.sock query = select alias from dbma_recipients where alias='%s'; cat /etc/postfix/mysql-transport.cf user = dbmailro password = ********* dbname = dbmail hosts = unix:/var/lib/mysql/mysql.sock query = select transport from dbma_transports where mydestination='%s' or mydestination='%d' order by transport desc limit 1;