On Fri, Mar 02, 2012 at 11:48:09PM +0100, Karol Babioch wrote: > Am 02.03.2012 23:32, schrieb Wietse Venema: > > Postfix will not look in alias_maps when the domain is not > > listed in mydestination. > > So, when I understand this right, it is not possible to > define common aliases for all virtual domains? Because > virtual domains won't be listed within $mydestination?
This feature is not advertised in the Postfix documentation, therefore it is not available. On the contrary, a point of virtual domains vs. local is this namespace separation. Generally a solution is to list postmas...@example.com and ab...@example.com in virtual_alias_maps pointing to your (the postmaster's) address. Lazy solutions are available to users of SQL map types: main.cf : [ ... ] virtual_alias_maps = [ ... ] sqlite:/etc/postfix/query/map-postmaster.query virtual_mailbox_domains = sqlite:/etc/postfix/query/dom-vmbox.query [ ... ] query/dom-vmbox.query : dbpath = /path/to/your/database query = SELECT name FROM Domain WHERE CLASS>800 AND name='%s' query/map-postmaster.query : dbpath = /path/to/your/database query = SELECT name FROM Domain WHERE CLASS>800 AND name='%d' AND ('abuse'='%u' OR 'postmaster'='%u') result_format = you+%u...@example.com So if postmap -q example.net sqlite:/etc/postfix/query/dom-vmbox.query returns "example.net", then: postmap -q ab...@example.net sqlite:/etc/postfix/query/map-postmaster.query will return "you+abuse_example....@example.com". The gist of this being that you do the same test as for your virtual domain list, test two hardcoded localparts, and return a hardcoded result which goes to your mailbox. Note: I don't use this; I manually create postmaster and abuse aliases. It's untested. Test it before you commit. :) -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: