Unable to create attachment with Email attribute = HTML

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Unable to create attachment with Email attribute = HTML

Post by sintaq »

My installation setup

mantis 2.24.0
emailreporting 0.11.0-DEV

I just upgrade my mantis installation. Having run through normal checkups, i notice below scenarios:

1) sending email with HTML type to add note AND attachment, mantis only able to create note. No attachment was added
2) sending email with Plain Text type to add note AND attachment, mantis able to create note AND attachment.

Not sure whether this is expect behavior or and issue. Open for discussion. Thanks
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

Do you use an attachment blacklist?
Like EmailReporting's md5 list? (http://www.mantisbt.org/wiki/doku.php/m ... hments_md5)
Or MantisBT's allowed_files or disallowed_files? (http://www.mantisbt.org/docs/master/en- ... loads.html)

You might want to enable this: http://www.mantisbt.org/wiki/doku.php/m ... ts_logging and check what ends up being rejected
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

Do you use an attachment blacklist?
Like EmailReporting's md5 list? (http://www.mantisbt.org/wiki/doku.php/m ... hments_md5)
No

Or MantisBT's allowed_files or disallowed_files? (http://www.mantisbt.org/docs/master/en- ... loads.html)
Yes. It was configured to disallowed "exe " only

You might want to enable this: http://www.mantisbt.org/wiki/doku.php/m ... ts_logging and check what ends up being rejected
Enabled. Where can i check the log? Do i need to turn on debug mode?
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

EmailReporting will write a "Rejected files.txt" to the ticket in question.
Last edited by SL-Gundam on 29 Apr 2020, 16:04, edited 1 time in total.
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

#SL-Gundam

I'm not able to allocate the said exception file.
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

Sharing the screenshots for reference
Attachments
Capture2.JPG
Capture2.JPG (33.32 KiB) Viewed 3750 times
Capture1.JPG
Capture1.JPG (34.98 KiB) Viewed 3750 times
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

Could you please copy the config $g_allowed_files and $g_disallowed_files and their contents and paste them in this thread

Try the test again but run bug_report_mail.php manually. If it fails to write the "Rejected files.txt" it will notify you of this in the output
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

SL-Gundam wrote:
29 Apr 2020, 16:11
Could you please copy the config $g_allowed_files and $g_disallowed_files and their contents and paste them in this thread

Try the test again but run bug_report_mail.php manually. If it fails to write the "Rejected files.txt" it will notify you of this in the output
config_defaults_inc.php
$g_allowed_files = '';
$g_disallowed_files = '';

config_inc.php
$g_disallowed_files = 'exe';
Attachments
Capture3.JPG
Capture3.JPG (33.92 KiB) Viewed 3741 times
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

result as attached
Attachments
Capture4.JPG
Capture4.JPG (107.44 KiB) Viewed 3739 times
raw_msg_shared.txt
(48.4 KiB) Downloaded 98 times
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

The raw_msg you shared is from: Fri, 12 Jul 2019 09:28:25 +0800
The raw_msg seems to be a different email compared to the one in the screenshot
Please provide the correct raw_msg

I see 2 attachments in the screenshot with a email in HTML. So its working correctly for this test?
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

SL-Gundam wrote:
29 Apr 2020, 19:12
The raw_msg you shared is from: Fri, 12 Jul 2019 09:28:25 +0800
The raw_msg seems to be a different email compared to the one in the screenshot
Please provide the correct raw_msg

I see 2 attachments in the screenshot with a email in HTML. So its working correctly for this test?
Apparently, the intended attachment for test 4 wasnt being created. The 2 attachments for test 4, the previous test
Attachments
Capture5.JPG
Capture5.JPG (82.38 KiB) Viewed 3703 times
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

in this screenshot i see 2 attachments which i als see in the MantisBT screenshot earlier
So what are we missing at the moment?
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

The sequence is like this.

Test 3: HTML mode. Add note and attachment via email consists of attached txt file, JPEG and screenshot pasted. No attachment created in Mantis. Just note only
Test 4: HTML mode. Add note and attachment via email consists of attached txt file. Log note created (which possible another issue) together with attachments from Test 3 email.

Hope this clarify. Thanks
SL-Gundam
Posts: 614
Joined: 06 Jul 2011, 14:17

Re: Unable to create attachment with Email attribute = HTML

Post by SL-Gundam »

Not clear at all i'm afraid
The screenshots show a properly working situation.
The image of MantisBT shows that a note, txt attachment and image are added into the issue in MantisBT (https://www.mantisbt.org/forums/viewtop ... 935#p69935)
The other image from your mail program show the same email with the same attachments and image (https://www.mantisbt.org/forums/viewtop ... 937#p69937)
So no issue

Show me screenshots of a not working situation
Please provide the raw_msg of that situation
Please also run it the way you did here: https://www.mantisbt.org/forums/viewtop ... 934#p69934
sintaq
Posts: 34
Joined: 12 Oct 2017, 11:38

Re: Unable to create attachment with Email attribute = HTML

Post by sintaq »

To avoid confusion, i redo testing

As attached.

Cycle 1 - Test 1.
Note and attachments were created OK.

Cycle 2 - Test 2
Note and attachments were add in separate note.
Attachments
raw_msg_shared.txt
(23.91 KiB) Downloaded 97 times
Test2-C.JPG
Test2-C.JPG (76.44 KiB) Viewed 3664 times
Test2-B.JPG
Test2-B.JPG (58.92 KiB) Viewed 3664 times
Post Reply