On Tue, 2010-02-23 at 13:23 +0200, Razvan Cosma wrote: > Hello, > While moving the IMAP services to a new host, I'd need to copy all > messages addressed to anyu...@example.com to the old inbox, and to the > new at anyu...@tempsubdomain.example.com > Virtual maps allows this, but needs the full list in the form > us...@example.com: user1 us...@tempdomain.example.com > us...@example.com: user2 us...@tempdomain.example.com > .. > Is there some shortcut to write "replace the domain part for any user > of example.com and copy to the new address?" >
use a pcre or a regex map ==main.cf== virtual_alias_maps=pcre:/etc/postfix/copy_mail ==/etc/postfix/copy_mail== /^(.+)\...@example\.com$/ ${1},$...@tempdomain.example.com