From 1fad38b45847876c7e396a986aed602b167fb34d Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Wed, 17 Feb 2010 20:55:02 +0100 Subject: [PATCH] Imported Upstream version 2.10 --- ChangeLog | 24 +++++++++++++++++++ contrib/README.patches | 21 ++++++++++++---- ...r1.264-gol.diff => t-prot-r1.267-gol.diff} | 12 +++++----- t-prot | 19 ++++++++------- t-prot.1 | 8 +++---- 5 files changed, 61 insertions(+), 23 deletions(-) rename contrib/{t-prot-r1.264-gol.diff => t-prot-r1.267-gol.diff} (96%) diff --git a/ChangeLog b/ChangeLog index 2ae8d38..636a147 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,27 @@ +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 diff --git a/contrib/README.patches b/contrib/README.patches index f9791d2..59c519a 100644 --- a/contrib/README.patches +++ b/contrib/README.patches @@ -22,8 +22,17 @@ to decide if some specific feature makes it into vanilla t-prot. -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 ================= @@ -50,9 +59,11 @@ t-prot.sl-slang2.diff 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 diff --git a/contrib/t-prot-r1.264-gol.diff b/contrib/t-prot-r1.267-gol.diff similarity index 96% rename from contrib/t-prot-r1.264-gol.diff rename to contrib/t-prot-r1.267-gol.diff index a3a0e74..467ddf9 100644 --- a/contrib/t-prot-r1.264-gol.diff +++ b/contrib/t-prot-r1.267-gol.diff @@ -1,15 +1,15 @@ ---- t-prot 2009-12-19 23:22:08.000000000 +0100 -+++ t-prot-gol 2009-12-19 23:22:13.000000000 +0100 +--- t-prot 2009-12-30 22:34:16.000000000 +0100 ++++ t-prot-gol 2009-12-30 22:35:36.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.8'; + use constant VER => '2.10'; use constant REV => ''; - use constant REL => q$Revision: 1.264 $=~m/(\d+(?:\.\d+)+)/; -@@ -920,83 +920,82 @@ + use constant REL => q$Revision: 1.267 $=~m/(\d+(?:\.\d+)+)/; +@@ -915,83 +915,82 @@ (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 @@ -165,7 +165,7 @@ if ($mua eq 'mutt') { if (defined $locale && $locale ne '' && $locale ne 'C' && $locale ne 'POSIX') { -@@ -1058,11 +1057,15 @@ +@@ -1053,11 +1052,15 @@ m/^([^%]*)/; } } diff --git a/t-prot b/t-prot index c4b06b2..e2b36cf 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.264 2009/12/19 22:18:47 jochen Exp $ +# $Id: t-prot,v 1.267 2009/12/30 21:34:16 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.8'; +use constant VER => '2.10'; use constant REV => ''; -use constant REL => q$Revision: 1.264 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.267 $=~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'; @@ -442,11 +442,6 @@ sub process_msg { my (@ads, @hdr, @bo1, @bo2, @ftr, @sig, @vrb, @att) = ((), (), (), (), (), (), (), (), ()); - # First, check msg length and stop processing if msg is too long: - if ((defined $maxlines) && (@$lines > $maxlines)) { - return; - } - # Remove and store lines we might need later... # Remove headers: if (!$nohdr) { @@ -1071,6 +1066,14 @@ if (!open(IN, $ifile)) my @message = ; close IN; +# First, check msg length and stop processing if msg is too long: +if ((defined $maxlines) && (@message > $maxlines)) { + if ($ofile ne 'NONE') { + write_msg(($mda?'|'.SENDMAIL." $mda":">$ofile"), \@message); + } + exit(EX_DATAERR); +} + # this should be self-explanatory: process_msg(\@message); diff --git a/t-prot.1 b/t-prot.1 index bc920fa..c905533 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,6 +1,6 @@ -.\" $Id: t-prot.1,v 1.136 2009/12/20 21:38:41 jochen Exp $ +.\" $Id: t-prot.1,v 1.139 2009/12/30 21:34:16 jochen Exp $ .\" -.TH T-PROT "1" "August 2009" "T-PROT" +.TH T-PROT "1" "December 2009" "T-PROT" .SH NAME t-prot \- TOFU Protection - Display Filter for RFC 2822 messages .SH SYNOPSIS @@ -308,7 +308,7 @@ Requires .BR "\-\-max\-lines" =x 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. +unmodified. Exit status will be EX_DATAERR. .TP .BR "\-o" =FILE "output file": @@ -600,7 +600,7 @@ You can get the latest version from 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 -- 2.39.2