From d6fc6da68020f73af04713140c0d760223131515 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 18 May 2010 21:26:27 +0200 Subject: [PATCH 01/16] Imported Upstream version 2.98 --- ChangeLog | 26 +++++++++++++++++++++ t-prot | 70 +++++++++++++++++++++++++++---------------------------- t-prot.1 | 24 +++++++++++-------- 3 files changed, 75 insertions(+), 45 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23d7466..402054b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,29 @@ +2010-04-09 06:47 Jochen Striepe + + * t-prot: Release as v2.98. + +2010-04-09 06:45 Jochen Striepe + + * t-prot.1: Clarify --lax-security description. + +2010-04-09 06:36 Jochen Striepe + + * t-prot: Use descriptive temp variable names when parsing command + line. + +2010-03-06 12:26 Jochen Striepe + + * t-prot.1: Mention configuration files for Heirloom mailx and + metamail. Avoid false impression with --lax-security. + +2010-03-06 10:51 Jochen Striepe + + * t-prot.1: Another Typo. + +2010-03-06 09:19 Jochen Striepe + + * t-prot.1: Fix spelling error. Thanks to Gerfried Fuchs! + 2010-03-06 01:32 Jochen Striepe * t-prot: Release as v2.97. diff --git a/t-prot b/t-prot index 1d51b3b..fb3029f 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.298 2010/03/06 01:32:50 jochen Exp $ +# $Id: t-prot,v 1.300 2010/04/09 06:47:11 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Long qw(:config gnu_getopt no_ignore_case); -use constant VER => '2.97'; +use constant VER => '2.98'; use constant REV => ''; -use constant REL => q$Revision: 1.298 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.300 $=~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'; @@ -999,87 +999,87 @@ my $locale = $ENV{'LC_ALL'}?$ENV{'LC_ALL'}: my $ifile = '-'; # use STDIN if nothing specified # temp vals: -my ($_t1, $_t2, $_t3, $_t4, $_t5, $_t6, $_t7, $_t8, $_t9, $_ta, $_tb, $_tc, - $_td) = undef; +my ($_t_bigq, $_t_help, $_t_kminl, $_t_kmaxl, $_t_kdiff, $_t_maxsig, $_t_mua, + $_t_redir, $_t_check, $_t_sigsmax, $_t_ver, $_t_nohdr, $_t_cr) = undef; # get command line params: if (!Getopt::Long::GetOptions( 'a' => \$ad, 'A=s' => \$ads, - 'bigq:s' => \$_t1, - 'body' => \$_tc, - 'c:i' => \$_td, - 'check:s' => \$_t9, + 'bigq:s' => \$_t_bigq, + 'body' => \$_t_nohdr, + 'c:i' => \$_t_cr, + 'check:s' => \$_t_check, 'debug|d' => \$sysl, 'diff' => \$diff, 'e' => \$elli, 'ftr-ad' => \$ftr_ad, 'ftr-ml' => \$ftr_ml, 'groupwise' => \$gw, - 'help|h' => \$_t2, + 'help|h' => \$_t_help, 'i=s' => \$ifile, 'k' => \$kamm, - 'kminl=i' => \$_t3, - 'kmaxl=i' => \$_t4, - 'kdiff=i' => \$_t5, + 'kminl=i' => \$_t_kminl, + 'kmaxl=i' => \$_t_kmaxl, + 'kdiff=i' => \$_t_kdiff, 'L=s' => \$footers, 'l' => \$ml, 'lax-security' => \$lax, 'locale=s' => \$locale, 'max-lines:i' => \$maxlines, 'ms-smart' => \$ms_smart, - 'mua|M=s' => \$_t7, + 'mua|M=s' => \$_t_mua, 'm' => \$ms, 'o=s' => \$ofile, 'P=s' => \$boun, - 'p:s' => \$_t8, + 'p:s' => \$_t_redir, 'pgp-short' => \$pgpshort, 'pgp-move' => \$pgpmove, 'pgp-move-vrf' => \$pgpmovevrf, 'r' => \$hdrs, 'reply' => \$reply, - 'S:i' => \$_t6, + 'S:i' => \$_t_maxsig, 's' => \$sig, 'sani' => \$sani, - 'sigsmax:i' => \$_ta, + 'sigsmax:i' => \$_t_sigsmax, 'spass' => \$spass, 't' => \$trad, - 'version|v' => \$_tb, + 'version|v' => \$_t_ver, 'w' => \$trsp )) { help(); } # clean up temp vals: -if (defined $_t1) { - if ($_t1 !~ /^(?:(\d+)(?:,(\d+))?)?$/) { help(); } +if (defined $_t_bigq) { + if ($_t_bigq !~ /^(?:(\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); +if (defined $_t_help) { help(); } +if (defined $_t_kminl) { $kminl = $_t_kminl; $kamm = 1; } +if (defined $_t_kmaxl) { $kmaxl = $_t_kmaxl; $kamm = 1; } +if (defined $_t_kdiff) { $kdiff = $_t_kdiff; $kamm = 1; } +if (defined $_t_maxsig) { $lsig = $_t_maxsig ? $_t_maxsig : $maxsig; } +if (defined $_t_mua) { + $mua = lc($_t_mua); # 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) { +if (defined $_t_redir) { $mda = $_t_redir ? $_t_redir : '1'; } +if (defined $_t_check) { $check = 1; - while ($_t9 && $_t9 =~ /^([^,\s]+)(?:,(\S+))?$/) { + while ($_t_check && $_t_check =~ /^([^,\s]+)(?:,(\S+))?$/) { my $foo = $1; - $_t9 = $2; + $_t_check = $2; if ($foo =~ /^ratio(?:=(0?\.\d+))?$/) { $check_ratio = $1?$1:0.75; } } } -if (defined $_ta) { $sign = $_ta ? $_ta : undef; } -if (defined $_tb) { version(); } -if (defined $_tc) { $nohdr=1; $hdrs=1; } -if (defined $_td) { $cr = $_td ? $_td : $crshrink; } +if (defined $_t_sigsmax) { $sign = $_t_sigsmax ? $_t_sigsmax : undef; } +if (defined $_t_ver) { version(); } +if (defined $_t_nohdr) { $nohdr=1; $hdrs=1; } +if (defined $_t_cr) { $cr = $_t_cr ? $_t_cr : $crshrink; } if ($ms_smart) { $ms = 1; } if ($mua eq 'mutt') { diff --git a/t-prot.1 b/t-prot.1 index 6ee7930..7a328f8 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,6 +1,6 @@ -.\" $Id: t-prot.1,v 1.178 2010/03/06 01:31:33 jochen Exp $ +.\" $Id: t-prot.1,v 1.182 2010/04/09 06:45:35 jochen Exp $ .\" -.TH T-PROT "1" "March 2010" "T-PROT" +.TH T-PROT "1" "April 2010" "T-PROT" .SH NAME t-prot \- TOFU Protection - Display Filter for RFC 5322 messages .SH SYNOPSIS @@ -25,15 +25,17 @@ initially designed to cope with the output of the MUA mutt (which is the reason for not using standard CPAN modules for handling messages). .PP -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. There is a -proof\-of\-concept filter for INN2, which you will have to adapt to -the needs of the news site you host (please see the file for details). +T\-prot offers example configuration files for mutt, Heirloom mailx +and metamail. Also coming with the t-prot package is the example +S-Lang macro t\-prot.sl for using t-prot from within slrn. There is +a proof\-of\-concept filter for INN2, which you will have to adapt +to the needs of the news site you host. For use with sendmail's +alias(5) file, please see below (the option +.BR "\-p" " provides an example line)." .SH OPTIONS .PP If you do not specify any options, t\-prot does ... nothing. Every -feature you want must be turned on explicitely. +feature you want must be turned on explicitly. Admittedly, we have quite a number of options for t\-prot. To limit confusion they are grouped into five sections: Input/Output Options, Advertisement And Mailing List Footers, Filtering Options, Detection @@ -71,7 +73,9 @@ and should NEVER be used as a default, otherwise it will probably turn into a security issue.) .sp You can use this option safely to enable -.BR "\-o" " /dev/null." +.B "\-o" +/dev/null (or other files which cannot be changed with the user's +privileges). .TP .BR "\-\-max\-lines" =x Maximum number of lines a message may count (with headers). If the message @@ -424,7 +428,7 @@ If we really find some TOFU, abort with exit code Otherwise redirect the message to ADDRESS if given. .sp Intended for use from within mail delivery agents (MDAs) or mail transport -agents (MTAs), or even from with INN, so the message bounces if TOFU is +agents (MTAs), or even from within INN, so the message bounces if TOFU is detected, and does not get on *your* nerves. :) .sp As an example for usage with -- 2.39.2 From 8a37c408cca72e76ddde3b19eb65e26f7374d516 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 18 May 2010 21:29:39 +0200 Subject: [PATCH 02/16] new upstream release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7260547..e9770c9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +t-prot (2.98-1) unstable; urgency=low + + * New upstream release. + + -- + t-prot (2.97-1) unstable; urgency=low * New upstream release using Getopt::Long by default to not break existing -- 2.39.2 From 83e2f8e737c24fed197702ebf34172039322eb5a Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 18 May 2010 21:36:55 +0200 Subject: [PATCH 03/16] New footer new-debian- to match new debian footer --- debian/changelog | 1 + debian/footers/new-debian- | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 debian/footers/new-debian- diff --git a/debian/changelog b/debian/changelog index e9770c9..cb3372a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ t-prot (2.98-1) unstable; urgency=low * New upstream release. + * New footer new-debian- to match new debian list footer. -- diff --git a/debian/footers/new-debian- b/debian/footers/new-debian- new file mode 100644 index 0000000..fdac96b --- /dev/null +++ b/debian/footers/new-debian- @@ -0,0 +1,4 @@ +-- +To UNSUBSCRIBE, email to debian- +with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org +Archive: http://lists.debian.org/ -- 2.39.2 From 269819f6d9d549c6a7a30d54c044fc269ca23fff Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 18 May 2010 21:46:09 +0200 Subject: [PATCH 04/16] note new footer also in debian/conffiles --- debian/conffiles | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/conffiles b/debian/conffiles index 4655b57..1e1641a 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -1,4 +1,5 @@ /etc/t-prot/Muttrc /etc/t-prot/footers/debian- +/etc/t-prot/footers/new-debian- /etc/t-prot/footers/debian-private /etc/t-prot/footers/mailman -- 2.39.2 From 5afea536b4a1b0f0dc86ac8746bed31de3e4f862 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Tue, 18 May 2010 21:51:53 +0200 Subject: [PATCH 05/16] finalize the entry --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cb3372a..4b3f350 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,7 @@ t-prot (2.98-1) unstable; urgency=low * New upstream release. * New footer new-debian- to match new debian list footer. - -- + -- Gerfried Fuchs Tue, 18 May 2010 21:46:16 +0200 t-prot (2.97-1) unstable; urgency=low -- 2.39.2 From dfaa255c1681430ea20b11583ffe4c0c31b79072 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Thu, 1 Jul 2010 21:17:02 +0200 Subject: [PATCH 06/16] Imported Upstream version 2.99 --- ChangeLog | 38 ++++++++++++++++++++++++++++++++++++++ README | 2 +- t-prot | 51 ++++++++++++++++++++++++++++++++++++++++----------- t-prot.1 | 23 +++++++++++++---------- 4 files changed, 92 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 402054b..c83c003 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,41 @@ +2010-07-01 16:02 Jochen Striepe + + * t-prot: Release as v2.99. + +2010-07-01 15:58 Jochen Striepe + + * t-prot, t-prot.1: New command line option --fixind to fix broken + quoting (regarding to RFC 3676). Perhaps this should not be + default, as there might be false positives if the message is + already quoted correctly. Quotes with this particular brokenness + are quite common, though. Patch by Simon Ruderich, many thanks. + +2010-06-09 19:32 Jochen Striepe + + * t-prot: Use index() instead of regex for $indent. Patch by Simon + Ruderich. + +2010-04-20 09:40 Jochen Striepe + + * t-prot: Revert new handling of empty lines at the beginning of + the body, as it removes lines where it should not. + +2010-04-20 08:58 Jochen Striepe + + * t-prot: Another bug with -c: Empty lines before the signature + were not handled properly. Patch by Simon Ruderich. + +2010-04-20 08:57 Jochen Striepe + + * t-prot: This causes -c1 to not create an empty line at the + beginning of the message if there were empty lines at the start of + the body. Patch by Simon Ruderich. + +2010-04-20 08:55 Jochen Striepe + + * t-prot, t-prot.1: Typos and documentation fixes regarding + $indent. Many thanks to Simon Ruderich. + 2010-04-09 06:47 Jochen Striepe * t-prot: Release as v2.98. diff --git a/README b/README index 738cc6d..d52fafa 100644 --- a/README +++ b/README @@ -17,7 +17,7 @@ T-PROT -- TOFU protection 2. What does the script do? It detects, and when demanded hides annoying parts in rfc5322 messages: TOFU, huge quoted blocks, signatures (especially when they are too long), - excessive punktuation, blocks of empty lines, trailing spaces and tabs. + excessive punctuation, blocks of empty lines, trailing spaces and tabs. For use inside of MTAs or MDAs it exits with appropriate libc exit codes, so annoying messages may be bounced easily. diff --git a/t-prot b/t-prot index fb3029f..876b5ff 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.300 2010/04/09 06:47:11 jochen Exp $ +# $Id: t-prot,v 1.307 2010/07/01 16:02:56 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Long qw(:config gnu_getopt no_ignore_case); -use constant VER => '2.98'; +use constant VER => '2.99'; use constant REV => ''; -use constant REL => q$Revision: 1.300 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.307 $=~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'; @@ -22,7 +22,7 @@ use constant EX_IOERR => 74; use constant EX_BOUNCE => EX_UNAVAILABLE; use vars qw( $ad $ads $bigqn $bigqx $boun $check $check_ratio $cr $crshrink $diff $elli - $footers $ftr_ad $ftr_ml $hdrs $indent $kamm $kdiff $kminl $kmaxl + $fixind $footers $ftr_ad $ftr_ml $hdrs $indent $kamm $kdiff $kminl $kmaxl $lax $lsig $maxsig $maxlines $mda $ml $gw $ms $ms_smart $msg_quote $msg_ratio $mua $nohdr $ofile $pgpshort $pgpmove $pgpmovevrf $reply $sani $sig $sigint $sign $spass $spass_prefix $sysl $trad $trsp @@ -43,7 +43,7 @@ $0 =~ s!^.*/!!; $maxsig = 4; # max. valid signature length $maxlines = undef; # no limit of message lines $crshrink = 2; # multiple blank lines are shrunk to $crshrink lines -$indent = '>'; # Indent string, regexp to identify a quoted line +$indent = '>'; # Indent string to identify a quoted line $kminl = 65; # see decomb() for details $kmaxl = 80; $kdiff = 20; @@ -101,6 +101,7 @@ sub help { -d, --debug print notice to syslog when bouncing; requires -p --diff tolerate diffs -e force ellipsis for excessive punctuation + --fixind fix quotes to adhere to RFC 3676 --ftr-ad enable aggressive ad footer matching; requires -A --ftr-ml enable aggressive mailing list footer matching; req. -L --groupwise delete Novell Groupwise style TOFU @@ -116,7 +117,7 @@ sub help { --lax-security use unsafe writing method; USE ON YOUR OWN RISK! --locale=LOCALE internationalization; currently only used with -Mmutt -M, --mua=MUA turn on special treatment for some mail user agents - -m delete MS style TOFU; careful: might be too agressive + -m delete MS style TOFU; careful: might be too aggressive --max-lines=x maximum number of message lines --ms-smart try to be smart with MS style TOFU; req. -Mmutt and -m -o OUTFILE file to be written to; '-' for STDOUT (default) @@ -127,7 +128,7 @@ sub help { --pgp-short hide non-relevant pgp key uids; requires -Mmutt -r delete mail header lines --reply squeeze multiple reply prefixes in subject line - -S[n] supress signatures with more than n lines (default $maxsig) + -S[n] suppress signatures with more than n lines (default $maxsig) -s delete signature --sani sanitize some header fields --sigsmax[=n] max number of sigs tolerated, no value for unlimited @@ -341,7 +342,7 @@ sub decomb { } # debigq(): Finds big quotes (more than $n lines quoted) and deletes all -# but $x lines of them. +# but the last $x lines of them. sub debigq { my $L = shift; # array of message lines my $V = shift; # array with verbatim list @@ -760,6 +761,25 @@ sub process_msg { } } + # Fix quote markers to adhere to RFC 3676, this changes "> >" to ">> " (if + # the default $indent is used). The space after ">" is not mandatory by RFC + # but makes the result more readable. + if ($fixind) { + for ($x=0; $x=0; $i--) { if ($vrb[$i]) { last; } - if ($$lines[$i] =~ /^$indent/o) { + if (index($$lines[$i], $indent)==0) { $j++; $k = $i; } @@ -951,6 +971,14 @@ sub process_msg { # earlier -- the way it is done right now would screw up the verbatim # list) if ($cr) { + # When handling regular TOFU above we move the last empty line from + # the body to the signature. This prevents the correct removal of + # empty lines before a signature (one line less is removed than it + # should) when -c and -t are used. This fixes it. + if (scalar(@sig) && $sig[0] =~ /^\s*$/) { + push(@$lines, shift(@sig)); + } + my $t = 0; for ($x=scalar(@$lines)-1; $x>=0; $x--) { if ((!$vrb[$x]) && @@ -992,10 +1020,10 @@ my $locale = $ENV{'LC_ALL'}?$ENV{'LC_ALL'}: ($ENV{'LC_MESSAGES'}?$ENV{'LC_MESSAGES'}:$ENV{'LANG'}); # command line switches -($ad, $ads, $bigqn, $bigqx, $check, $cr, $sysl, $diff, $elli, $footers, $lax, +($ad, $ads, $bigqn, $bigqx, $check, $cr, $sysl, $diff, $elli, $fixind, $footers, $lax, $ml, $gw, $ms, $ms_smart, $mda, $mua, $hdrs, $kamm, $lsig, $nohdr, $reply, $sani, $sig, $sigint, $spass, $trad, $trsp) = - (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + (0, 0, 0, 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: @@ -1013,6 +1041,7 @@ if (!Getopt::Long::GetOptions( 'debug|d' => \$sysl, 'diff' => \$diff, 'e' => \$elli, + 'fixind' => \$fixind, 'ftr-ad' => \$ftr_ad, 'ftr-ml' => \$ftr_ml, 'groupwise' => \$gw, diff --git a/t-prot.1 b/t-prot.1 index 7a328f8..2be9fab 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,6 +1,6 @@ -.\" $Id: t-prot.1,v 1.182 2010/04/09 06:45:35 jochen Exp $ +.\" $Id: t-prot.1,v 1.184 2010/07/01 15:58:23 jochen Exp $ .\" -.TH T-PROT "1" "April 2010" "T-PROT" +.TH T-PROT "1" "July 2010" "T-PROT" .SH NAME t-prot \- TOFU Protection - Display Filter for RFC 5322 messages .SH SYNOPSIS @@ -203,6 +203,14 @@ prey for Squeezes a sequence of four or more dots, exclamation marks, or question marks to only three dots or marks, respectively. .TP +.BR "\-\-fixind" +Fix broken quotes to adhere to RFC 3676 by removing spaces between quote +characters and adding a space after them. +.br +.IR NOTE : +This may produce false positives if spaces in between quote characters +are intended (thus changing the quoting level, see RFC 3676 for details). +.TP .B "\-\-groupwise" Hides TOFU as produced by Novell Groupwise. .TP @@ -400,13 +408,8 @@ test to avoid false positives for Microsoft style TOFU on such messages. .TP .B "\-t" "TOFU deletion": -Hides "traditional style" TOFU, where each line begins with an -indent string like "> ". -.br -(You may edit the indent pattern in the script itself to suit your needs, -but it is surely -.I not -recommended at all.) +Hides "traditional style" TOFU, where each line begins with the +indent string ">". .TP .B "\-w" "whitespace deletion": @@ -694,7 +697,7 @@ and the part about "display_filter", .BR perl (1), .BR aliases (5), .sp -RFCs 2045-2049 and 5322, +RFCs 2045-2049, 3676 and 5322, .sp .I http://freshmeat.net/articles/t\-prot/ (a nice, solid introduction), -- 2.39.2 From 2b9394b2e392d2da2beb3edad438c9a73dfaf6db Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Thu, 1 Jul 2010 21:19:56 +0200 Subject: [PATCH 07/16] new version changelog start --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4b3f350..97c27c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +t-prot (2.99-1) unstable; urgency=low + + * New upstream release. + + -- + t-prot (2.98-1) unstable; urgency=low * New upstream release. -- 2.39.2 From 1c3a8e9066078bc5389e66ec83eacc8f8073473f Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Thu, 1 Jul 2010 21:31:14 +0200 Subject: [PATCH 08/16] Bump Standards-Version to 3.9.0 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 97c27c2..3bd7c34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ t-prot (2.99-1) unstable; urgency=low * New upstream release. + * Bump Standards-Version to 3.9.0. -- diff --git a/debian/control b/debian/control index e5b8388..2eb7b38 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Gerfried Fuchs Uploaders: Axel Beckert Build-Depends-Indep: po-debconf, patch -Standards-Version: 3.8.4 +Standards-Version: 3.9.0 Homepage: http://www.escape.de/~tolot/mutt/ Vcs-Browser: http://git.deb.at/w/pkg/t-prot.git Vcs-Git: git://git.deb.at/g/pkg/t-prot.git -- 2.39.2 From a63711d99512195ca46480f5187c50d8192f051f Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Thu, 1 Jul 2010 22:02:29 +0200 Subject: [PATCH 09/16] relicense packaging under WTFPLv2 --- debian/changelog | 2 ++ debian/config | 2 +- debian/copyright | 20 +++++++++++++++++--- debian/postinst | 2 +- debian/postrm | 2 +- debian/rules | 2 +- 6 files changed, 23 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3bd7c34..c62cb25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ t-prot (2.99-1) unstable; urgency=low * New upstream release. * Bump Standards-Version to 3.9.0. + * Relicense packaging to WTFPLv2 as BSD is going to get removed from + common-licenses. -- diff --git a/debian/config b/debian/config index 4e713d8..8fb9e56 100644 --- a/debian/config +++ b/debian/config @@ -1,7 +1,7 @@ #!/bin/sh # debconf config file for t-prot # Copyright 2002-2010 by Gerfried Fuchs -# Licenced BSD style +# Licenced under WTFPLv2 set -e diff --git a/debian/copyright b/debian/copyright index 070c3eb..563350d 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1,9 +1,6 @@ This package was initially debianized by Gerfried Fuchs on Tue, 29 Jan 2002 15:55:21 +0100. -The debianization is licensed under BSD style. -See /usr/share/common-licenses/BSD. - It was downloaded from: ======================= @@ -47,3 +44,20 @@ Copyright: 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. + + +The debianization of the package is licensed under the WTFPLv2: + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2002-2010 Gerfried Fuchs + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/debian/postinst b/debian/postinst index 7c54816..f3daa2c 100644 --- a/debian/postinst +++ b/debian/postinst @@ -1,7 +1,7 @@ #!/bin/sh # postinst for t-prot # Copyright 2002-2010 by Gerfried Fuchs -# Licenced BSD style +# Licenced under WTFPLv2 set -e diff --git a/debian/postrm b/debian/postrm index b0cbfbd..c65b44d 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,7 +1,7 @@ #!/bin/sh # postrm for t-prot # Copyright 2002-2010 by Gerfried Fuchs -# Licenced BSD style +# Licenced under WTFPLv2 set -e diff --git a/debian/rules b/debian/rules index 63edcc9..947d2a1 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # debian/rules for t-prot package # Copyright 2002-2009 by Gerfried Fuchs -# Licenced BSD style +# Licenced under WTFPLv2 PKG = t-prot TMP = $(CURDIR)/debian/$(PKG) -- 2.39.2 From 12f0bdea75c27ab65f0b40788edec28e56946692 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 11 Jul 2010 22:51:10 +0200 Subject: [PATCH 10/16] finalize the changelog --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c62cb25..4bee906 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,7 +5,7 @@ t-prot (2.99-1) unstable; urgency=low * Relicense packaging to WTFPLv2 as BSD is going to get removed from common-licenses. - -- + -- Gerfried Fuchs Thu, 01 Jul 2010 22:02:47 +0200 t-prot (2.98-1) unstable; urgency=low -- 2.39.2 From 6d554681996aae75c4d005762ea5b243e404a282 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 11 Jul 2010 22:53:24 +0200 Subject: [PATCH 11/16] Imported Upstream version 2.100 --- ChangeLog | 19 +++++++++++++++++++ t-prot | 25 +++++++++++++------------ t-prot.1 | 24 ++++++++++++------------ 3 files changed, 44 insertions(+), 24 deletions(-) diff --git a/ChangeLog b/ChangeLog index c83c003..17acf0c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2010-07-10 19:14 Jochen Striepe + + * t-prot: Release as v2.100. + +2010-07-10 12:59 Jochen Striepe + + * t-prot: Add line to make -m filter Lotus Domino Webserver + produced TOFU. + +2010-07-02 15:52 Jochen Striepe + + * t-prot: Use uniform syntax notation for parameters in command + line options. + +2010-07-02 15:48 Jochen Striepe + + * t-prot.1: Use uniform syntax notation for parameters in command + line options. + 2010-07-01 16:02 Jochen Striepe * t-prot: Release as v2.99. diff --git a/t-prot b/t-prot index 876b5ff..36dde12 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.307 2010/07/01 16:02:56 jochen Exp $ +# $Id: t-prot,v 1.310 2010/07/10 19:14:36 jochen Exp $ require 5.006; use strict; use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Long qw(:config gnu_getopt no_ignore_case); -use constant VER => '2.99'; +use constant VER => '2.100'; use constant REV => ''; -use constant REL => q$Revision: 1.307 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.310 $=~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'; @@ -89,13 +89,13 @@ $gpg_bug = '... this is a bug ('; # help(): print help text and exit with appropriate exit code sub help { print "Usage: $0 [options] - -A DIRECTORY ad footer directory, treat ad footers as signature + -A=DIRECTORY ad footer directory, treat ad footers as signature -a remove ad footers; requires -A --bigq[=n[,x]] remove all but x lines of quotes with more than n lines; default is n=30 and x=10 --body input has no headers; does not work with --pgp-short; multipart messages will not be detected - -c[n] merge multiple blank lines to n lines (default is 2) + -c[=n] merge multiple blank lines to n lines (default is 2) --check[=FLAGS] check various criteria, print error message and quit; see man page for details -d, --debug print notice to syslog when bouncing; requires -p @@ -106,12 +106,12 @@ sub help { --ftr-ml enable aggressive mailing list footer matching; req. -L --groupwise delete Novell Groupwise style TOFU -h, --help show this short help and exit - -i INFILE file to be read; '-' for STDIN (default) + -i=INFILE file to be read; '-' for STDIN (default) -k try to fix \"Kammquotes\" --kdiff=n max. length difference between wrapped lines; req. -k --kmaxl=n max. line length for wrapped line; requires -k --kminl=n min. line length for wrapped line; requires -k - -L DIRECTORY mailing 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! @@ -120,15 +120,15 @@ sub help { -m delete MS style TOFU; careful: might be too aggressive --max-lines=x maximum number of message lines --ms-smart try to be smart with MS style TOFU; req. -Mmutt and -m - -o OUTFILE file to be written to; '-' for STDOUT (default) - -P MESSAGE user defined bounce message; requires -p - -p[ADDRESS] redirect to ADDRESS if no TOFU was found + -o=OUTFILE file to be written to; '-' for STDOUT (default) + -P=MESSAGE user defined bounce message; requires -p + -p[=ADDRESS] redirect to ADDRESS if no TOFU was found --pgp-move move pgp verification output to bottom; requires -Mmutt --pgp-move-vrf move pgp output if verified and good; requires -Mmutt --pgp-short hide non-relevant pgp key uids; requires -Mmutt -r delete mail header lines --reply squeeze multiple reply prefixes in subject line - -S[n] suppress signatures with more than n lines (default $maxsig) + -S[=n] suppress signatures with more than n lines (default $maxsig) -s delete signature --sani sanitize some header fields --sigsmax[=n] max number of sigs tolerated, no value for unlimited @@ -797,7 +797,8 @@ sub process_msg { 'Oorspronkelijk bericht', 'Message d\'origine', 'Forwarded message', - 'Weitergeleitete Nachricht / Forwarded Message'); + 'Weitergeleitete Nachricht / Forwarded Message', + '[A-Za-z ]+ <(\w[\w.+-]*@(?:[\w.+-]+\.)+[A-Za-z]{2,})> schrieb:'); my $k = 0; # any text above? my $tmp = 0; # flagged if inside PGP output diff --git a/t-prot.1 b/t-prot.1 index 2be9fab..4c2d767 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,4 +1,4 @@ -.\" $Id: t-prot.1,v 1.184 2010/07/01 15:58:23 jochen Exp $ +.\" $Id: t-prot.1,v 1.185 2010/07/02 15:48:33 jochen Exp $ .\" .TH T-PROT "1" "July 2010" "T-PROT" .SH NAME @@ -52,10 +52,10 @@ then have a peek at the Detection Options section. You may accept or reject/bounce messages depending on t\-prot's result. .SH INPUT/OUTPUT OPTIONS .TP -.BR "\-i" " FILE" +.BR "\-i" "=FILE" Defines an input file; default is '\-' i.e. STDIN. .TP -.BR "\-o" " FILE" +.BR "\-o" "=FILE" Defines the output file; default is STDOUT. .TP .B "\-\-body" @@ -118,9 +118,9 @@ little *too* greedy. .sp .IR NOTE : This requires a directory with footer files to be given with option -.BR "\-A" " DIRECTORY". +.BR "\-A" "=DIRECTORY". .TP -.BR "\-A" " DIRECTORY" +.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 @@ -143,7 +143,7 @@ option. .sp .IR NOTE : This requires a directory with footer files to be given with option -.BR "\-L" " DIRECTORY". +.BR "\-L" "=DIRECTORY". .B \-l is not needed if .B \-\-ftr\-ml @@ -159,9 +159,9 @@ 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 -.BR "\-L" " DIRECTORY". +.BR "\-L" "=DIRECTORY". .TP -.BR "\-L" " DIRECTORY" +.BR "\-L" "=DIRECTORY" "list footer directory": Defines the directory which contains the mailing list footers (one footer per file) which are to be tested when removing them with the options @@ -182,7 +182,7 @@ or Blocks of quotes with more than n lines will be shrunk to x lines. Defaults are 30 for n and 10 for x. .TP -.BR "\-c" " [n]" +.BR "\-c" "[=n]" "compress": Squeezes a sequence of blank lines to just n blank lines. n defaults to 2. .TP @@ -360,7 +360,7 @@ Hides all mail header lines. Subject lines with multiple reply prefixes (Re: and translations into other languages) get squeezed to only one prefix. .TP -.BR "\-S" " [n]" +.BR "\-S" "[=n]" "supression of overlong signatures": Signatures are to be n lines (not including the one containing dash-dash-space) or less. If there are more, it is probably not that spirited after all. @@ -418,13 +418,13 @@ CAVEAT: This may lead to interesting effects with crossposts between mailing lists or with undetected signature attempts. .SH DETECTION OPTIONS .TP -.BR "\-P" " MESSAGE" +.BR "\-P" "=MESSAGE" "user defined bounce message for picky delivery": You may specify your own bounce message to be returned when we try to deliver an email and bounce it because there is TOFU inside. See .BR "\-p" . .TP -.BR "\-p" " [ADDRESS]" +.BR "\-p" "[=ADDRESS]" "picky delivery": If we really find some TOFU, abort with exit code .IR EX_UNAVAILABLE . -- 2.39.2 From ccf5a7221affd38dc50054f0f94832aca209bdd4 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 11 Jul 2010 22:56:45 +0200 Subject: [PATCH 12/16] new upstream release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4bee906..c62963c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +t-prot (2.100-1) unstable; urgency=low + + * New upstream release. + + -- + t-prot (2.99-1) unstable; urgency=low * New upstream release. -- 2.39.2 From b9ba5371256adea0ef6538ab68fdb38a33106755 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 11 Jul 2010 22:57:04 +0200 Subject: [PATCH 13/16] finalize the record --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c62963c..5b712be 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ t-prot (2.100-1) unstable; urgency=low * New upstream release. - -- + -- Gerfried Fuchs Sun, 11 Jul 2010 22:54:34 +0200 t-prot (2.99-1) unstable; urgency=low -- 2.39.2 From d291c240515f15a9bb267aa00a60cd4b6e2a4634 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 31 Oct 2010 14:40:06 +0100 Subject: [PATCH 14/16] Imported Upstream version 2.101 --- ChangeLog | 10 ++++++ ...t1512.diff => t-prot-r1.311-mutt1512.diff} | 31 +++++++++---------- t-prot | 14 ++++++--- 3 files changed, 35 insertions(+), 20 deletions(-) rename contrib/{t-prot-r1.279-mutt1512.diff => t-prot-r1.311-mutt1512.diff} (87%) diff --git a/ChangeLog b/ChangeLog index 17acf0c..d9e67f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2010-10-31 11:18 Jochen Striepe + + * t-prot: Release as v2.101. + +2010-10-31 10:13 Jochen Striepe + + * t-prot: Add just another of mutt's decryption messages to the + list. This seems not to be translated yet, so no gettext() is + inserted this time. + 2010-07-10 19:14 Jochen Striepe * t-prot: Release as v2.100. diff --git a/contrib/t-prot-r1.279-mutt1512.diff b/contrib/t-prot-r1.311-mutt1512.diff similarity index 87% rename from contrib/t-prot-r1.279-mutt1512.diff rename to contrib/t-prot-r1.311-mutt1512.diff index a1d3d43..7035533 100644 --- a/contrib/t-prot-r1.279-mutt1512.diff +++ b/contrib/t-prot-r1.311-mutt1512.diff @@ -1,15 +1,14 @@ ---- t-prot 2010-02-11 11:41:15.000000000 +0100 -+++ t-prot-m1512 2010-02-11 11:48:49.000000000 +0100 -@@ -32,7 +32,7 @@ - +--- t-prot 2010-10-31 11:13:22.000000000 +0100 ++++ t-prot-mutt1520 2010-10-31 11:40:45.000000000 +0100 +@@ -33,6 +33,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 + $mutt_pgpoutstart $mutt_pgpoutend $mutt_pgpcryptend $mutt_pgpcryptstart ++ $mutt_ssloutstart $mutt_ssloutend ); -@@ -71,6 +71,8 @@ +@@ -74,6 +75,8 @@ $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; $mutt_pgpoutstart = '[-- PGP output follows (current time:'; $mutt_pgpoutend = '[-- End of PGP output --]'; @@ -18,7 +17,7 @@ # set the defaults to the C locale $gpg_WARNING = 'WARNING: '; -@@ -342,7 +344,7 @@ +@@ -412,7 +415,7 @@ for (my $x=0; $x schrieb:'); my $k = 0; # any text above? - my $tmp = 0; # flagged if inside PGP output + my $tmp = 0; # flagged if inside PGP or SSL output DONE: for ($x=0; $x '2.100'; +use constant VER => '2.101'; use constant REV => ''; -use constant REL => q$Revision: 1.310 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.312 $=~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'; @@ -32,7 +32,7 @@ use vars qw( $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted - $mutt_pgpoutstart $mutt_pgpoutend + $mutt_pgpoutstart $mutt_pgpoutend $mutt_pgpcryptend $mutt_pgpcryptstart ); @@ -68,6 +68,8 @@ $mutt_contenttype = '[-- Type: '; $mutt_pgpsigned = '[-- End of signed data --]'; $mutt_beginsigned = '[-- The following data is signed --]'; $mutt_pgpclearsigstart = '[-- BEGIN PGP SIGNED MESSAGE --]'; +$mutt_pgpcryptend = '[-- END PGP MESSAGE --]'; +$mutt_pgpcryptstart = '[-- BEGIN PGP MESSAGE --]'; $mutt_pgpclearsigned = '[-- END PGP SIGNED MESSAGE --]'; $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; $mutt_pgpoutstart = '[-- PGP output follows (current time:'; @@ -454,6 +456,7 @@ sub pgp { $$L[$x] =~ /^ (?:\e[^\a]+\a)? (?:\Q$mutt_pgpencrypted\E | + \Q$mutt_pgpcryptend\E| \Q$mutt_pgpclearsigned\E| \Q$mutt_pgpsigned\E) /ox) @@ -661,6 +664,7 @@ sub process_msg { (?:\e[^\a]+\a)? (?:\Q$mutt_pgpsigned\E | \Q$mutt_pgpclearsigned\E| + \Q$mutt_pgpcryptend\E| \Q$mutt_pgpencrypted\E) /ox)) { @@ -834,6 +838,8 @@ sub process_msg { } elsif ($mua eq 'mutt' && $tmp && ($$lines[$x] =~ /^(?:\e[^\a]+\a)?(?:\Q$mutt_beginsigned\E)/o || + $$lines[$x] =~ + /^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpcryptstart\E)/o || $$lines[$x] =~ /^(?:\e[^\a]+\a)?(?:\Q$mutt_pgpclearsigstart\E)/o)) { $tmp = 0; -- 2.39.2 From 3fe5e7f962ef62e203d7e3ed33fe09fd455931b6 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 31 Oct 2010 14:43:58 +0100 Subject: [PATCH 15/16] New upstream bugfix release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5b712be..cee4156 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +t-prot (2.101-1) unstable; urgency=low + + * New upstream bugfix release. + + -- + t-prot (2.100-1) unstable; urgency=low * New upstream release. -- 2.39.2 From 4ebbea16f6f636ce919ee24f2cc468531cd5b205 Mon Sep 17 00:00:00 2001 From: Gerfried Fuchs Date: Sun, 31 Oct 2010 14:44:31 +0100 Subject: [PATCH 16/16] Bump Standards-Version to 3.9.1 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cee4156..4ce5ad8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ t-prot (2.101-1) unstable; urgency=low * New upstream bugfix release. + * Bump Standards-Version to 3.9.1. -- diff --git a/debian/control b/debian/control index 2eb7b38..f950181 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Priority: optional Maintainer: Gerfried Fuchs Uploaders: Axel Beckert Build-Depends-Indep: po-debconf, patch -Standards-Version: 3.9.0 +Standards-Version: 3.9.1 Homepage: http://www.escape.de/~tolot/mutt/ Vcs-Browser: http://git.deb.at/w/pkg/t-prot.git Vcs-Git: git://git.deb.at/g/pkg/t-prot.git -- 2.39.2