On Tue, Apr 02, 2002 at 11:47:51AM -0600, David Champion wrote: > > Err... why are you using Mutt? Why not just set up an NFS share or FTP > > access, and just *copy* the files from one server to the other? > > You answered this yourself....
Reason is that the destination server doesn't store IMAP folders in mbox format, plus it doesn't mount NFS (for other reasons). > > Or is there a specific reason you need to use an MUA to do it? I can't > > think of one good reason, unless of course you don't have anything but > > IMAP access to each server The CGI/Perl script is meant to be generic and run by the user, and IMAP is the only way to access the server. > behalf of my users). With access to one hierarchy of mboxes, I use a > command like this to transfer them all to an IMAP server: > > cd .../path/to/folders > find . -type f -print | while read folder; do > directory=`dirname $folder` > folder=`basename $folder` > mutt -f $directory/$folder -e "push >'<tag-pattern>~A<enter><tag-prefix><copy-message><kill-line>imap://SERVER/$directory/$folder<enter><enter>PASSWORD<enter><exit>'" > echo > echo "$directory/$folder is transferred." > done Thanks. Though I was looking for a better way, knowing that someone else has done it before is good enough. :) > It's trivial to extend that to handle multiple users, if you know > their passwords. If you don't know their passwords, then it's probably > possible to arrange a back-channel transfer not involving IMAP directly. The passwords on either side is the same, so shouldn't be a problem. Thanks everyone. Robert