Opened 14 years ago
Last modified 6 years ago
#153 new setup
Trac notification dividers not stripped from Outlook replies
Reported by: | Chris.Nelson@… | Owned by: | anonymous |
---|---|---|---|
Priority: | major | Milestone: | strip signature/quotes |
Component: | email2trac | Version: | 1.0.0 |
Keywords: | Cc: |
Description
I'm using Outlook 2003, Trac 0.11.1, and the current email2trac. When I get a Trac notification like:
#1148: Install email2trac plugin --------------------------------+------------------------------------------- Reporter: chrisn | Owner: chrisn Type: task | Status: reopened Priority: minor | Milestone: Housekeeping Component: Trac Installation | Version: Resolution: | Keywords: Blockedby: | Estimatedhours: 0.0 Build: none | Blocking: Hours: 0 | Totalhours: 1.45 Customer: | Defectcause: --------------------------------+------------------------------------------- Comment: A comment.
and I Reply, Outlook shows me:
Engineering Tasks wrote: > #1148: Install email2trac plugin > --------------------------------+------------------------------------------- > Reporter: chrisn | Owner: chrisn > Type: task | Status: reopened > Priority: minor | Milestone: Housekeeping > Component: Trac Installation | Version: > Resolution: | Keywords: > Blockedby: | Estimatedhours: 0.0 > Build: none | Blocking: > Hours: 0 | Totalhours: 1.45 > Customer: | Defectcause: > --------------------------------+------------------------------------------- > > Comment: > > A comment. My reply here...
and this shows up in a Trac ticket comment as:
Engineering Tasks wrote: --------------------------------+--------------------------------------- ---- --------------------------------+--------------------------------------- ---- My reply here...
which shows up as the attribution line followed by four horizontal rules followed by my reply.
I had thought that maybe the long lines were breaking to something like:
Engineering Tasks wrote: > #1148: Install email2trac plugin > -------- > ... > -------- > ...
I had Outlook configured to force line breaks at 76 characters but increased it to 90 without this changing and the message in my Sent archive (attached) shows the dividing lines on the same line as the ">".
Attachments (1)
Change History (14)
Changed 14 years ago by Chris.Nelson@…
comment:1 Changed 14 years ago by bas
- Status changed from new to assigned
Sorry for the late reply, but is just test you message with:
- email2trac < BadQuoteStrip?.txt
But failed to reproduce you problem. So the mail must be sent via outlook. Can you reply to this tickets via Outlook with the header info intact?
comment:2 Changed 14 years ago by Chris.Nelson@…
email2trac wrote: -------------------------------------+-------------------------------- -- ---- -------------------------------------+-------------------------------- -- ---- Thanks for looking into this. Here's a reply from Outlook.
comment:3 Changed 14 years ago by bas
Here i dumped your mail to a file and this is the raw email from outlook:
> #153: Trac notification dividers not stripped from Outlook replies > -------------------------------------+---------------------------------- ---- > Reporter: Chris.Nelson@... | Owner: bas > Type: defect | Status: assigned > Priority: major | Milestone: > Component: email2trac | Version: 1.0.0 > Keywords: | > -------------------------------------+---------------------------------- ---- > Changes (by bas): >=20 > * status: new =3D> assigned >=20 >=20 > Comment: >=20 > Sorry for the late reply, but is just test you message with: > * email2trac < BadQuoteStrip.txt >=20 > But failed to reproduce you problem. So the mail must be sent via > outlook. Can you reply to this tickets via Outlook with the header > info intact?=20 Thanks for looking into this. Here's a reply from Outlook. =20 {{{ > -------------------------------------+---------------------------------- ---- > Reporter: Chris.Nelson@... | Owner: bas -------------------------------------+---------------------------------- ---- }}} That is why the lines and up in ticket.
comment:4 Changed 14 years ago by bas
there is some tezt missing ;-(. There is no > before the ---- lines
comment:5 Changed 14 years ago by Chris.Nelson@…
email2trac wrote: Yes, that appears to be the case in the message as received by email2trac (or as relayed by Outlook). For what it's worth, Outlook *displays* the lines of dashes on the same line as the '>' intended to quote them. Outlook quoting is weak. I guess the question becomes what can or should be done about it. Outlook is (sadly) common enough that it might be worth adding an accommodation to email2trac. Something like an option to turn on "handle Outlook quoting of Trac notifications" that would look for a quote character followed by a newline, (is there a blank at the end of the first line or beginning of the second?) followed by an unquoted line starting with a long string of hyphens and eat the line of hyphens.
comment:6 follow-up: ↓ 8 Changed 14 years ago by bas
I can make an option for it, but you there is always an chance that you lose some info. A better solution is to adjust the notification mail sent out. It is completely customizable, see:
I leave out the long ----- line or make them shorter or just an empty header
comment:7 Changed 14 years ago by bas
- Type changed from defect to setup
comment:8 in reply to: ↑ 6 Changed 14 years ago by Chris.Nelson@…
Replying to bas:
I can make an option for it, but you there is always an chance that you lose some info. A better solution is to adjust the notification mail sent out. It is completely customizable, see:
I leave out the long ----- line or make them shorter or just an empty header
I don't see anything there about where the template notification is found or how to control the header contents.
comment:9 Changed 14 years ago by bas
look for:
- ticket_notify_email.txt
It is in the directory:
- trac/ticket/templates
comment:10 Changed 14 years ago by Chris.Nelson@…
email2trac wrote: There I see {{{ $ticket_body_hdr $ticket_props #choose ticket.new #when True $ticket.description #end #otherwise #if changes_body Changes (by $change.author): }}} Presumably that first line includes the header fields and all the dashes but I don't seem to have explicit control over the content of the ticket_body_hdr. I imagine that's a Genshi thing I don't understand. I'll look into that but is there a local hook where I could preprocess email2trac input? That would let me put an custom Outlook handler in place without modifying my notifications (which are fine, except for how Outlook mungs them on their way to email2trac).
comment:11 Changed 14 years ago by bas
You can always make a wrapper script in front of email2trac that does some preprocessing and then give the result to the email2trac script.
comment:12 Changed 14 years ago by bas
- Milestone set to strip signature/quotes
comment:13 Changed 6 years ago by Soriyya@…
- Owner changed from bas to anonymous
- Status changed from assigned to new
Message that doesn't have dividers stripped.