View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0026442 | Plugin - EmailReporting | General | public | 2019-12-09 07:05 | 2020-02-05 11:28 |
| Reporter | linksonice | Assigned To | SL-Gundam | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | feedback | Resolution | open | ||
| Product Version | 0.10.1 | ||||
| Summary | 0026442: Email body does not appear in description, for LARGE emails | ||||
| Description | Looking at the mail_max_email_body thing ... is this a clear indication we should expect TRUNCATION of large emails, so the truncated version appears in the ticket Description? I am not getting this result, irrespective of what value I put in the config field "Maximum size of the description or note being added to the issue". Please see my config options in the attachment below. mail_max_email_body Description: This is the maximum size allowed for the description or a note. The choice was made to make the default 65535 bytes because that used to be the default for old MantisBT versions prior to mid 2007 using MySQL. New MantisBT installations after mid 2007 will be able to store upwards of 1 million bytes. Even more depending on which database backend you use. As updating the schema does not update the column size in question this would be a good default that would not cause problematic issues Of course you can increase this if you want. Just make sure that your MantisBT database is using a column type in which this will fit | ||||
| Additional Information | In fact none of the config options in that section - "Runtime configuration options" are reflected in what happens. 1 - Delete processed mail from inbox - emails are NOT deleted. Saying this, I'm also using "Create project subfolder structure". If we don't use that and have a single folder for the plugin to "reap" from, the mails in the single level folder ARE deleted, IIRC. with multiple project folders, mails are left in there after reaping/processing into tickets, but do not result in duplicate tickets. Is this the idea, for emails to remain in there and have to be deleted by hand? I can't imagine that would be the case. 2 - Maximum size of the description or note being added to the issue - no value entered here seems to help, even 1,000,000 ... if you consider the 1 million bytes is a maximum these days, as per the doc. 3 - Use this text if the description or note has been truncated - there is no truncation msg, I guess because there is no truncation - rather the email body / description is truncated to zero, or does not come through at all. 4 - Add the complete description or note as an attachment incase it was truncated - same idea as 3. Is there anything obvious we should be doing to get the truncation feature to work? Is this still a known issue? There appear to have been similar issues over time, but you'd think they would be resolved by now. Thanks for any ideas! Andrei | ||||
| Tags | exchange | ||||
| Attached Files | |||||
|
|
|
Hi SL-Gundam, thanks for your prompt reply. 1 - we are using IMAP yes, and reaping mails from an Outlook/Exchange email account, which works fine for the most part except for the points mentioned: large email content not being entered into the description field, and the emails themselves not being deleted from the specially designated folder in my outlook, after they are reaped by the plugin. 2 - We are using the almost very latest MantisBT version 2.22.1. I will look into the other points and get back to you asap. Best, Andrei |
|
|
Exchange is a bitch when it comes to IMAP because it seems it is using an incomplete implementation of IMAP4REV1. As earlier mentioned, please provide the raw_msg so that i can look into the truncation issue |
|
|
Please find attached the raw message body of the kind of email we're dealing with, and trying to get truncated. I can't imagine you'd need the email header raw body, because it's purely a question of the size, but I can send that also if you think it would help. I say it's all about the body size because I've done some tests ... steadily decreasing the number of rows in the ridiculously huge, repetitive table, and eventually the plugin does accept the mail body in the Description field. Hope this helps, thanks. |
|
|
Please provide the raw_msg. I want to pass it through EmailReporting to see what happens. That requires the email to be complete in its headers and structure If you need be you can change any private information in the message but make sure the headers are structurely intact |
|
|
Hi SL-Gundam, sorry for the delay. The raw header is here: https://pastebin.com/78LxHKQd . Hope this helps. Thanks, A. |
|
|
I'm not sure how you created this dump but i need to raw_msg file that EmailReporting creates when its run in debug mode and processes an email. Please provide the complete dump |
|
|
The raw message body was attached to this ticket earlier here: https://www.mantisbt.org/bugs/view.php?id=26442#c63309 ... In fact I got both raw message body and header using Outlook! ... not EmailReporting in debug mode as you mention. Can you not put the 2 things together that I've now sent, or do we need to approach this differently? |
|
|
It would take an awful lot of time to do that because of the way a raw email is structured But I've done some testing and found an issue in case max length was encountered on old MantisBT installations. Can you test the latest DEV version and see whether it works better |
|
|
I've done a comprehensive test with an upgraded installation, now using mantisbt-2.24.0-dev, and it's no cigar. Any significantly large number of lines simply does NOT get pulled into the Description field. It doesn't even have to be that many lines. I get the same fail for instance with 1000 lines, as I do with several thousand, let alone 60,000. There is another interesting aspect however: the failure only happens when the body of the mail contains a TABLE with a very large number of rows. IF, however, I remove that same text from each row of the table, and make up a whole new email with the raw text alone, so it's a 1000 rows of text, but NO TABLE, that text DOES get reaped into the Description field! Unfortunately we need to do an automated harvesting of the original mails that contain tables, but maybe this difference in behaviour will help debug the issue. |
|
|
I've never tested EmailReporting HTML conversion on a large table. But i suspect it would take quite a lot of processing time with how Markdownify parses the content. Please provide a raw_msg (created by debug mode in EmailReporting) so that we can debug those issues further |
|
|
Before providing a raw_msg created with debug mode, I have to mention the size of the mail body causing this issue is well over 60,000 bytes, in fact many times over. - 1,701,141 bytes to be exact as we can see in the attachment feature for the raw body I sent earlier at https://www.mantisbt.org/bugs/view.php?id=26442#c63309 ! The question is now: can the config option mail_max_email_body handle an email as big as 2M? I just specified 2000000 and still no cigar when testing, but maybe I need to ensure the relevant column type in the DB can handle that size also. I refer now to the doc, which is not exactly clear: ================================================================================================= Description: This is the maximum size allowed for the description or a note. The choice was made to make the default 60000 bytes because 65535 used to be the default column length for old MantisBT versions prior to mid 2007 using MySQL. Since we need some overhead we lowered 65535 to 60000. New MantisBT installations after mid 2007 will be able to store upwards of 1 million bytes. Even more depending on which database backend you use. As updating the schema does not update the column size in question this would be a good default that would not cause problematic issues Of course you can increase this if you want. Just make sure that your MantisBT database is using a column type in which this will fit. This is usually the case if you MantisBT installation was created using MantisBT 1.1.x or later ============================================================================== [not sure how that text came out so big ..] |
|
|
EmailReporting can handle anything as long as you have enough memory and the database can accept the amount of data. Because of the different databases that might be used with MantisBT, the maximum is not set in stone I expect this to be an issue with the amount of processing time required for an email that large... either that or a memory issue... |
|