Mailinglist Archive: opensuse-commit (1097 mails)

< Previous Next >
commit t-prot for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Thu, 28 Jan 2010 17:36:53 +0100
  • Message-id: <20100128163653.A79B3202A5@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package t-prot for openSUSE:Factory
checked in at Thu Jan 28 17:36:53 CET 2010.



--------
--- t-prot/t-prot.changes 2007-10-18 13:29:31.000000000 +0200
+++ /mounts/work_src_done/STABLE/t-prot/t-prot.changes 2010-01-19
12:14:31.000000000 +0100
@@ -1,0 +2,27 @@
+Tue Jan 19 11:15:18 UTC 2010 - puzel@xxxxxxxxxx
+
+- update to 2.12
+ * Exit with exit status EX_OK when --max-lines
+ hits and -Mmutt is set (mutt is picky when a display_filter
+ fails). Provide a notification line in that case. Update man page.
+
+-------------------------------------------------------------------
+Tue Jan 5 15:42:52 UTC 2010 - puzel@xxxxxxxxxx
+
+- Update to 2.11
+ * contrib/filter_innd.pl: Command line default has changed, check
+ flags must be set now.
+ * Fix initialization and command line parsing for
+ --check (this should work as advertised now). Make the ratio check
+ code a little easier to read. Add the default value for the ratio
+ check to the man page.
+ * Do not check for message length in attachments (we
+ checked already for the entire message). Do exit with proper exit
+ code if message is longer than set in --max-lines (so scripts can
+ see if we gave up processing).
+ * Change check order and remove duplicated code for
+ --max-lines.
+ * Fix a typo, thanks to Michael Hunger. Tweak the MS-TOFU
+ pattern, thanks to Simon Ruderich.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
t-prot-2.5.tar.bz2

New:
----
t-prot-2.12.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ t-prot.spec ++++++
--- /var/tmp/diff_new_pack.K7nWRt/_old 2010-01-28 17:35:00.000000000 +0100
+++ /var/tmp/diff_new_pack.K7nWRt/_new 2010-01-28 17:35:00.000000000 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package t-prot (Version 2.5)
+# spec file for package t-prot (Version 2.12)
#
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -20,12 +20,12 @@
Name: t-prot
BuildRequires: perl-Getopt-Mixed perl-gettext
Url: http://www.escape.de/users/tolot/mutt/
-License: Any permissive
+License: PERMISSIVE-OSI-COMPLIANT
Group: Productivity/Networking/Email/Utilities
AutoReqProv: on
Requires: perl-Getopt-Mixed perl-gettext
-Version: 2.5
-Release: 63
+Version: 2.12
+Release: 1
Summary: A Display Filter for RFC822 Messages
Source: %{name}-%{version}.tar.bz2
Source1: muttrc.t-prot

++++++ t-prot-2.5.tar.bz2 -> t-prot-2.12.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/ChangeLog new/t-prot-2.12/ChangeLog
--- old/t-prot-2.5/ChangeLog 2007-09-19 13:36:27.000000000 +0200
+++ new/t-prot-2.12/ChangeLog 2010-01-08 12:35:32.000000000 +0100
@@ -1,3 +1,121 @@
+2010-01-08 11:10 Jochen Striepe
+
+ * t-prot: Release as v2.12.
+
+2010-01-08 11:08 Jochen Striepe
+
+ * t-prot, t-prot.1: Exit with exit status EX_OK when --max-lines
+ hits and -Mmutt is set (mutt is picky when a display_filter fails).
+ Provide a notification line in that case. Update man page. Many
+ thanks to Gerfried Fuchs, Martin F. Krafft and Tino Keitel for
+ reporting, providing a patch and testing.
+
+2010-01-05 12:05 Jochen Striepe
+
+ * t-prot: Release as v2.11.
+
+2010-01-05 12:01 Jochen Striepe
+
+ * contrib/filter_innd.pl: Command line default has changed, check
+ flags must be set now.
+
+2010-01-05 11:46 Jochen Striepe
+
+ * t-prot.1: Better explain ratio check value.
+
+2010-01-05 11:43 Jochen Striepe
+
+ * t-prot.1: Update copyright time stamp.
+
+2010-01-05 11:42 Jochen Striepe
+
+ * t-prot, t-prot.1: Fix initialization and command line parsing for
+ --check (this should work as advertised now). Make the ratio check
+ code a little easier to read. Add the default value for the ratio
+ check to the man page.
+
+2010-01-04 11:07 Jochen Striepe
+
+ * t-prot.1: Remove URLs to example scripts and configs. The files
+ are provided with the package.
+
+2009-12-30 21:34 Jochen Striepe
+
+ * t-prot, t-prot.1: Fix last commit, release as t-prot v2.10.
+ Update man page.
+
+2009-12-30 21:28 Jochen Striepe
+
+ * t-prot: Release as t-prot v2.9.
+
+2009-12-30 21:27 Jochen Striepe
+
+ * t-prot: Do not check for message length in attachments (we
+ checked already for the entire message). Do exit with proper exit
+ code if message is longer than set in --max-lines (so scripts can
+ see if we gave up processing).
+
+2009-12-30 09:07 Jochen Striepe
+
+ * t-prot.1: Fix speling.
+
+2009-12-25 17:40 Jochen Striepe
+
+ * t-prot.1: Fix time stamp.
+
+2009-12-20 21:38 Jochen Striepe
+
+ * t-prot.1: Fix rendering for anyone out there using UTF-8. Many
+ thanks (and a very merry Christmas) to Alfie.
+
+2009-12-19 22:18 Jochen Striepe
+
+ * t-prot: Release as v2.8.
+
+2009-12-18 21:53 Jochen Striepe
+
+ * t-prot, t-prot.1: Update documentation to reflect last change.
+ Avoid being tripped by endless (or non-existant) headers.
+
+2009-12-18 13:25 Jochen Striepe
+
+ * t-prot: Change check order and remove duplicated code for
+ --max-lines.
+
+2009-08-24 20:32 Jochen Striepe
+
+ * t-prot: Release as t-prot v2.7.
+
+2009-08-24 17:20 Jochen Striepe
+
+ * t-prot: Cosmetics.
+
+2009-08-24 17:17 Jochen Striepe
+
+ * t-prot: Cosmetics.
+
+2009-08-24 12:15 Jochen Striepe
+
+ * t-prot: Andreas Kneib had problems with some Microsoft Outlook
+ gargabe and submitted a one-liner. Thanks!
+
+2009-08-24 02:07 Jochen Striepe
+
+ * t-prot: Release as t-prot v2.6.
+
+2009-08-24 01:44 Jochen Striepe
+
+ * t-prot.1: Update dates.
+
+2009-08-24 01:43 Jochen Striepe
+
+ * t-prot.1: Fix a typo, thanks to Gerfried Fuchs.
+
+2009-08-24 01:42 Jochen Striepe
+
+ * t-prot: Fix a typo, thanks to Michael Hunger. Tweak the MS-TOFU
+ pattern, thanks to Simon Ruderich.
+
2007-09-19 11:32 Jochen Striepe

* t-prot, t-prot.1: Updated time stamps, released as v2.5.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/contrib/filter_innd.pl
new/t-prot-2.12/contrib/filter_innd.pl
--- old/t-prot-2.5/contrib/filter_innd.pl 2007-09-19 13:36:27.000000000
+0200
+++ new/t-prot-2.12/contrib/filter_innd.pl 2010-01-08 12:35:32.000000000
+0100
@@ -1,4 +1,4 @@
-# $Id: filter_innd.pl,v 1.5 2005/04/15 14:07:11 jochen Exp $
+# $Id: filter_innd.pl,v 1.6 2010/01/05 12:01:13 jochen Exp $
# Copyright (c) 2004-2005 Jochen Striepe <t-prot@xxxxxxxxxxxxxxx>
#
# This file is provided as an example how t-prot can be used for
@@ -51,7 +51,7 @@
print OUT $foo;
close OUT;

- open(IN, "/usr/bin/t-prot -m -t -p --body --check -i $f|")
+ open(IN, "/usr/bin/t-prot -m -t -p --body --check=ratio -i $f|")
|| goto FINISH;
$rval = <IN>;
close IN;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/contrib/README.patches
new/t-prot-2.12/contrib/README.patches
--- old/t-prot-2.5/contrib/README.patches 2007-09-19 13:36:27.000000000
+0200
+++ new/t-prot-2.12/contrib/README.patches 2010-01-08 12:35:32.000000000
+0100
@@ -22,8 +22,28 @@



-RECENT PATCHES
-==============
+PERMANENT PATCHES
+=================
+
+These patches are updated as need be, as several distributions (that
+is, their t-prot package maintainers) use them to adapt t-prot to the
+distribution's environment. They will _not_ get dropped just because
+nobody bugs me. :)
+
+Users: 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 Slang, mutt and gnupg versions).
+
+t-prot-*-gol.diff
+=================
+Getopt::Mixed is abandoned and marked deprecated by its author, and many
+distributions would like nothing better than to get rid of it. Using this
+patch, you can make t-prot use Getopt::Long (which comes bundled with
+standard perl).
+
+If you know how to deal with the serious performance impacts Getopt::Long
+brings along, please drop me an email. Thanks.
+

t-prot-*-mutt15*.diff and t-prot-*-gpg1*.diff
=============================================
@@ -39,9 +59,11 @@
Patch by Gregor Herrmann, making t-prot.sl run with Slang-2.


-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).
+
+RECENT PATCHES
+==============
+
+none



@@ -75,8 +97,8 @@
into vanilla t-prot. Thanks to everyone who sent bug reports or gave
feedback.

-t-prot-*-gol.diff
-=================
+t-prot-*-gol.diff (first version)
+=================================
This patch is no longer available.

The feedback to Debian Bug #193937 came only from two people: the Debian
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/contrib/t-prot-r1.271-gol.diff
new/t-prot-2.12/contrib/t-prot-r1.271-gol.diff
--- old/t-prot-2.5/contrib/t-prot-r1.271-gol.diff 1970-01-01
01:00:00.000000000 +0100
+++ new/t-prot-2.12/contrib/t-prot-r1.271-gol.diff 2010-01-08
12:35:32.000000000 +0100
@@ -0,0 +1,189 @@
+--- t-prot 2010-01-08 12:10:26.000000000 +0100
++++ t-prot-gol 2010-01-08 12:14:18.000000000 +0100
+@@ -4,7 +4,7 @@
+ require 5.006;
+ use strict;
+ use Fcntl qw(O_EXCL O_WRONLY O_CREAT);
+-use Getopt::Mixed qw(nextOption);
++use Getopt::Long qw(:config gnu_getopt no_ignore_case);
+ use constant VER => '2.12';
+ use constant REV => '';
+ use constant REL => q$Revision: 1.271 $=~m/(\d+(?:\.\d+)+)/;
+@@ -914,84 +914,83 @@
+ (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ my $ifile = '-'; # use STDIN if nothing specified
+
++# temp vals:
++my ($_t1, $_t2, $_t3, $_t4, $_t5, $_t6, $_t7, $_t8, $_t9, $_ta, $_tb) = undef;
++
+ # get command line params:
+-Getopt::Mixed::init('a A=s c d e h i=s k L=s l m M=s o=s P=s p:s r S:i'.
+- ' s t v w bigq:s body check:s debug>d diff ftr-ad ftr-ml groupwise'.
+- ' help>h kminl=i kmaxl=i kdiff=i lax-security locale=s max-lines=i'.
+- ' ms-smart mua>M pgp-short pgp-move pgp-move-vrf sigsmax:i spass'.
+- ' version>v');
+-while (my ($opt, $val, $pretty) = nextOption()) {
+- if ($opt eq 'a') { $ad = 1; }
+- elsif ($opt eq 'A') { $ads = $val; }
+- elsif ($opt eq 'bigq') {
+- if ($val !~ /^(?:(\d+)(?:,(\d+))?)?$/) { help(); }
+- $bigqn = $1?$1:30;
+- $bigqx = $2?$2:10;
+- if ($bigqn<=0 || $bigqx<=0 || $bigqn<=$bigqx) { help(); }
+- }
+- elsif ($opt eq 'body') { $nohdr = 1; $hdrs = 1; }
+- elsif ($opt eq 'c') { $cr = 1; }
+- elsif ($opt eq 'check') {
+- $check = 1;
+- while ($val && $val =~ /^([^,\s]+)(?:,(\S+))?$/) {
+- my $foo = $1;
+- $val = $2;
+-
+- if ($foo =~ /^ratio(?:=(0?\.\d+))?$/) {
+- $check_ratio = $1?$1:0.75;
+- }
+- }
+- }
+- elsif ($opt eq 'd') { $sysl = 1; }
+- elsif ($opt eq 'diff') { $diff = 1; }
+- elsif ($opt eq 'e') { $elli = 1; }
+- elsif ($opt eq 'ftr-ad') { $ftr_ad = 1; $ad = 1; }
+- elsif ($opt eq 'ftr-ml') { $ftr_ml = 1; $ml = 1; }
+- elsif ($opt eq 'groupwise') { $gw = 1; }
+- elsif ($opt eq 'i') { $ifile = $val; }
+- elsif ($opt eq 'k') { $kamm = 1; }
+- elsif ($opt eq 'kminl') { $kminl = $val; $kamm = 1; }
+- elsif ($opt eq 'kmaxl') { $kmaxl = $val; $kamm = 1; }
+- elsif ($opt eq 'kdiff') { $kdiff = $val; $kamm = 1; }
+- elsif ($opt eq 'L') { $footers = $val; }
+- elsif ($opt eq 'l') { $ml = 1; }
+- elsif ($opt eq 'lax-security') { $lax = 1; }
+- elsif ($opt eq 'locale') { $locale = $val; }
+- elsif ($opt eq 'm') { $ms = 1; }
+- elsif ($opt eq 'max-lines') { $maxlines = $val; }
+- elsif ($opt eq 'ms-smart') { $ms_smart = 1; $ms = 1; }
+- elsif ($opt eq 'M') {
+- $mua = lc($val);
++if (!Getopt::Long::GetOptions(
++ 'a' => \$ad,
++ 'A=s' => \$ads,
++ 'bigq:s' => \$_t1,
++ 'c' => \$cr,
++ 'check:s' => \$_t9,
++ 'debug|d' => \$sysl,
++ 'diff' => \$diff,
++ 'e' => \$elli,
++ 'ftr-ad' => \$ftr_ad,
++ 'ftr-ml' => \$ftr_ml,
++ 'groupwise' => \$gw,
++ 'help|h' => \$_t2,
++ 'i=s' => \$ifile,
++ 'k' => \$kamm,
++ 'kminl=i' => \$_t3,
++ 'kmaxl=i' => \$_t4,
++ 'kdiff=i' => \$_t5,
++ 'L=s' => \$footers,
++ 'l' => \$ml,
++ 'lax-security' => \$lax,
++ 'locale=s' => \$locale,
++ 'max-lines=i' => \$maxlines,
++ 'ms-smart' => \$ms_smart,
++ 'mua|M=s' => \$_t7,
++ 'm' => \$ms,
++ 'o=s' => \$ofile,
++ 'P=s' => \$boun,
++ 'p:s' => \$_t8,
++ 'pgp-short' => \$pgpshort,
++ 'pgp-move' => \$pgpmove,
++ 'pgp-move-vrf' => \$pgpmovevrf,
++ 'r' => \$hdrs,
++ 'S:i' => \$_t6,
++ 's' => \$sig,
++ 'sigsmax:i' => \$_ta,
++ 'spass' => \$spass,
++ 't' => \$trad,
++ 'version|v' => \$_tb,
++ 'w' => \$trsp
++ )) {
++ help();
++}
+
+- if ($mua eq 'mutt') {
+- # mutt still displays the message when ^C'ing pgp verification:
+- $SIG{'INT'} = 'sigint_handler';
+- }
++# clean up temp vals:
++if (defined $_t1) {
++ if ($_t1 !~ /^(?:(\d+)(?:,(\d+))?)?$/) { help(); }
++ $bigqn = $1?$1:30;
++ $bigqx = $2?$2:10;
++ if ($bigqn<=0 || $bigqx<=0 || $bigqn<=$bigqx) { help(); }
++}
++if (defined $_t2) { help(); }
++if (defined $_t3) { $kminl = $_t3; $kamm = 1; }
++if (defined $_t4) { $kmaxl = $_t4; $kamm = 1; }
++if (defined $_t5) { $kdiff = $_t5; $kamm = 1; }
++if (defined $_t6) { $lsig = $_t6 ? $_t6 : $maxsig; }
++if (defined $_t7) {
++ $mua = lc($_t7);
++ # mutt still displays the message when ^C'ing pgp verification:
++ if ($mua eq 'mutt') { $SIG{'INT'} = 'sigint_handler'; }
++}
++if (defined $_t8) { $mda = $_t8 ? $_t8 : '1'; }
++if (defined $_t9) {
++ $check = 1;
++ while ($_t9 && $_t9 =~ /^([^,\s]+)(?:,(\S+))?$/) {
++ my $foo = $1;
++ $_t9 = $2;
++ if ($foo =~ /^ratio(?:=(0?\.\d+))?$/) { $check_ratio = $1?$1:0.75; }
+ }
+- elsif ($opt eq 'o') { $ofile = $val; }
+- elsif ($opt eq 'P') { $boun = $val; }
+- elsif ($opt eq 'p') { $mda = $val ? $val : '1'; }
+- elsif ($opt eq 'pgp-short') { $pgpshort = 1; }
+- elsif ($opt eq 'pgp-move') { $pgpmove = 1; }
+- elsif ($opt eq 'pgp-move-vrf') { $pgpmovevrf = 1; }
+- elsif ($opt eq 'r') { $hdrs = 1; }
+- elsif ($opt eq 'S') { $lsig = $val ? $val : $maxsig; }
+- elsif ($opt eq 's') { $sig = 1; }
+- elsif ($opt eq 'sigsmax') { $sign = $val ? $val : undef; }
+- elsif ($opt eq 'spass') { $spass = 1; }
+- elsif ($opt eq 't') { $trad = 1; }
+- elsif ($opt eq 'v') { version(); }
+- elsif ($opt eq 'w') { $trsp = 1; }
+- else { help(); }
+ }
+-Getopt::Mixed::cleanup();
+-if (($ml && $footers eq '')|| # no -l without -L
+- ($ad && $ads eq '')|| # no -a without -A
+- ($nohdr && $pgpshort)|| # --body and --pgp-short are like oil and
water
+- ($ifile eq '')|| # no empty -i
+- ($ofile eq '')) # no empty -o
+-{ help(); }
+-
++if (defined $_ta) { $sign = $_ta ? $_ta : undef; }
++if (defined $_tb) { version(); }
++if ($ms_smart) { $ms = 1; }
+
+ if ($mua eq 'mutt') {
+ if (defined $locale && $locale ne '' && $locale ne 'C' && $locale ne
'POSIX') {
+@@ -1053,11 +1052,15 @@
+ m/^([^%]*)/;
+ }
+ }
+-
+-}
+-else {
+- if ($ms_smart || $pgpshort || $pgpmove || $pgpmovevrf) { help(); }
+ }
++elsif ($ms_smart || $pgpshort || $pgpmove || $pgpmovevrf) { help(); }
++
++if (($ml && $footers eq '')|| # no -l without -L
++ ($ad && $ads eq '')|| # no -a without -A
++ ($nohdr && $pgpshort)|| # --body and --pgp-short are like oil and
water
++ ($ifile eq '')|| # no empty -i
++ ($ofile eq '')) # no empty -o
++{ help(); }
+
+
+ # Read message:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/NEWS new/t-prot-2.12/NEWS
--- old/t-prot-2.5/NEWS 1970-01-01 01:00:00.000000000 +0100
+++ new/t-prot-2.12/NEWS 2010-01-08 12:35:32.000000000 +0100
@@ -0,0 +1,25 @@
+T-PROT AND SUPPORT FOR GETOPT::LONG
+===================================
+
+Most distributions (it seems to me) are quite eager to abandon Getopt::Mixed,
+having Getopt::Long in the official Perl package, which does everything the
+former module did. Getopt::Mixed is unmaintained and marked deprecated by
+its author, so why keep it?
+
+The answer is simple: because it's much faster (GNU time(1) tells me 28%
+faster for running my complete t-prot release test suite consisting of
+real-life emails) than anything I could get out of Getopt::Long. Plus,
+from my point of view, there are no problems having a package installed
+that is well-tested and just works fine (you don't need updates and more
+new shiny features if the software just does what you want it to do).
+
+So we have the choice between easy maintainance and better performance.
+
+
+For the time being, I made my choice and keep sticking to Getopt::Mixed as
+long as it works as-is with current stable perl versions. That does not mean
+I don't see the merits of a well-maintained standard module, which is already
+available on any perl system out there. Thus, a patch is provided to allow
+easy migration to Getopt::Long for anyone who likes this better. I hope
+this solution is fine for everyone.
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/t-prot new/t-prot-2.12/t-prot
--- old/t-prot-2.5/t-prot 2007-09-19 13:36:27.000000000 +0200
+++ new/t-prot-2.12/t-prot 2010-01-08 12:35:32.000000000 +0100
@@ -1,13 +1,13 @@
#!/usr/bin/perl -w
-# $Id: t-prot,v 1.255 2007/09/19 11:32:58 jochen Exp $
+# $Id: t-prot,v 1.271 2010/01/08 11:10:26 jochen Exp $

require 5.006;
use strict;
use Fcntl qw(O_EXCL O_WRONLY O_CREAT);
use Getopt::Mixed qw(nextOption);
-use constant VER => '2.5';
+use constant VER => '2.12';
use constant REV => '';
-use constant REL => q$Revision: 1.255 $=~m/(\d+(?:\.\d+)+)/;
+use constant REL => q$Revision: 1.271 $=~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';
@@ -54,7 +54,7 @@
$ftr_ml = undef; # too hard on performance to be default
$ofile = '-'; # use STDOUT if nothing is specified
$spass_prefix = 'SPAM: ';
-$check_ratio = .75; # 3/4 tofu is enough not to accept the message
+$check_ratio = 0; # off by default
$msg_quote = "Blocked by $0: This message has been rejected because of a
full quote. Please see http://learn.to/quote/ and
http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n";
$msg_ratio = "Blocked by $0: This message has been rejected because of
excessive quoting. Please see http://learn.to/quote/ and
http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n";
# end of user adjusted vals
@@ -108,7 +108,7 @@
--kminl=n min. line length for wrapped line; requires -k
--kmaxl=n max. line length for wrapped line; requires -k
--kdiff=n max. length difference between wrapped lines; req. -k
- -L=DIRECTORY mailling list footer directory, treat mailing list
+ -L=DIRECTORY mailing list footer directory, treat mailing list
footers as signature
-l delete mailing list footer; requires -L
--lax-security use unsafe writing method; USE ON YOUR OWN RISK!
@@ -178,12 +178,12 @@
for (my $z=0; $z<=$#l; $z++) { chomp($l[$z]); }

if (defined $V) {
- WIPE: for (my $z=scalar(@$L)-scalar(@l); $z>=0; $z--)
- {
+ WIPE: for (my $z=scalar(@$L)-scalar(@l); $z>=0; $z--) {
if (scalar(@l)+$z<=scalar(@$L)) {
my $y = 0;
for(my $x=1; $x<=scalar(@l); $x++) {
- if (index($$L[scalar(@$L)-$x-$z],
$l[scalar(@l)-$x])!=0) {
+ if (index($$L[scalar(@$L)-$x-$z],
+ $l[scalar(@l)-$x])!=0) {
$y = 1;
}
}
@@ -255,11 +255,12 @@
(index($$L[$x+1], $indent)!=0) &&
($$L[$x+1] !~ /^$/) &&
($$L[$x+1] !~ /^[\s^]/) &&
- ($$L[$x] !~ /-$/) &&
+ ($$L[$x] !~ /-$/) &&
($$L[$x+1] !~ /^\Q[...]\E\s*$/) &&
($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)) &&
+ (index($$L[$x+1], ' ')<0 &&
+ length($$L[$x])+length($$L[$x+1])>$max)) &&
(length($$L[$x])+length($$L[$x+1])<$kmaxl) &&
(length($$L[$x])+length($$L[$x+1])>$kminl) &&
(length($$L[$x])-length($$L[$x+1])>$kdiff) &&
@@ -441,23 +442,13 @@
my (@ads, @hdr, @bo1, @bo2, @ftr, @sig, @vrb, @att) =
((), (), (), (), (), (), (), (), ());

- # First, remove and store lines we might need later...
+ # Remove and store lines we might need later...
# Remove headers:
if (!$nohdr) {
for ($x=0; $x<$#$lines; $x++) { if (@$lines[$x] =~ /^$/) { last; }; }
-
- # check body length and stop processing silently if msg is too long:
- if ((defined $maxlines) && (@$lines-$x > $maxlines)) {
- return;
- }
-
@hdr = @$lines[0..$x];
splice(@$lines, 0, $x+1);
}
- elsif ((defined $maxlines) && (@$lines > $maxlines)) {
- # check body length and stop processing silently if msg is too long:
- return;
- }
# remember the original body lines count
my $linecount = scalar(@$lines);

@@ -558,9 +549,8 @@
if (index($$lines[$x], $indent)==0) { $y++; }
}
}
- $y = $y/$z;

- if ($y>=$check_ratio) {
+ if ($y/$z>=$check_ratio) {
print $msg_ratio;
exit EX_UNAVAILABLE;
}
@@ -702,6 +692,7 @@
my @tofu = ('Original Message',
'Original-Nachricht',
'Urspr�ngliche Nachricht',
+ 'Ursprüngliche Nachricht',
'Ursprungliche Nachricht',
'Mensagem original',
'Ursprungligt meddelande',
@@ -715,7 +706,7 @@
DONE: for ($x=0; $x<scalar(@$lines); $x++) {
if (!$vrb[$x]) {
foreach my $tmp (@tofu) {
- if (($ms && $$lines[$x] =~ /^-+\s?$tmp\s?-+/) ||
+ if (($ms && $$lines[$x] =~ /^\s?-+\s?$tmp\s?-+/) ||
($gw &&
($$lines[$x] =~ /^>>>[^\<]+<[^\>]+>
\d\d?\/\d\d?\/\d\d? \d\d?:\d\d [AP]M >>>/ ||
$$lines[$x] =~ /^>>> On [A-Z][a-z][a-z]?,
[A-Z][a-z][a-z]? \d\d?, \d\d\d\d at [ \d]\d:\d\d [AP]M, in message/))) {
@@ -942,11 +933,12 @@
elsif ($opt eq 'c') { $cr = 1; }
elsif ($opt eq 'check') {
$check = 1;
- while ($val && $val =~ s/^([^,\s]+)(?:,(\S+))?$/$2/) {
+ while ($val && $val =~ /^([^,\s]+)(?:,(\S+))?$/) {
my $foo = $1;
+ $val = $2;

- if ($foo =~ /^ratio=(0?\.\d+)$/) {
- $check_ratio = $1?$1:1;
+ if ($foo =~ /^ratio(?:=(0?\.\d+))?$/) {
+ $check_ratio = $1?$1:0.75;
}
}
}
@@ -1074,6 +1066,25 @@
my @message = <IN>;
close IN;

+# First, check msg length and stop processing if msg is too long:
+if ((defined $maxlines) && (@message > $maxlines)) {
+ if ($ofile ne 'NONE') {
+ if ($mua eq 'mutt') {
+ my $x = 0;
+ if (!$nohdr) {
+ do { $x++; } while ($x<$#message && $message[$x]!~/^$/);
+ $x++;
+ }
+ splice(@message, $x, 0,
+ ("[---=| Processing by $0 skipped: message too long
|=---]\n\n"));
+ }
+
+ write_msg(($mda?'|'.SENDMAIL." $mda":">$ofile"), \@message);
+ }
+ if ($mua eq 'mutt') { exit(EX_OK); }
+ exit(EX_DATAERR);
+}
+
# this should be self-explanatory:
process_msg(\@message);

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/t-prot-2.5/t-prot.1 new/t-prot-2.12/t-prot.1
--- old/t-prot-2.5/t-prot.1 2007-09-19 13:36:27.000000000 +0200
+++ new/t-prot-2.12/t-prot.1 2010-01-08 12:35:32.000000000 +0100
@@ -1,10 +1,10 @@
-.\" $Id: t-prot.1,v 1.132 2007/09/19 11:32:59 jochen Exp $
+.\" $Id: t-prot.1,v 1.144 2010/01/08 11:08:50 jochen Exp $
.\"
-.TH T-PROT "1" "September 2007" "T-PROT"
+.TH T-PROT "1" "January 2010" "T-PROT"
.SH NAME
t-prot \- TOFU Protection - Display Filter for RFC 2822 messages
.SH SYNOPSIS
-.BI "t-prot [" OPTIONS "]..."
+.BI "t\-prot [" OPTIONS "]..."
.SH DESCRIPTION
.PP
This program is a filter to improve the readability of
@@ -21,20 +21,18 @@
is the reason for not using standard CPAN modules for handling
messages).
.PP
-For easy usage, you can download a file to be included in your ~/.muttrc:
-.I http://www.escape.de/users/tolot/mutt/t-prot/muttrc.t-prot
-.br
-And here is an example S-Lang macro to use t-prot from within slrn:
-.I http://www.escape.de/users/tolot/mutt/t-prot/t-prot.sl
+For easy usage, you can include the file muttrc.t\-prot in your
+~/.muttrc. Also coming with the t-prot package is the example S-Lang
+macro t\-prot.sl for using t-prot from within slrn.
.SH OPTIONS
.TP
.BR "\-A" =DIRECTORY
"ad footer directory":
Defines the directory which contains the advertisement list footers (one
footer per file) which are to be tested when removing them with options
-.B -a
+.B \-a
or
-.BR --ftr-ad .
+.BR \-\-ftr\-ad .
.br
This option is also needed if you do not want signature lengths to be
counted wrong or fullquotes get undetected when an ad footer is
@@ -53,12 +51,12 @@
(which is mandatory for this option). The comparison is done by perl's
.B index()
function (please try
-.I perldoc -f index
+.I perldoc \-f index
for details).
.sp
.IR NOTE :
This option is not needed if
-.B --ftr-ad
+.B \-\-ftr\-ad
is specified.
.TP
.BR "\-\-bigq" [=n[,x]]
@@ -71,7 +69,7 @@
lines.
.IP
.IR NOTE :
-This does not work with --pgp-short, and multipart messages will not
+This does not work with \-\-pgp\-short, and multipart messages will not
be detected due to missing headers.
.TP
.B "\-c"
@@ -89,7 +87,8 @@
.IR ratio [=n]
.br
If the quoting ratio is n or more, the message is rejected. Must be
-between 0 and 1, or else it is entirely disabled.
+between 0 and 1, or else it is entirely disabled. Default is 0.75
+(i.e., three quarters are quoted).
.TP
.B "\-d, \-\-debug"
"debug":
@@ -137,7 +136,7 @@
be helpful with broken list servers, or even if your email provider munges
the bodies of your messages.
.br
-Works similar to --ftr-ad, just that it is intended for mailing list footers.
+Works similar to \-\-ftr\-ad, just that it is intended for mailing list
footers.
.sp
.IR NOTE :
This requires a directory with footer files to be given with option
@@ -153,7 +152,7 @@
.TP
.BR "\-i" =FILE
"input file":
-Defines a file for input; the default input is from '-' i.e. STDIN.
+Defines a file for input; the default input is from '\-' i.e. STDIN.
.TP
.B "\-k"
"anti Kammquote":
@@ -287,7 +286,7 @@
Hides TOFU as given by some Microsoft mailers. (You all surely know these
fullquotes beginning with
.br
-"----- Original Message -----"
+"\-\-\-\-\- Original Message \-\-\-\-\-"
.br
and some header lines...)
.TP
@@ -306,8 +305,9 @@
.BR "\-m" .
.TP
.BR "\-\-max\-lines" =x
-Maximum number of lines a message body may count. If the body is longer
-than x lines, the message will not be processed but printed unmodified.
+Maximum number of lines a message may count (with headers). If the message
+is longer than x lines, the message will not be processed but printed
+unmodified. Exit status will be EX_DATAERR except when called with -Mmutt.
.TP
.BR "\-o" =FILE
"output file":
@@ -332,7 +332,7 @@
put this line into your alias file and invoke
.BR newaliases :
.sp
-notofu: |"/usr/local/bin/t-prot -mt -p=user@mydomain"
+notofu: |"/usr/local/bin/t\-prot \-mt \-p=user@mydomain"
.sp
This will bounce messages for <notofu@domainname> if any TOFU is detected
inside the message, and deliver it to <user@mydomain> otherwise.
@@ -387,7 +387,7 @@
conformance.)
.sp
.IR NOTE :
-The line containing "-- " ist not counted when testing for an overlong
+The line containing "\-\- " ist not counted when testing for an overlong
signature, but it is included when displaying how many lines were deleted.
.TP
.B "\-s"
@@ -439,7 +439,7 @@
and
.I LANG
are read and respected when interpreting output by mutt or gnupg
-(unless they are overruled by the --locale option). T-prot's own
+(unless they are overruled by the \-\-locale option). T-prot's own
output is English regardless of any locale setting.
.SH EXIT STATUS
On program exit, t-prot uses exit codes from
@@ -483,7 +483,7 @@
There are several ways to fine-tune t-prot's performance:
.PP
Some command line options are quite grave a performance hit -- do not
-use -k and especially --ms-smart if you are content without them.
+use \-k and especially \-\-ms\-smart if you are content without them.
.PP
Checking for special footers is very costly as well. Put as few footer
files as absolutely needed in any footer directory.
@@ -513,7 +513,7 @@
.PP
.TP
.IR Q :
-I use the options -l and -L to supress mailing list footers when
+I use the options \-l and \-L to supress mailing list footers when
displaying messages in
.BR mutt (1).
This does work sometimes, but sometimes it does not: the footer is not
@@ -524,7 +524,7 @@
This might occur if the message is badly encoded, so mutt cannot resolve
all encoded characters, e.g. if you have an encoded message on a mailing
list, and majordomo appends a mailing list footer in a different encoding
-(or even plain us-ascii). "-- " simply does not match "--=20".
+(or even plain us-ascii). "\-\- " simply does not match "\-\-=20".
.br
Another problem are non-us-ascii characters. Just avoid them, and
everything should work fine.
@@ -544,18 +544,18 @@
.sp
#v+
.br
-This line is protected from being filtered by t-prot !!!!!!!
+This line is protected from being filtered by t\-prot !!!!!!!
.br
-#v-
+#v\-
.br
Text coming now is not.
.SH AUTHOR
-Written by Jochen Striepe <t-prot@xxxxxxxxxxxxxxx>.
+Written by Jochen Striepe <t\-prot@xxxxxxxxxxxxxxx>.
.SH COPYRIGHT
All of the documentation and software included in the t-prot releases
-is copyrighted by Jochen Striepe (except when explicitely stated otherwise).
+is copyrighted by Jochen Striepe (except when explicitly stated otherwise).
.PP
-Copyright \(co 2001-2007 Jochen Striepe. All rights reserved.

+Copyright \(co 2001-2010 Jochen Striepe. All rights reserved.

.PP
Redistribution and use, with or without modification, are permitted
provided that the following conditions are met:
@@ -599,7 +599,7 @@
There is a problem when mutt gives a PGP verified or even a multipart
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
+really cleanly recognizable for t-prot. The problem should be worked
around by now, please send a bug report if it does not work for you.
.SH "REPORTING BUGS"
Please note that t-prot development happens on
@@ -629,7 +629,7 @@
.I display_filter
facility, just set display_filter to something like
.IP
-"tee ~/foobar | t-prot <your options>"
+"tee ~/foobar | t\-prot <your options>"
.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.
@@ -639,7 +639,7 @@
be important to enable us reproducing the bug.
.PP
Send your bug report to
-.IR <t-prot-bugs@xxxxxxxxxxxxxxx> .
+.IR <t\-prot\-bugs@xxxxxxxxxxxxxxx> .
Thank you.
.SH TODO
Fix bugs (see the


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages