This perl script will copy an existing user's mailbox to a new mailbox, preserving all imap flags. I suspect the Seen flag is lost though as that is tracked on a per-user basis.

You'll also need "utils.pl" and "prefs.pl". "utils.pl" contains some simple utility functions that I grouped together in one file so that I wouldn't have to duplicate code in multiple perl scripts. "prefs.pl" contains site specific information such as mail server hostname, cyrus admin username, cyrus admin password, etc.

Usage: ./copy_user_mailbox.pl old_username new_username Copies old_username's mailbox to new_username. new_username's mailbox should not already exist.

Topic attachments
I Attachment Action Size Date Who Comment
plpl copy_user_mailbox.pl manage 4.8 K 23 Jun 2004 - 19:28 TWikiGuest Perl script for copying a mailbox
plpl prefs.pl manage 0.2 K 23 Jun 2004 - 19:29 TWikiGuest Site specific preferences file
plpl utils.pl manage 1.2 K 23 Jun 2004 - 19:28 TWikiGuest Utility functions used by copy_user_mailbox.pl
Topic revision: r43 - 15 Sep 2005 - 11:48:57 - TWikiGuest
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback