How to copy messages between mailboxes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi people:

I'm trying to create a script to copy "certain" messages from a
mailbox of user A to mailbox of user B. These are the steps I have in
mind:

1. Select what messages to copy from mailbox of user A. They can
message files located at different folders within its mailbox.

2. Choose where to copy messages in mailbox of user B.

3. Make the copy with cp and assign appropiate perms.

4. Reconstruct the mailbox of user B

These would be the commands:

# mkdir /var/spool/imap/a/user/B/Recent
# cd /var/spool/imap/a/user/A
# cp 234. 235. 236. Drafts/12* /var/spool/imap/a/user/B/Recent
# chown -R cyrus:mail /var/spool/imap/a/user/B/Recent
# su cyrus -c '/usr/lib/cyrus-imapd/reconstruct -r user/B'

I thought this it would be enough, but I know I'm missing some things:

1. What name should I assign to message files being copied from A to
B? I know that their name is equal to its UID. So, what's the value of
the major UID? Does every folder mantain its own UID sequence?
2. There are no cyrus.header, cyrus.index nor cyrus.cache files at
/var/spool/imap/a/user/B/Recent because I just created that directory.
So... I don't need to copy those files from A because reconstruct will
create them... is this right?

I know my English isn't very good yet to explain my question
correctly, but I hope someone can understands me to help me a bit with
this.

Thanks, bye
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux