humm, sorry all, poured the porto to early !
you can create folders with spaces in the name, using double-quotes. Also, I was using a test account for whom the home directory contained the mail files. When I tried with another user, the script was on its way to create folders for all the folders under the users directory. I'll go for a nap, now ! See ya ! On Wed, 2002-10-02 at 06:59, Dominique Fortier wrote: > Finaly, > > For many reasons I had many bugs migrating from mbox to cyrus. > > Migration using the information found in O'Reillys Managing IMAP worked > greath but did'nt fixed the "Received" date field differently read from > MS Outlook. > > imapmigrate (from cyrus-tools) with the modifications from Scot W. > Hetzel was looking good, realy good. > > It worked. > > Downloaded it, installed it, installed the MAIL::IMAPClient.deb for > woody 3.0 (to have both) copied them IMAPClient.pm-woody, ... > > edited imapmigrate to fit my system, > $debug = 1; > my $copyEmptyFolders = 1; > $usealtnamespace = 1; > $fromhost = "192.168.0.100"; > $tohost = "127.0.0.1"; (fastest pc) > $tohostadminuid = "cyrus" > > removed everything about LDAP, had too, > > kept asking for ldap related stuff even if > > $useldap = 0; > > (why? > > if( $useldap ) { > use Net::LDAP; > use Net::LDAP::Util qw(ldap_error_text); > } > > ) > > created the user file, ran the script, Bang ! Worked greath ! > > All the mails and folder from users mail directory was now under INBOX > on the new server. Deleted then recreated the account. > > Made the modification from Scot to imapmigrate, ran the script. > > All errors about "APPEND". Installed the IMAPClient from Scot, ran the > script, same thing. The error message, : > > Read: * 28 FETCH (UID 37 INTERNALDATE " 7-Sep-2001 17:41:58 -0400") > 145 OK UID FETCH completed > > Sending: 33 APPEND "INBOX" (\Seen) 7-Sep-2001 17:41:58 -0400 {3182} > > Sent 60 bytes > Read: 33 BAD Missing required argument to Append command > > hours later, > > added > > next if ($folder =~ /mbox$/ || $folder =~ /\.gz$/ || $folder =~ /\.Z$/ > || $folder =~ /^\./); > > from O'Reillys bsd2cyrus script. > > Modified, > > my $goodchars = "\+,\-.0-9:=\@A-Z_a-z~"; > > cyrus-1.5.19 in not in love with spaces in folders name. Added this line > when creating folders, > > $newfolder = "user\.$user\.$newfolder"; > > before this one, > > unless ($newimap->create($newfolder)) > > otherwise I got "Permission dedied" from cyrus. > > Finaly, I added : > > $date = "\"$date\""; > > in IMAPClient.pm under "sub append_string". (This last line fixed the > so BAD Append command !) The lines from the cyrus-tools "should" have > worked tought !? > > my $string = "$count APPEND $folder " . > ( $flags ? "$flags " : "" ) . > ( $date ? "$date " : "" ) . > "{" . length($text) . "}\x0d\x0a" ; > > Or is this C : "( $date ? "$date " : "" ) ." > > Ran the script, everythings ok now ! Outlook sees the "Received" field > like on the old server. > > One thing bugs me now, I'd like to see the folders directly under the > server, not under the inbox folder. Don't tell me its another MS > Outlook "feature" !!! > > Greath job to all and keep going ! > > > > > > Dominique Fortier > > > > > "La pérénité d'une entreprise s'assure entre autre en s'assurant que > chacun des membres de l'organistaion soit facilement remplaçable" > > Ça sent la marde un peu ça, vous trouvez pas ? > > >