bug_email.pl incorrectly attaches multipart/alternative

RESOLVED WONTFIX

Status

()

Bugzilla
Incoming Email
P3
normal
RESOLVED WONTFIX
17 years ago
9 years ago

People

(Reporter: Matthew Lange, Unassigned)

Tracking

Details

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
Here's my problem:
I have an Exchange server that sends MIME-attached email with multiple parts:
text/plain
text/html

The MIME parser included with bug_email.pl grabs the text/plain part and 
appends the text/html part to the message when submitting a bug via email.
I'd like to the option to include ONLY the text/plain part when processing a 
bug via email.
Sounds like bug_email.pl isn't recognizing multipart/alternative (which means you 
pick whichever piece you like the best and discard the rest, rather than treating 
the rest as attachments).

I'll call this a bug, rather than a feature request.
Severity: enhancement → normal
Summary: bug_email.pl Enhancement → bug_email.pl incorrectly attaches multipart/alternative
Priority: -- → P3
Target Milestone: --- → Bugzilla 2.18
-> Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: Bugzilla 2.12 → 2.12
Whiteboard: bug_email
Blocks: 94850

Comment 3

16 years ago
Is it possible to attach a test mail here having this html alternative text? 
 

Comment 4

16 years ago
Created attachment 97177 [details]
Sample email (I deleted some headers which are not needed)

See also Appendix A in http://www.ietf.org/rfc/rfc2049.txt for an example
(created by Mozilla post 1.1).
See "5.1.  Multipart Media Type" in http://www.ietf.org/rfc/rfc2046.txt for the
related RFC.
CCing Dan Berlin, who from stuff I've seen around, I know is actually using the
bug_email stuff.  I'd appreciate any input or fixes you'd be willing to provide
on these bugs :-)
Assignee: justdave → nobody
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
*** Bug 274837 has been marked as a duplicate of this bug. ***

Comment 7

13 years ago
Created attachment 168836 [details] [diff] [review]
Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl

Jeez Dave is fast at discovering duplicates, lol.  Let's try this again...

* Factors out dump_entity (which is 99% similar between bug_email.pl and
bugzilla_email_append.pl)
* When encountering multipart/alternative, first looks for a text/plain and
chooses to parse only that part.  If a text/plain doesn't exist, choose the
first part and parse only that part.

Not sure if this is the best way to handle @attachments, which are used by
bug_email (as a global) but not at all by bugzilla_email_append.  Just noticed
that this patch is similar to bug 176190.

Doesn't really affect the interface with Bugzilla in my opinion, should stay
out of the way of the ever-pending re-integration.
(In reply to comment #7)
> Jeez Dave is fast at discovering duplicates, lol.  Let's try this again...

heh, sorry about that.

> Just noticed that this patch is similar to bug 176190.

Wonder if it's worth trying to combine them, since the code to separate that out
is getting shared in BugzillaEmail.pm now anyway.

We keep talking about doing a complete write from scratch on inbound email, but
nothing's happening with it yet, so we might as well fix what we have in the
meantime. :)

Comment 9

13 years ago
Comment on attachment 168836 [details] [diff] [review]
Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl

Looks like this patch needs a review...?
Attachment #168836 - Flags: review?(justdave)

Comment 10

13 years ago
Comment on attachment 168836 [details] [diff] [review]
Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl

bitrot
Attachment #168836 - Flags: review?(justdave) → review-

Updated

12 years ago
Blocks: 322955

Updated

12 years ago
No longer blocks: 94850

Comment 11

12 years ago
No enhancement nor code refactor on branches.
Assignee: nobody → general
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Bugzilla 2.20 → ---

Updated

10 years ago
Assignee: general → incoming.email
Component: Bugzilla-General → Incoming Email
Whiteboard: bug_email

Comment 12

9 years ago
We removed bug_email from the code, and email_in.pl doesn't even support attachments yet.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.