Issue491

Title Ignore email signatures
Priority wish Status chatting
Superseder Nosy List ezio.melotti, lemburg, r.david.murray, serhiy.storchaka, techtonik
Assigned To ezio.melotti Topics

Created on 2012-11-07.09:53:12 by serhiy.storchaka, last changed 2012-11-22.10:02:42 by lemburg.

Files
File name Uploaded Type Edit Remove
unnamed techtonik, 2012-11-07.10:27:46 text/plain
Messages
msg2629 (view) Author: serhiy.storchaka Date: 2012-11-07.09:53:11
I propose to ignore an email signature block.  I.e. remove from an incoming email the signature mark line "-- " (two hypens and space) and all lines after the mark, and then remove trailing empty lines.
msg2630 (view) Author: lemburg Date: 2012-11-07.10:00:00
RoundUp already does this, but for some reason it doesn't consistently work: for some email replies the sig is removed, for others, it's added to the tracker item (which is annoying).

Unfortunately, RoundUp does not allow editing the tracker item messages. Otherwise, I'd remove the sigs again by hand.
msg2631 (view) Author: lemburg Date: 2012-11-07.10:04:49
Here's an example of where it did not work:

http://bugs.python.org/msg175052
msg2632 (view) Author: serhiy.storchaka Date: 2012-11-07.10:22:09
May be RoundUp can't remove the signature if it longer than the text before the signature?  Can you open a test issue and send 1-, 2-, 3-, ..., 20-lines messages with your long signature?
msg2633 (view) Author: serhiy.storchaka Date: 2012-11-07.10:23:54
Of course, you can send less messages, using binary search.
msg2634 (view) Author: techtonik Date: 2012-11-07.10:27:46
I can't see the code where Roundup strips signature. If somebody can find
it, it will be easier to factor out and test independently of full roundup
machinery.

-- 
anatoly t.

On Wed, Nov 7, 2012 at 1:04 PM, Marc-Andre Lemburg <
metatracker@psf.upfronthosting.co.za> wrote:

>
> Marc-Andre Lemburg added the comment:
>
> Here's an example of where it did not work:
>
> http://bugs.python.org/msg175052
>
> _______________________________________________________
> PSF Meta Tracker <metatracker@psf.upfronthosting.co.za>
> <http://psf.upfronthosting.co.za/roundup/meta/issue491>
> _______________________________________________________
> _______________________________________________
> Tracker-discuss mailing list
> Tracker-discuss@python.org
> http://mail.python.org/mailman/listinfo/tracker-discuss
>
msg2635 (view) Author: lemburg Date: 2012-11-07.10:50:24
On 07.11.2012 11:22, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka added the comment:
> 
> May be RoundUp can't remove the signature if it longer than the text before the signature?  Can you open a test issue and send 1-, 2-, 3-, ..., 20-lines messages with your long signature?

A test on http://bugs.python.org/issue16426 showed that
RoundUp only appears to remove sigs in case they have less
than 10 lines (e.g. this reply should have the sig removed).
msg2636 (view) Author: r.david.murray Date: 2012-11-07.12:40:46
Yes, 10 lines.  It happens in mailgw.py in the parseContent routine:

     elif signature.match(lines[0]) and 2 <= len(lines) <= 10:
        # lose any signature
        break

that would also be the routine to modify if one wanted to improve the algorithm for detecting quoted text so that it didn't delete doctest-like snippets.
msg2637 (view) Author: lemburg Date: 2012-11-07.16:07:38
On 07.11.2012 13:40, R David Murray wrote:
> 
> R David Murray added the comment:
> 
> Yes, 10 lines.  It happens in mailgw.py in the parseContent routine:
> 
>      elif signature.match(lines[0]) and 2 <= len(lines) <= 10:
>         # lose any signature
>         break
> 
> that would also be the routine to modify if one wanted to improve the algorithm for detecting quoted text so that it didn't delete doctest-like snippets.

Wouldn't it make sense to remove the <= 10 limit altogether ?

Apart from longer signatures, Forwarding emails inline will also
result in more than 10 lines being in the email after the "-- ".

Does anyone have contact to someone who could make such a change ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Nov 07 2012)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
msg2638 (view) Author: ezio.melotti Date: 2012-11-08.06:07:54
I reported this upstream: http://issues.roundup-tracker.org/issue2550780
If they agree, I'll fix it.

> for some email replies the sig is removed, for others,
> it's added to the tracker item (which is annoying).

The latter was already fixed on the main tracker, and I now fixed it on the meta-tracker as well.  The solution is adding the following lines to the [mailgw] section of config.ini:

# ignore html part of multipart/alternative
ignore_alternatives = yes

> A test on http://bugs.python.org/issue16426 

FWIW there's http://bugs.python.org/issue2771 that can be used for tests.
msg2639 (view) Author: lemburg Date: 2012-11-08.07:53:40
On 08.11.2012 07:07, Ezio Melotti wrote:
> 
> Ezio Melotti added the comment:
> 
> I reported this upstream: http://issues.roundup-tracker.org/issue2550780
> If they agree, I'll fix it.

Thanks, Ezio.

At least now I know how to prevent my sig from getting recorded
in the tracker ;-)
msg2659 (view) Author: lemburg Date: 2012-11-22.10:02:41
On 08.11.2012 08:53, Marc-Andre Lemburg wrote:
> 
> Marc-Andre Lemburg added the comment:
> 
> On 08.11.2012 07:07, Ezio Melotti wrote:
>>
>> Ezio Melotti added the comment:
>>
>> I reported this upstream: http://issues.roundup-tracker.org/issue2550780
>> If they agree, I'll fix it.
> 
> Thanks, Ezio.
> 
> At least now I know how to prevent my sig from getting recorded
> in the tracker ;-)

I think you have their approval:

http://issues.roundup-tracker.org/msg4670

Would be great to get this fix in, as it's really annoying to
always have to remember to truncate the sig when replying to
a tracker email.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com
History
Date User Action Args
2012-11-22 10:02:42lemburgsetmessages: + msg2659
2012-11-08 07:53:40lemburgsetmessages: + msg2639
2012-11-08 06:07:55ezio.melottisetassignedto: ezio.melotti
messages: + msg2638
nosy: + ezio.melotti
2012-11-07 16:07:38lemburgsetmessages: + msg2637
2012-11-07 12:40:46r.david.murraysetnosy: + r.david.murray
messages: + msg2636
2012-11-07 10:50:24lemburgsetmessages: + msg2635
2012-11-07 10:27:46techtoniksetfiles: + unnamed
nosy: + techtonik
messages: + msg2634
2012-11-07 10:23:54serhiy.storchakasetmessages: + msg2633
2012-11-07 10:22:10serhiy.storchakasetmessages: + msg2632
2012-11-07 10:04:49lemburgsetmessages: + msg2631
2012-11-07 10:00:01lemburgsetstatus: unread -> chatting
messages: + msg2630
2012-11-07 09:53:12serhiy.storchakacreate