On 2011-01-11, 18:17, Victor Duchovni wrote: > Postfix recipient validation works by locating valid user addresses > in a suitable (address-class dependent) lookup table. Additionally, > regardless of the address class, the virtual(5) table can alias an > arbitrary recipient to one or more (hopefully valid) recipients. > > http://www.postfix.org/ADDRESS_CLASS_README.html > http://www.postfix.org/ADDRESS_REWRITING_README.html > http://www.postfix.org/virtual.5.html > > So the best way to validate "prefix.u...@example.com" is to construct > a lookup table that will return "u...@example.com" for a lookup key > of the form "u...@example.com", but only if the user is valid.
Okay, I think I understood enough to do it (more or less) right. I set: virtual_alias_maps = regexp:/etc/postfix/virtual_alias_regexp and this file contains patterns like these: /^user@example\.com$/ u...@example.com /.*\.user@example\.com$/ u...@example.com /^user2@example\.com$/ us...@example.com /.*\.user2\.spiegl@example\.com$/ us...@example.com It works! Mails with prefixes are delivered to the right mailboxes. The part that doesn't work as expected is that the header line "Delivered-To:" doesn't show the original mail address but the mapped one (w/o the prefix). I assume this has to do with dovecot as LDA because when setting "virtual_transport = virtual" then there are correct X-Original-To and Delivered-To headers. Is there an option I forgot or maybe I am still misunderstanding something vital? Thanks a lot, Andy. -- lƃǝıds ʎpuɐ