[Dovecot] two mailboxes - sieve?

Daniel L. Miller dmiller at amfes.com
Wed Nov 24 02:48:17 EET 2010

On 11/23/2010 1:16 PM, Egbert Jan van den Bussche wrote:
> Op 23-11-2010 22:08, Charles Marcus schreef:
>> On 2010-11-23 2:04 PM, Egbert Jan van den Bussche wrote:
>>> Hi helpful list!
>>> I have this user that has two different accounts om the mail server. 
>>> One
>>> is a system account, the other is a virtual account (for what it is
>>> worth...). This user would like to have all his email to the virtual
>>> mail box (maildir format) automatically moved (or delivered) to the
>>> system mailbox (also maildir fornat). Both are on the same machine and
>>> use the same postfix/dovecot installation. Something tells me that I
>>> might need the sieve plugin for lda here since dovecot is the local
>>> delivery transport. I have no knowledge whatsoever about sieve or its
>>> scripting. What do I need to o apart from enabling the sieve plugin in
>>> dovecot.conf?
>>> Or is there another simple solution for this problem directly in 
>>> Postfix
>>> or with fetchmail? A simple working example would be wonderful!
At least two alternatives are available to you.  Pure Postfix solution, 
using the recipient_bcc_maps parameter; or Sieve, using the redirect.  
Simple Sieve script needs to be enabled for the base mailbox (in this 
case, the virtual mailbox):

# Sieve script file
redirect "copymail at domain.com";

Pure Postfix option -
1.  Create a file to store mappings - I use /etc/postfix/maps/recipient_bcc
2.  Add entries to that file in the form:
     mail at domain.com        copymail at domain.com
3.  "Compile" the file - 'postmap /etc/postfix/maps/recipient_bcc' - 
this creates recipient_bcc.db
4.  Add 'recipient_bcc_maps = hash:/etc/postfix/maps/recipient_bcc' to 
5.  Execute 'postfix reload'

Further questions should be directed to the Postfix mailing list.

More information about the dovecot mailing list