Closed (won't fix)
Project:
Mailhandler
Version:
6.x-1.x-dev
Component:
Mailhandler
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2008 at 09:16 UTC
Updated:
13 Aug 2013 at 22:44 UTC
Jump to comment: Most recent file
Comments
Comment #1
mgorven commentedThe problem is that lines are trimmed before checking for the signature, which means that the trailing space is stripped and therefore doesn't match. My attached patch changes the signature check so that it is done against the untrimmed line.
Comment #2
moshe weitzman commentedCommitted to 6. Awaiting a D5 patch. Thanks.
Comment #3
kirkcaraway commentedNot sure if this has been fixed yet, but I'm having the same problem. I even tried substituting "###" for the normal "-- " and it still doesn't recognize it, and lets it all flow through. Is there something I'm missing? Thanks.
Comment #4
lblume commentedThe issue is still present in the current version. Can anyone with better understanding of PHP than me have a look? I don't really understand how the patch could have fixed that. Thanks!
Comment #5
halcyonCorsair commentedHi, here is an updated patch to correctly detect signatures from thunderbird, the current code will miss signatures from thunderbird when they begin like so:
Comment #6
Ian Ward commentedthanks for this patch halcyonCorsair. I put back the $sig in the function signature and where it's called. I am going to hold off on putting in the moz-specific code for now. I imagine mozilla is not the only custom case. There should probably be a way to hook in here to do custom cleanup work.
Comment #7
halcyonCorsair commented@Ian,
Even if we you don't add the custom bit for mozilla, you should be careful about the current lines:
I encountered the case with where an HTML email had a comment near the start:
and an email signature separator of '--', which the strstr($start, $sep) picked up and proceeded to ignore the rest of the email.
Comment #8
jmcclelland commentedI have similar problems as noted in comment #7. Forwarded messages get cut off (they start with ----- forwarded message -----).
I don't think the code as written or any of the patches actually do what is being advertised, which is to cut off the body when you encounter a line that includes the designated separator (and only the designated separator).
Given the thunderbird issue - maybe a better long term solution is to enable the addition of multiple separators? Or a regular expression? In the meantime - I've attached a patch the operates based on what I think is the advertised behavior.
jamie
Comment #9
ilo commentedsuch a nice problem.. thanks for the report!
Comment #10
danepowell commentedSorry, Mailhandler 6.x-1.x / 7.x-1.x are no longer supported. Please upgrade to 6.x-2.x / 7.x-2.x and re-open if still an issue. Thanks!