CopyMsgFromOneToAnotherMailbox

From Qmail Info Wiki

these are existing messages, sitting in one mailbox, and you want to move them to another mailbox on the same server?

first locate the mailboxes themselves:

   # vuserinfo -d olduser@olddomain.xyz
   /home/vpopmail/domains/olddomain.xyz/olduser
   # vuserinfo -d newuser@newdomain.xyz
   /home/vpopmail/domains/newdomain.xyz/newuser

then, in the old user's mailbox, find the messages you want to move.

   # cd /home/vpopmail/domains/olddomain.xyz/olduser/Maildir/cur
   # grep 'something' *
   1116979292.12141.server.xyz:2,S:> think something may be wrong  with how the find_userid() function works, specifically

then move the files to the new mailbox.

   # mv 1116979292.12141.server.xyz:2,S /home/vpopmail/domains/ newdomain.xyz/newuser/Maildir/new/

note that by placing the file in the .../Maildir/new/ folder, the next client (IMAP or POP3) which looks at the folder will see it as a new message. if you don't do it this way, a client program which already has a full index of the mailbox may not realize that a message has been added.