#!/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';
# 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',
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) {
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/^([^%]*)/;
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';
}
}
-.\" $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
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)."
.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"
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
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.
.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
.TP
.B \-\-pgp\-short
Hide non-relevant PGP key uids; requires
-.BR "\-Mmutt" .
+.BR "\-Mmutt" " /"
+.BR "\-Mmutt\-kz" .
.TP
.B "\-r"
"rip header off":
.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
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 :
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:
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),