Roundup Tracker - Issues

Issue 2550902

classification
Handle incoming emails with very long lines by automatic wrapping
Type: rfe Severity: major
Components: Web interface, Mail interface Versions: 1.5, 1.4
process
Status: new
:
: pefu : ThomasAH, ber, jaraco, pefu, rouilj
Priority: :

Created on 2016-02-25 10:34 by pefu, last changed 2016-07-09 22:04 by rouilj.

Messages
msg5470 Author: [hidden] (pefu) Date: 2016-02-25 10:34
Copy of issue 2550793
Bernhard wrote there: "Can you open a new issue,".

I hope using copying the related one issue2550793 
was the right step to do.

In msg5465 I outlined, what I've in mind.  I will try to
prepare a patch.  But this will take me some time.  If someone knows
about license compatible Python implementation of Linux coreutils
program called ``fmt`` any hints are most welcome.

Best regards, Peter
msg5472 Author: [hidden] (ThomasAH) Date: 2016-02-25 11:02
Please do not forget the other side:
Sometimes it is important to add content that is not wrapped or
otherwise disturbed. Until now I can at least use the email interface
for this.
One example: SHA256 fingerprints with colons are 95 chars long:
24:D1:12:E1:A0:54:09:88:F1:03:E5:53:EF:00:3D:72:F6:82:E8:0F:25:EA:F0:BD:41:81:4C:29:F1:DD:8B:B1
and since I do not want to compare such long hashes myself, I just feed
them to "grep", which does not get easier if I have to reconstruct the
original line.

If you need more wrapping in the web interface, maybe CSS
word-wrap: break-word;
would help, which would add breaks even within what the browser thinks
to be a single word.
But this would survive e.g. copy&paste.
msg5473 Author: [hidden] (pefu) Date: 2016-02-25 13:08
Thomas Arendsen Hein added the comment:
> Please do not forget the other side:
> Sometimes it is important to add content that is not wrapped or
> otherwise disturbed. Until now I can at least use the email interface
> for this.
> One example: SHA256 fingerprints with colons are 95 chars long:
>
24:D1:12:E1:A0:54:09:88:F1:03:E5:53:EF:00:3D:72:F6:82:E8:0F:25:EA:F0:BD:41:81:4C:29:F1:DD:8B:B1
...
Yes! I understand your point.

Your email was, btw, not in ``format=flowed``.  The header
line of it was::

   Content-Type: text/plain; charset="utf-8"

Since the parameter ``format`` is missing the email defaults to
``format=fixed`` according to RFC3676 (section 4 third paragraph).

Only if the header contains the parameter format=flowed
reformating should happen.  For example::

   Content-Type: text/plain; charset="utf-8"; format=flowed

And even than long lines should only be wrapped where they
contain white space.  And this behaviuor should become an
option in the mailgw section of ``config.ini``.

Regards, Peter
P.S.: I can't edit my Details in this tracker: no permission
--
Peter Funk, home: ✉Oldenburger Str.86, D-27777 Ganderkesee
mobile:+49-179-640-8878 phone:+49-421-20419-0 <http://www.artcom-gmbh.de/>
office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany
msg5474 Author: [hidden] (ThomasAH) Date: 2016-02-25 15:01
* Peter Funk <issues@roundup-tracker.org> [20160225 14:08]:
> Your email was, btw, not in ``format=flowed``.  The header
> line of it was::
> 
>    Content-Type: text/plain; charset="utf-8"
> 
> Since the parameter ``format`` is missing the email defaults to
> ``format=fixed`` according to RFC3676 (section 4 third paragraph).

I used the web interface for my previous entry ... and I was
surprised that the hash was still in one line :)

> Only if the header contains the parameter format=flowed
> reformating should happen.  For example::
> 
>    Content-Type: text/plain; charset="utf-8"; format=flowed
> 
> And even than long lines should only be wrapped where they
> contain white space.  And this behaviuor should become an
> option in the mailgw section of ``config.ini``.

Ah, right ... if this is implemented correctly, then it is a good
idea.

> P.S.: I can't edit my Details in this tracker: no permission

With "edit my Details" you mean that pressing "Submit Changes" on
the "Your Details" page yields this error? Might be worth a separate
issue here.
msg5804 Author: [hidden] (rouilj) Date: 2016-07-09 22:04
https://docs.python.org/2/library/textwrap.html

You will probably need to use the TextWrapper class to get the
degree of control you want.

Also might I suggest this be made an auditor if possible?
History
Date User Action Args
2016-07-09 22:04:27rouiljsettype: behavior -> rfe
messages: + msg5804
nosy: + rouilj
2016-03-04 09:22:26pefusetassignee: pefu
2016-02-25 15:01:22ThomasAHsetmessages: + msg5474
2016-02-25 13:08:23pefusetmessages: + msg5473
2016-02-25 11:02:51ThomasAHsetmessages: + msg5472
2016-02-25 10:34:12pefucreate