mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-15 10:28:48 +01:00
Make a bigger header size assumption (32k) in order to cover importing mails with big headers
This commit is contained in:
parent
5ceea5b93e
commit
41a983e317
@ -7219,8 +7219,11 @@ class Mail
|
|||||||
//error_log(__METHOD__.__LINE__.':'.array2string($structure));
|
//error_log(__METHOD__.__LINE__.':'.array2string($structure));
|
||||||
|
|
||||||
// unfortunately parseMessage does NOT return parsed headers (we assume header is shorter then 8k)
|
// unfortunately parseMessage does NOT return parsed headers (we assume header is shorter then 8k)
|
||||||
$start = is_string($message) ? substr($message, 0, 8192) :
|
// *** increase the header size limit to 32k to make sure most of the mails even with huge headers are
|
||||||
(fseek($message, 0, SEEK_SET) == -1 ? '' : fread($message, 8192));
|
// covered. TODO: Not sure if we even need to cut of the header parts and not just passing the whole
|
||||||
|
// message to be parsed in order to get all headers, it needs more invetigation.
|
||||||
|
$start = is_string($message) ? substr($message, 0, 32768) :
|
||||||
|
(fseek($message, 0, SEEK_SET) == -1 ? '' : fread($message, 32768));
|
||||||
|
|
||||||
$length = strpos($start, Horde_Mime_Part::RFC_EOL.Horde_Mime_Part::RFC_EOL);
|
$length = strpos($start, Horde_Mime_Part::RFC_EOL.Horde_Mime_Part::RFC_EOL);
|
||||||
if ($length===false) $length = strlen($start);
|
if ($length===false) $length = strlen($start);
|
||||||
|
Loading…
Reference in New Issue
Block a user