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/
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html