J-Monk has asked for the wisdom of the Perl Monks concerning the following question:
Problem is that source accounts inbox is considered as subfolder and is migrated to destination servers INBOX.INBOX subfolder. How do I migrate that folder to destination accounts inbox? here is the code:
for my $folder ($imap->folders) { $imap->select($folder) or warn "Error: $imap->LastError\n"; #$folder =~ s/INBOX$//g; # If I try this, mail::IMAPClient tri +es to create subfolder and exits. $folder =~ s/^$prefix1/$prefix2/g; $folder =~ s/$sep1/$sep2/g; $imap->migrate( $imap2, "ALL", $folder ) or warn "Error: $imap +->LastError\n"; }
So basically what's happening is that folder /INBOX is migrated to INBOX.INBOX and it should be migrated to INBOX.
Update
I tried to modify $folder with this:
$folder =~ s/INBOX$//g
But then mail::IMAPClient tries to create subfolder and exits.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: mail::IMAPClient migrating mail to Inbox
by kcott (Archbishop) on Jan 19, 2014 at 09:36 UTC | |
|
Re: mail::IMAPClient migrating mail to Inbox
by karlgoethebier (Abbot) on Jan 19, 2014 at 11:18 UTC |