ram: > > 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
With the above, Postfix would accept mail for non-existent recipients. Instead, use recipient_bcc_maps, and use a PCRE table of: /etc/postfix/main.cf: recipient_bcc_maps = pcre:/etc/postfix/copy_mail /etc/postfix/copy_mail /^(.*)@example\.com$/ $...@tempdomain.example.com Wietse