storing mail across several cyrus partitions

David Carter dpc22 at cam.ac.uk
Fri Aug 31 09:26:24 EDT 2007


On Fri, 31 Aug 2007, Artem Bokhan wrote:

> Partition or sub-partition -- no matter. The purpose -- to store the 
> mail of a single user accross different storages.

Yes, you can do this. /etc/imapd.conf:

   partition-default: /spool/cyrus/mailstore
   partition-test: /spool/cyrus/test/data
   metapartition-test: /spool/cyrus/test/meta
   partition-test2: /spool/cyrus/test2/data
   metapartition-test2: /spool/cyrus/test2/meta
   partition-test3: /spool/cyrus/test3/data
   metapartition-test3: /spool/cyrus/test3/meta

Raw IMAP as a cyrus admin user (simply because it gives more feedback than 
the cyradm rename command), using the optional third argument to rename.

Start out with three mailboxes on default partition:

   . LIST "user/dpc22" *
   * LIST (\HasChildren) "/" "user/dpc22"
   * LIST (\HasNoChildren) "/" "user/dpc22/bar"
   * LIST (\HasNoChildren) "/" "user/dpc22/foo"
   . OK Completed (0.000 secs 4 calls)

Move user/dpc22/foo and user/dpc22/bar to test2 and test3:

   . RENAME user/dpc22/foo user/dpc22/foo test2
   * OK rename user/dpc22/foo user/dpc22/foo
   . OK Completed

   . RENAME user/dpc22/bar user/dpc22/bar test3
   * OK rename user/dpc22/bar user/dpc22/bar
   . OK Completed

The only gotcha is that each rename moves all subsidiary mailboxes:

   . RENAME user/dpc22 user/dpc22 default
   * OK rename user/dpc22 user/dpc22
   * OK rename user/dpc22/bar user/dpc22/bar
   * OK rename user/dpc22/foo user/dpc22/foo
   . OK Completed

-- 
David Carter                             Email: David.Carter at ucs.cam.ac.uk
University Computing Service,            Phone: (01223) 334502
New Museums Site, Pembroke Street,       Fax:   (01223) 334679
Cambridge UK. CB2 3QH.


More information about the Info-cyrus mailing list