IMAP sync tool (rsync for IMAP)

Florin Andrei florin at andrei.myip.org
Tue Dec 26 17:45:43 EST 2006


John Capo wrote:
> 
> A 32MB message occupies a lot more than 32MB when its a Perl string.
> Use a temp file instead.
> 
>     my $message_file = "/tmp/xfer-$$";
>     unlink($message_file);
>     $from->message_to_file($message_file, $f_msg);
> 
> And further down.
> 
>    unless($new_id = $to->append_file($t_fold, $message_file, $flags_f, $d))
> 
> Instead of 
> 
>    unless($new_id = $to->append_string($t_fold,$string, $flags_f, $d))

It's hard to tell without actually testing that change, but I assume it 
would slow down the script a little bit?

Anyway, slower is better than crashing. I'll try and contact the author 
to make him aware of this discussion thread.

-- 
Florin Andrei

http://florin.myip.org/


More information about the Info-cyrus mailing list