Closed Bug 93941 Opened 23 years ago Closed 16 years ago

bug_email.pl incorrectly attaches multipart/alternative

Categories

(Bugzilla :: Incoming Email, defect, P3)

2.12
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mmlange, Unassigned)

References

Details

Attachments

(2 files)

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
Is it possible to attach a test mail here having this html alternative text? 
 
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. ***
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 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 on attachment 168836 [details] [diff] [review]
Patch to BugzillaEmail.pm, bug_email.pl, bugzilla_email_append.pl

bitrot
Attachment #168836 - Flags: review?(justdave) → review-
Blocks: 322955
No longer blocks: bz-email-in
No enhancement nor code refactor on branches.
Assignee: nobody → general
QA Contact: mattyt-bugzilla → default-qa
Target Milestone: Bugzilla 2.20 → ---
Assignee: general → incoming.email
Component: Bugzilla-General → Incoming Email
Whiteboard: bug_email
We removed bug_email from the code, and email_in.pl doesn't even support attachments yet.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: