[Dovecot] [courier-dovecot-migrate.pl] - No such file or directory at courier-dovecot-migrate.pl line 230

Luca Corti luca at leenoox.net
Tue May 1 03:54:03 EEST 2007


On Mon, 2007-04-23 at 12:07 -0700, Troy Engel wrote: 
> Try running the script under strace (i.e. 'strace -e trace=file perl 
> /script.pl') or truss to watch the perl script and see what "file or 
> directory" it's trying to open. That should provide a quick clue.

I was just testing the migration script, encountered the same issue and
just added a print before the open || die at line 230. It tries to open
the file Maildir/courierimapkeywords/:list which seems to be missing and
probably not mandatory.

I'm on Courier-IMAP 4.1.1. The patch below solves this. Is this a bug in
the script?

--- courier-dovecot-migrate.pl  Tue Apr  3 05:48:33 2007
+++ courier-dovecot-migrate.pl  Tue May  1 02:50:24 2007
@@ -227,7 +227,7 @@
   
   my (%keywords, %files);
   my $f;
-  open ($f, "$keyword_dir/:list") || die $!;
+  if (open ($f, "$keyword_dir/:list")) {
   # read keyword names
   while (<$f>) {
     chomp $_;
@@ -247,7 +247,7 @@
     }      
   }
   close $f;
-  
+  }
   # read updates from the directory
   my %updates;
   foreach (<$keyword_dir/*>) {


ciao

Luca



More information about the dovecot mailing list