From: Axel Beckert Date: Tue, 19 Aug 2014 19:21:13 +0000 (+0200) Subject: Imported Upstream version 3.1 X-Git-Tag: upstream/3.1 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=576a2ad25371d2eaa9115edad16ca4d27ddcdb05;p=pkg%2Ft-prot.git Imported Upstream version 3.1 --- diff --git a/ChangeLog b/ChangeLog index 64eb976..39fd68b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2014-08-18 17:23 Jochen Striepe + + * t-prot.1: Update date string. + +2014-08-18 17:14 Jochen Striepe + + * t-prot: Release as t-prot v3.1. + +2014-08-18 17:13 Jochen Striepe + + * t-prot, t-prot.1: Support mutt-kz + (https://github.com/karelzak/mutt-kz) using -Mmutt-kz. Many + thanks to Hugo Roy for testing and reporting. + +2014-08-18 15:35 Jochen Striepe + + * t-prot: Unicode fix for MS Outlook. + 2013-10-29 12:39 Jochen Striepe * t-prot: After a very long testing phase, finally the version diff --git a/README b/README index 4fa5264..df56ca0 100644 --- a/README +++ b/README @@ -36,7 +36,8 @@ T-PROT -- TOFU protection 5. And what about other User Agents? I just use mutt and slrn, but I will gladly accept configuration samples for other user agents. There are already examples for mailcap(1) and the - Heirloom mailx (a.k.a. nail) in the contrib/ directory. + Heirloom mailx (a.k.a. nail) in the contrib/ directory. The mutt example + works with mutt-kz as well. 6. Where did the idea come from? Many thanks to Gerhard H. Wrodnigg who uses a TOFU protection script diff --git a/t-prot b/t-prot index f461425..e317162 100755 --- a/t-prot +++ b/t-prot @@ -1,13 +1,13 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.319 2013/10/29 11:39:43 jochen Exp $ +# $Id: t-prot,v 1.322 2014/08/18 15: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 => '3.0'; +use constant VER => '3.1'; use constant REV => ''; -use constant REL => q$Revision: 1.319 $=~m/(\d+(?:\.\d+)+)/; +use constant REL => q$Revision: 1.322 $=~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'; @@ -816,7 +816,7 @@ sub process_msg { # bloat this array if you want more internationalization: my @tofu = ('Original Message', 'Original-Nachricht', - 'Urspr.ngliche Nachricht', + 'Urspr..?ngliche Nachricht', 'Mensagem original', 'Ursprungligt meddelande', 'Oorspronkelijk bericht', @@ -1125,7 +1125,9 @@ 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 ($mua eq 'mutt' || $mua eq 'mutt-kz') { + $SIG{'INT'} = 'sigint_handler'; + } } if (defined $_t_redir) { $mda = $_t_redir ? $_t_redir : '1'; } if (defined $_t_check) { @@ -1142,11 +1144,12 @@ 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') { - if (defined $locale && $locale ne '' && $locale ne 'C' && $locale ne 'POSIX') { +if ($mua eq 'mutt' || $mua eq 'mutt-kz') { + if (defined $locale && + $locale ne '' && $locale ne 'C' && $locale ne 'POSIX') { eval { require Locale::gettext; }; if ($@) { warn $@; exit(EX_SOFTWARE); } else { - Locale::gettext::textdomain('mutt'); + Locale::gettext::textdomain($mua); ($mutt_attachment) = Locale::gettext::gettext("[-- Attachment #%d") =~ m/^([^%]*)/; @@ -1209,6 +1212,9 @@ if ($mua eq 'mutt') { Locale::gettext::gettext("... this is a bug (%s:%d:%s)\n") =~ m/^([^%]*)/; } + # mutt and mutt-kz right now only differ in the gettext domain name, + # so after fetching the gettext lines we treat them the same: + $mua = 'mutt'; } } diff --git a/t-prot.1 b/t-prot.1 index 3d32075..2e0f1d8 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,6 +1,6 @@ -.\" $Id: t-prot.1,v 1.187 2012/07/26 14:23:11 jochen Exp $ +.\" $Id: t-prot.1,v 1.189 2014/08/18 15:23:39 jochen Exp $ .\" -.TH T-PROT "1" "July 2012" "T-PROT" +.TH T-PROT "1" "August 2014" "T-PROT" .SH NAME t-prot \- TOFU Protection - Display Filter for RFC 5322 messages .SH SYNOPSIS @@ -25,10 +25,10 @@ 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 -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 +T\-prot offers example configuration files for mutt and its fork mutt\-kz, +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)." @@ -80,7 +80,8 @@ privileges). .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. Exit status will be EX_DATAERR except when called with \-Mmutt. +unmodified. Exit status will be EX_DATAERR except when called with \-Mmutt +or \-Mmutt\-kz. .SH ADVERTISEMENT AND MAILING LIST FOOTERS .TP .B "\-a" @@ -261,14 +262,16 @@ Requires Specify which locale to use for correct parsing of your MUA's formatting of the displayed message (usually it is the locale your MUA uses). Right now this option is only used when -.I "\-Mmutt" +.IR "\-Mmutt" " or" +.I "\-Mmutt\-kz" is specified, but this may change in future. You need the Perl module .I "Locale::gettext" for this feature. .sp .IR NOTE : If you use -.B mutt +.BR mutt , +.B mutt-kz or .B gnupg with locales, t-prot will only work correctly if you specify the corresponding @@ -284,24 +287,23 @@ You also have to make sure you are running t-prot with matching .B gnupg and -.B mutt +.BR mutt " /" +.B "mutt\-kz" versions. T-prot detects .B gnupg and -.B mutt +.BR mutt " /" +.B "mutt\-kz" locales of the recent stable versions of those programs, earlier versions -might not work well with a recent version of t-prot. There are patches available -to make t-prot fit into environments with some other -.B mutt -and -.B gnupg -versions. +might not work well with a recent version of t-prot. .TP .BR "\-M, \-\-mua" =MUA "mail user agent": Turn on special treatment for some mail user agents. (Right now only .BR mutt (1) -is supported, but more might be added in future.) +and +.BR "mutt\-kz" (1) +are supported, but more might be added in future.) .IR Caveat : If your MUA is supported by this feature you must ensure t-prot makes use of it when called from within your MUA to work as desired. @@ -328,19 +330,22 @@ this option will probably just be interesting for mutt message hooks .BR know " the sender tries to write legible messages)." .sp Requires -.BR "\-Mmutt" " and" +.BR "\-Mmutt" " /" +.BR "\-Mmutt\-kz" " and" .BR "\-m" . .TP .B \-\-pgp\-move Move PGP and SSL verification output to bottom; requires -.BR "\-Mmutt" . +.BR "\-Mmutt" " /" +.BR "\-Mmutt\-kz" . .TP .B \-\-pgp\-move\-vrf Move PGP and SSL verification output to bottom only if verification shows a good signature and the signature could be verified as authentic (using a trust path). If there is any problem with the signature, the PGP output should not be moved so the user is more likely to notice. Requires -.BR "\-Mmutt" . +.BR "\-Mmutt" " /" +.BR "\-Mmutt\-kz" . .sp .IR NOTE : If gpg is terminated before finished (e.g. hitting Ctrl-C, or using @@ -350,7 +355,8 @@ to be smart, there will be false positives. .TP .B \-\-pgp\-short Hide non-relevant PGP key uids; requires -.BR "\-Mmutt" . +.BR "\-Mmutt" " /" +.BR "\-Mmutt\-kz" . .TP .B "\-r" "rip header off": @@ -482,7 +488,7 @@ The environment variables .IR LC_MESSAGES , and .I LANG -are read and respected when interpreting output by mutt or gnupg +are read and respected when interpreting output by mutt / mutt\-kz or gnupg (unless they are overruled by the \-\-locale option). T-prot's own output is English regardless of any locale setting. .SH EXIT STATUS @@ -535,9 +541,10 @@ files as absolutely needed in any footer directory. All PGP related options are eating up lots of CPU time. Try to avoid them on unsigned and unencrypted messages. .PP -When calling t-prot from within mutt, you might use mutt's folder-hook -and message-hook facilities to turn options on only when needed, e.g. to -set up a different footer directory for each mailing list folder. +When calling t-prot from within mutt (or mutt\-kz), you might use mutt's +folder-hook and message-hook facilities to turn options on only when +needed, e.g. to set up a different footer directory for each mailing list +folder. .SH TROUBLESHOOTING .TP .IR Q : @@ -599,7 +606,7 @@ Written by Jochen Striepe . All of the documentation and software included in the t-prot releases is copyrighted by Jochen Striepe (except when explicitly stated otherwise). .PP -Copyright \(co 2001-2012 Jochen Striepe. All rights reserved. +Copyright \(co 2001-2014 Jochen Striepe. All rights reserved. .PP Redistribution and use, with or without modification, are permitted provided that the following conditions are met: @@ -692,6 +699,7 @@ 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 mutt\-kz (1), .BR muttrc (5) and the part about "display_filter", .BR perl (1),