Hello!
I have some questions about RCube (1.2)
1. rcube_message.php, lines 114-120
if (!empty($this->headers->structure)) {
$this->get_mime_numbers($this->headers->structure);
$this->parse_structure($this->headers->structure);
}
else {
$this->body = $this->storage->get_body($uid);
}
Is that the whole body of unstructured (not multipart) message is stored in memory? When you use S/MIME an encrypted email is unstructured and can be large (tens of megabytes). Of course, if the message is decrypted before this place (for example, in rcube_imap) the appearance of large unstructured letters unlikely.
2. What for is the function get_part_content in rcube_message.php? This function gets part body from the storage object (i.e. imap object) and not exec hook 'message_part_body'. Will it cause problems in message decryption?
3. The same questions about get_body in rcube_storage.php.
Also note that some plugins communicate directly with the rcube_imap, to get the text of the message part.
4. Yes, 'message_part_structure' can change the structure of the part of the message. But, function parse_structure in which is the challenge of this hook, not always called. I do not quite understand the logic of RC and I ask you to say whether the hook 'message_part_structure' will provide normal work in these situations:
- S/MIME ecnrypted message is not multupart message. After decryption, it can be a multipart or not multipart message.
- S/MIME signed message is usually a multipart message. After decryption, it can be a multipart or not multipart message.
In both situations changing of part structure is not sufficient.
5. Some of message headers (Content*) have to be changed on decryption or sign verification. How it can be done?
Best regards,
Vladimir Gorpenko