From: Gerfried Fuchs Date: Wed, 17 Feb 2010 19:35:59 +0000 (+0100) Subject: Imported Upstream version 2.0 X-Git-Tag: upstream/2.0 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=01a45154014d1ecf1ee75e745ce1dbc5adb81c18;p=pkg%2Ft-prot.git Imported Upstream version 2.0 --- diff --git a/BUGS b/BUGS deleted file mode 100644 index 79c2eed..0000000 --- a/BUGS +++ /dev/null @@ -1,30 +0,0 @@ - KNOWN BUGS - ========== - -For now, please see the TODO file and the BUGS section of the manpage -for known bugs. - - - REPORTING BUGS - ============== - -To report bugs, please drop an email to . - -Please do not report a bug if - * you found it in the TODO file or the BUGS section of the man page. -We do know those and try to fix them as soon as possible. - * you have an old t-prot version. If you encounter a problem, first -see if there is a new t-prot version which fixes the issue. If you upgraded -to the latest version and it *still* occurs, a bug report is just great. - - -If you noticed a bug when processing a message and want to provide the -t-prot team with some useful info, please: - * if invoking t-prot by mutt's $display_filter facility, just set -display_filter to something like "tee ~/foobar|t-prot " -and include ~/foobar in the bug report -- this way we might reproduce -the bug *much* easier if you are using a different environment than we -do. - * provide information on what command line options you use t-prot -with, what perl version t-prot runs on your system, and what else might -be important to enable us reproducing the bug. diff --git a/ChangeLog b/ChangeLog index cd3d928..d991c1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,118 @@ +2005-05-27 10:00 Jochen Striepe + + * t-prot: Re-release as v2.0. No code change since v1.104. + +2005-05-13 00:06 Jochen Striepe + + * t-prot.1: Matthias Kilian suggested some cleanup for better + reading. Many thanks! + +2005-05-12 15:29 Jochen Striepe + + * t-prot.1: Include the BUGS file in the REPORTING BUGS section. + +2005-05-12 15:07 Jochen Striepe + + * t-prot.1: Fix typo. + +2005-05-12 15:07 Jochen Striepe + + * t-prot.1: Provide more information on how to submit bug reports. + +2005-05-12 03:32 Jochen Striepe + + * t-prot.1: Fix formatting. + +2005-05-12 03:29 Jochen Striepe + + * t-prot.1: Another typo. + +2005-05-12 03:27 Jochen Striepe + + * t-prot.1: Fix typo. + +2005-05-12 02:54 Jochen Striepe + + * t-prot: Release as v1.104. + +2005-05-11 12:14 Jochen Striepe + + * t-prot.1: Many clarifications and added details. Some formatting + cleanup. + +2005-05-11 09:21 Jochen Striepe + + * t-prot.1: Fix copyright date string. + +2005-05-11 09:17 Jochen Striepe + + * t-prot.1: LICENSE CHANGE! + + Alfie is completely right: Since the copyright notice essentially + is a BSD license, it is the Right Thing to simply switch to a BSD + license (slightly modified, as there is no binary code in t-prot). + +2005-05-11 01:22 Jochen Striepe + + * t-prot.1: LICENSE CHANGE! More clarifications. The meaning still + remains the same. + +2005-05-11 01:16 Jochen Striepe + + * t-prot.1: LICENSE CHANGE! The meaning remains the same, but the + wording should be a little clearer now. + +2005-05-11 01:14 Jochen Striepe + + * t-prot.1: Remove unnecessary text block. + +2005-05-11 01:09 Jochen Striepe + + * t-prot: The case-sensitivity of the Content-Type: header (vs. + Content-type:) seems not to be absolutely clear. RFC 1049 should be + obsoleted by RFCs 2045-2049 by now, but to be sure, we will accept + both strings. + +2005-05-11 01:04 Jochen Striepe + + * t-prot.1: RFC 822 is no longer important. RFC 2822 should + suffice. + +2005-05-11 00:59 Jochen Striepe + + * t-prot.1: Update date string. + +2005-05-11 00:58 Jochen Striepe + + * t-prot.1: Fix apostrophe. + +2005-05-10 13:09 Jochen Striepe + + * contrib/t-prot.sl: Update copyright. + +2005-05-09 14:54 Jochen Striepe + + * contrib/t-prot.sl: Make sure users get a hint if they look why + t-prot.sl does not work on their system (just as I did and wondered + what was wrong). + +2005-05-08 18:13 Jochen Striepe + + * t-prot: Release as v1.103. + +2005-05-08 18:13 Jochen Striepe + + * t-prot: More regex fixes. + +2005-05-08 17:50 Jochen Striepe + + * t-prot: Release as v1.102. + +2005-05-08 17:49 Jochen Striepe + + * t-prot: Many fixes to many regexes, fixing performance issues und + readability. Some were entirely replaced by faster means. + 2005-04-25 16:35 Jochen Striepe * t-prot: Release as v1.101. diff --git a/README b/README index fe1eac8..669b3a5 100644 --- a/README +++ b/README @@ -10,11 +10,12 @@ text at the top; obviously they think that quoted text must not be changed at all. This is quite annoying as it needlessly sends a lot of data even when it is not required. Some editing of messages is desired. - Please point these people to the page http://learn.to/edit_messages - - thank you! + Please point these people to the page + http://www.river.com/users/share/etiquette/edit.html + Thank you! 2. What does the script do? - It detects, and when demanded hides annoying parts in rfc822 messages: + It detects, and when demanded hides annoying parts in rfc2822 messages: TOFU, huge quoted blocks, signatures (especially when they are too long), excessive punktuation, blocks of empty lines, trailing spaces and tabs. For use inside of MTAs or MDAs it may exit with appropriate libc exit diff --git a/TODO b/TODO index ccb134e..9422bb3 100644 --- a/TODO +++ b/TODO @@ -2,9 +2,9 @@ ==================== For more issues and/or some details, please see the BUGS section of -the man page. +the man page. To report bugs, please first see the REPORTING BUGS +section of the man page. -To report bugs, please first see the BUGS file. To make suggestions or tell about features you miss, please drop an email to . diff --git a/contrib/README.patches b/contrib/README.patches index 7154cd9..8e65813 100644 --- a/contrib/README.patches +++ b/contrib/README.patches @@ -3,7 +3,7 @@ T-PROT PATCHES These t-prot patches still did not make it into vanilla t-prot, mostly for one of these reasons: They decrease performance, accuracy, flexibility, -reliability or are hard to maintain. +reliability or are a real burden to maintain. Still, there might be a chance to have them included into vanilla t-prot: You can send an email to the author and ask him to include this or that @@ -15,7 +15,7 @@ are some drawbacks with it. If you keep silent, the patch will be dropped at some time, because noone seems to need it. -Some patches are there because they bring *big* changes and need some more +Some patches exist because they bring *big* changes and need some more testing. So if you use these patches, please send an email to the author, and give some feedback on how well the patch works. It will be most helpful to decide if some specific feature makes it into vanilla t-prot. @@ -34,9 +34,9 @@ No problem, these patches add the locales needed for them to work smoothly. Please send a bug report if there are some great new features in the new mutt or gnupg which break anything inside t-prot. -Please note that this patches will most likely be applied by the t-prot +Please note that these patches will most likely be applied by the t-prot package maintainer(s) of your distribution (if the distribution makes -use of said mutt and gnupg versions), e.g. Debian Testing/Unstable. +use of said mutt and gnupg versions). OBSOLETE PATCHES diff --git a/contrib/t-prot-r1.225-mutt157.diff b/contrib/t-prot-r1.225-mutt157.diff deleted file mode 100644 index 20c5a3e..0000000 --- a/contrib/t-prot-r1.225-mutt157.diff +++ /dev/null @@ -1,97 +0,0 @@ ---- t-prot Thu Feb 24 23:31:55 2005 -+++ t-prot-M157 Thu Feb 24 23:41:45 2005 -@@ -32,7 +32,7 @@ - - $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned - $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted -- $mutt_pgpoutstart $mutt_pgpoutend -+ $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend - ); - - -@@ -69,6 +69,8 @@ - $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; - $mutt_pgpoutstart = '[-- PGP output follows (current time:'; - $mutt_pgpoutend = '[-- End of PGP output --]'; -+$mutt_ssloutstart = '[-- OpenSSL output follows'; -+$mutt_ssloutend = '[-- End of OpenSSL output --]'; - - # set the defaults to the C locale - $gpg_WARNING = 'WARNING: '; -@@ -329,7 +331,7 @@ - for (my $x=0; $x +% $Id: t-prot.sl,v 1.16 2005/05/10 13:09:06 jochen Exp $ +% Copyright (c) 2003-2005 Jochen Striepe % % This file is provided as an example implemention for articles to be % filtered through t-prot before displayed. They are still filtered if @@ -51,7 +51,7 @@ % these should be reasonable defaults (they work fine for me, SCNR): variable t_prot_params = "-aceklmtS --diff --bigq -L$HOME/.slrn/mlfooters -A$HOME/.slrn/adfooters"; -variable t_prot_tmpdir = "$HOME/tmp/slrn"; +variable t_prot_tmpdir = "$HOME/tmp/slrn"; % you better make sure it exists variable t_prot_qp = "perl -i -p -e '$p=1 if /^Content-Transfer-Encoding: quoted-printable/i; if ($p==1) { s/=([0-9a-f][0-9a-f])/chr(hex($1))/egi; s/=\n//eg; };'"; define t_prot () { diff --git a/t-prot b/t-prot index ee84667..1cd6e9d 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.236 2005/04/25 16:35:56 jochen Exp $ +# $Id: t-prot,v 1.243 2005/05/27 10:00:35 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Mixed qw(nextOption); -use constant VER => '1.101'; +use constant VER => '2.0'; use constant REV => ''; -use constant REL => q$Revision: 1.236 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.243 $=~m/(\d+(?:\.\d+)+)/; # MTA expecting mail on STDIN # (you might have to adjust this if using a different MTA) use constant SENDMAIL => '/usr/sbin/sendmail -oi'; @@ -252,7 +252,7 @@ sub decomb { ($$L[$x+1] !~ /^[\s^]/) && ($$L[$x] !~ /-$/) && ($$L[$x+1] !~ /^\Q[...]\E\s*$/) && - ($mua ne 'mutt' || $$L[$x+1] !~ /^(?:\e.+?\a)?\[-- .* --]/) && + ($mua ne 'mutt' || $$L[$x+1] !~ /^(?:\e[^\a]+\a)?\[-- /) && (length($$L[$x])+index($$L[$x+1], ' ')>$max || (index($$L[$x+1], ' ')<0 && length($$L[$x])+length($$L[$x+1])>$max)) && (length($$L[$x])+length($$L[$x+1])<$kmaxl) && @@ -311,11 +311,14 @@ sub pgp { my $ok = 0; while ($X<$Z) { - if ($$L[$X] =~ /^gpg:\s(?:\Q$gpg_WARNING\E|\Q$gpg_Warning\E|\Q$gpg_bad\E|\Q$gpg_Cantcheck\E|\Q$gpg_expired\E)/o) + if (index($$L[$X], "gpg: $gpg_WARNING")==0 || + index($$L[$X], "gpg: $gpg_Warning")==0 || + index($$L[$X], "gpg: $gpg_bad")==0 || + index($$L[$X], "gpg: $gpg_Cantcheck")==0 || + index($$L[$X], "gpg: $gpg_expired")==0 || + index($$L[$X], "gpg: $gpg_bug")==0) { return 0; } - if ($$L[$X] =~ /^gpg:\s\Q$gpg_bug/o) - { return 0; } - if ($$L[$X] =~ /^gpg:\s\Q$gpg_good/o) + if (index($$L[$X], "gpg: $gpg_good")==0) { $ok = 1; } $X++; } @@ -333,32 +336,34 @@ sub pgp { for (my $x=0; $x1 && - $$L[$i] =~ /^gpg:\s\Q$gpg_aka/o && $$L[$i] !~ /\Q$from/) + index($$L[$i], "gpg: $gpg_aka")==0 && + index($$L[$i], $from)<0) { splice(@$L, $i, 1); splice(@$V, $i, 1); $i--; } - elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpoutend\E)/o) + elsif ($$L[$i]=~/^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpoutend\E)/o) { if ($pgpmove || ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i))) @@ -374,7 +379,12 @@ sub pgp { } } elsif ($tmp && - $$L[$x]=~/^(?:\e.+?\a)?(?:\Q$mutt_pgpencrypted\E|\Q$mutt_pgpclearsigned\E|\Q$mutt_pgpsigned\E)/o) + $$L[$x] =~ /^ + (?:\e[^\a]+\a)? + (?:\Q$mutt_pgpencrypted\E | + \Q$mutt_pgpclearsigned\E| + \Q$mutt_pgpsigned\E) + /ox) { splice(@$L, $x+1, 0, @{$tmp[$tmp]}); for (my $i=$x; $i=scalar(@$lines)) { exit(EX_DATAERR); } - if ($bar =~ /^text\/plain/i) { + if ($bar =~ m!^text/plain!) { my $z; for ($z=1; $x+$z<@$lines; $z++) { if (index($$lines[$x+$z], '--'.$foo)==0) { @@ -529,7 +539,7 @@ sub process_msg { for ($x=0; $x. -.br -Copyright \(co 2001-2005 Jochen Striepe. +.SH COPYRIGHT +All of the documentation and software included in the t-prot releases +is copyrighted by Jochen Striepe. +.PP +Copyright \(co 2001-2005 Jochen Striepe. All rights reserved. +.PP +Redistribution and use, with or without modification, are permitted +provided that the following conditions are met: .PP -This is free software; you may use the source to whatever you like. -Just keep in mind to mention the original source of the script and the manpage -when you give it away. There is NO warranty; not even for MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. +.PP +2. All advertising materials mentioning features or use of this software +must display the following acknowledgement: +.PP + This product includes software developed by Jochen Striepe and others. +.PP +3. Neither the name of the author nor the names of any contributors may +be used to endorse or promote products derived from this software without +specific prior written permission. +.PP +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .SH IDEAS AND INSPIRATION Many good ideas, bug reports and support from (in alphabetical order) Bjoern Buerger, Bjoern Laessig, Christian Borss, Gerfried Fuchs, Martin Neitzel, Martin @@ -503,7 +542,7 @@ Many thanks to Gerhard H. Wrodnigg who uses a TOFU protection script in order to keep the responses to his cancel bot reasonably short. The entire inspiration for this hack came from the "TOFU protection" line of his script on many usenet postings. -.SH AVAILIBILITY +.SH AVAILABILITY You can get the latest version from .IR http://www.escape.de/users/tolot/mutt/ . .SH BUGS @@ -520,25 +559,50 @@ message to t-prot: The information where the PGP encrypted/signed data or even attachments begin and end is plainly embedded in the text, not really cleanly recognizeable for t-prot. The problem should be worked around by now, please send a bug report if it does not work for you. -.PP -There probably are many more bugs in this piece of software. Feel free to -fix them - it's -.BR perl , -so you have the sources. Ah, and while you're at it, please drop a note to -the author - thanks in advance! .SH "REPORTING BUGS" -Please send your bug report to . +Please do +.I not +report a bug if +.br + * you found it in the TODO file coming with the distribution. We do +know those and try to fix them as soon as possible. +.br + * you have an old t-prot version. If you encounter a problem, first +see if there is a new t-prot version which fixes the issue. If you +upgraded to the latest version and it still occurs, a bug report is +just great. +.PP +If you noticed a bug when processing a message and want to provide the +t-prot team with some useful info, please: +.br + * if invoking t-prot by mutt's +.I display_filter +facility, just set display_filter to something like +.IP +"tee ~/foobar | t-prot " +.PP +and include ~/foobar in the bug report -- this way we might reproduce +the bug much easier if you are using a different environment than we do. +.br + * provide information on what command line options you use t-prot +with, what perl version t-prot runs on your system, and what else might +be important to enable us reproducing the bug. +.PP +Send your bug report to +.IR . +Thank you. .SH TODO Fix bugs (see the .I BUGS section). Beside that, all main features should be implemented by now. +See the TODO file for more information. .SH "SEE ALSO" .BR mutt (1), .BR muttrc (5) and the part about "display_filter", .BR perl (1), .BR aliases (5), -RFCs 822, 2045, 2046, 2049, and 2822, +RFCs 2045-2049 and 2822, .I http://got.to/quote/ (German language), .I http://www.river.com/users/share/etiquette/edit.html