]> git.deb.at Git - pkg/t-prot.git/blobdiff - t-prot.1
Imported Upstream version 1.49
[pkg/t-prot.git] / t-prot.1
index ce462b4f4cfbbc69b5b9cae35f418c399fa99259..a8e4b5307d77201945c943a9ea69a4c19f704853 100644 (file)
--- a/t-prot.1
+++ b/t-prot.1
@@ -1,11 +1,11 @@
-.\" Copyright Jochen Striepe <t-prot@tolot.escape.de>, 2001-2002.
+.\" Copyright Jochen Striepe <t-prot@tolot.escape.de>, 2001-2004.
 .\" License see below.
 .\" 
-.\" $Id: t-prot.1,v 1.30 2002/03/22 11:38:35 jochen Exp $
+.\" $Id: t-prot.1,v 1.92 2005/01/08 11:05:13 jochen Exp $
 .\"
-.TH T-PROT "1" "March 2002" "T-PROT"
+.TH T-PROT "1" "Jan 2005" "T-PROT"
 .SH NAME
-t-prot \- TOFU Protection - Display Filter for RFC822 messages
+t-prot \- TOFU Protection - Display Filter for RFC 822 messages
 .SH SYNOPSIS
 .BI "t-prot [" OPTIONS "]..."
 .SH DESCRIPTION
@@ -15,18 +15,25 @@ for messages (emails and posts) by *hiding* some annoying parts,
 e.g. mailing list footers, signatures, and TOFU (see definition below),
 as well as squeezing sequences of blank lines or punctuation.
 .br
-The filter is written in Perl and relies on input to be a single RFC822 
-conform message.
+The filter is written in Perl and relies on input to be a single
+message conforming to RFC 822 or it's successor, RFC 2822. Messages
+conforming to RFCs 2045, 2046 and 2049 should be treated reasonably
+correct.
 .PP
 For easy usage, you can download a file to be included in your ~/.muttrc:
-.IR http://www.escape.de/users/tolot/mutt/t-prot/muttrc.t-prot .
+.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
 .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 option
-.BR -a .
+footer per file) which are to be tested when removing them with options
+.B -a
+or
+.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
@@ -39,13 +46,41 @@ or
 "commercial signature":
 Hides "footers" (signatures) from commercial email providers.
 .br
+This option compares the last lines of the message body with any
+footer file found in the directory specified with
+.BR "\-A" =DIRECTORY
+(which is mandatory for this option). The comparison is done by perl's
+.B index()
+function (please try
+.I perldoc -f index
+for details).
+.sp
 .IR NOTE :
-This requires a directory with footer files to be given with option
-.BR "\-A" =DIRECTORY.
+This option is not needed if
+.B --ftr-ad
+is specified.
+.TP
+.BR "\-\-bigq" [=n[,x]]
+"shrink big quotes":
+Blocks of quotes with more than n lines will be shrinked to x lines.
+Defaults are 30 for n and 10 for x.
 .TP
 .B "\-c"
 "compress":
-Squeezes a sequence of blank lines to just one blank line.
+Squeezes a sequence of blank lines to two blank lines at maximum.
+.TP
+.BR "\-\-check" [=FLAGS]
+Run checks. If successful, print an error message and quit with
+an appropriate exit code. Useful e.g. for rejecting messages from
+within INN2.
+.IP
+Flags are separated by commas (no whitespaces), and can be the
+following (right now just one flag):
+.IP
+.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.
 .TP
 .B "\-d, \-\-debug"
 "debug":
@@ -60,14 +95,45 @@ Tolerate unified diff (see
 and
 .BR patch (1))
 appended *after* the signature (which usually makes the signature too long
-to be detected). Not entirely consequent but sometimes useful, e.g. at the
-linux kernel mailing list.
+to be valid). Not entirely consequent but sometimes useful, e.g. at the
+Linux kernel mailing list.
 .TP
 .B "\-e"
 "ellipsis":
 Squeezes a sequence of four or more dots, exclamation marks, or question marks
 to only three dots or marks, respectively.
 .TP
+.B "\-\-ftr\-ad"
+"enable aggressive ad footer matching":
+With this option enabled t-prot makes footer detection really greedy: We
+assume that commercial email providers aren't even frightened to append
+changing texts *under* their ads which are appended to the message body.
+Because these texts even have changing *lengths* we simply detect the
+lines of the footer *anywhere* in the body of the message and assume that
+everything below belongs to the footer. (Man, if life where always that
+easy! ;)
+.br
+With this option even GMX ads should be easy to hide -- you buy this with
+a slight performance hit (which is the reason this option is disabled by
+default), and with the possibility that sometimes the algorithm is just a
+little *too* greedy.
+.sp
+.IR NOTE :
+This requires a directory with footer files to be given with option
+.BR "\-A" =DIRECTORY.
+.TP
+.B "\-\-ftr\-ml"
+"enable aggressive mailing list footer matching":
+With this option enabled t-prot makes footer detection really greedy: Should
+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.
+.sp
+.IR NOTE :
+This requires a directory with footer files to be given with option
+.BR "\-L" =DIRECTORY.
+.TP
 .B "\-h, \-\-help"
 "help":
 Displays a short help text with a summary on all options, and exits.
@@ -76,11 +142,55 @@ Displays a short help text with a summary on all options, and exits.
 "input file":
 Defines a file for input; the default input is from '-' i.e. STDIN.
 .TP
+.B "\-k"
+"anti Kammquote":
+Tries to fix those broken zig-zag-shaped lines wrapped around by some MUAs
+which are known as "Kammquoting" in German.
+.sp
+Note: This option is considered stable by now. However, sometimes Kammquotes
+should have been removed but weren't. Please send a bug report if this happens
+to you (after carefully reading the BUGS file, that is).
+.TP
+.BR "\-\-kminl" =n
+Minimum line length for wrapped line detection on Kammquotes. Umm, don't
+know how to explain this well without describing the complete algorithm
+used. Please see the code.
+.br
+Anyway, lower values make the algorithm more aggressive, higher values
+make Kammquotes harder to detect. Default is 65.
+.sp
+Requires
+.BR "\-k" .
+.TP
+.BR "\-\-kmaxl" =n
+Maximum line length for wrapped line detection on Kammquotes. Umm, don't
+know how to explain this well without describing the complete algorithm
+used. Please see the code.
+.br
+Anyway, higher values make the algorithm more aggressive, lower values
+make Kammquotes harder to detect. Default is 80.
+.sp
+Requires
+.BR "\-k" .
+.TP
+.BR "\-\-kdiff" =n
+Minimum length difference between two lines for wrapped line detection on
+Kammquotes. Umm, don't know how to explain this well without describing
+the complete algorithm used. Please see the code.
+.br
+Anyway, lower values make the algorithm more aggressive, higher values
+make Kammquotes harder to detect. Default is 20.
+.sp
+Requires
+.BR "\-k" .
+.TP
 .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 option
-.BR -l .
+per file) which are to be tested when removing them with the options
+.B \-l
+or
+.BR \-\-ftr\-ml .
 .br
 This option is also needed if you do not want signature lengths to be
 counted wrong or fullquotes get undetected when a mailing list footer is
@@ -91,41 +201,134 @@ or
 .TP
 .B "\-l"
 "list signature":
-Hides "footers" (signatures) from mailing lists.
-.br
+Hides "footers" (signatures) from mailing lists. Footer detection works like the 
+.B "\-a"
+option.
+.sp
 .IR NOTE :
 This requires a directory with footer files to be given with option
 .BR "\-L" =DIRECTORY.
+.B \-l
+is not needed if
+.B \-\-ftr\-ml
+is specified.
+.TP
+.B "\-\-lax\-security"
+Allow insecure writing method. DO NOT USE UNLESS YOU REALLY KNOW WHAT
+YOU ARE DOING. (This ugly workaround is needed for some early mutt versions
+and should NEVER be used as a default, otherwise it will probably turn into
+a security issue.)
+.TP
+.BR "\-\-locale" =LOCALE
+"locale to use":
+Here you can specify which locale to use. Right now this option is only
+used when
+.I "\-Mmutt"
+is specified, but this may change in future.
+.sp
+Valid values for LOCALE are the locale names in the mutt(1) and gpg(1)
+po file names.
+In mutt-1.3.28 (and newer) these are:
+.I ca cs da de el eo es et fr gl hu id it ja ko lt nl pl pt_BR ru sk sv
+.IR "tr uk zh_CN zh_TW" .
+In mutt-1.4.1
+.I bg
+was added.
+In gnupg-1.2.5 (and newer) these are:
+.I be ca cs da de el eo es et fi fr gl hu id it ja nl pl pt pt_BR ro ru
+.IR "sk sv tr zh_CN zh_TW" .
+.sp
+.IR Note :
+If you use
+.B mutt
+or
+.B gnupg
+with locales, t-prot will only work correctly if you specify the corresponding
+locale string.
+.sp
+.IR "Note also" :
+You also have to make sure you are running t-prot
+with matching
+.B gnupg
+and 
+.B mutt
+versions. T-prot detects
+.B gnupg
+and
+.B mutt
+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 old
+.B mutt
+and
+.B gnupg
+versions.
 .TP
 .B "\-m"
-"microsoft TOFU":
-Hides TOFU as given by some microsoft mailers. (You all sure know these
+"Microsoft TOFU":
+Hides TOFU as given by some Microsoft mailers. (You all surely know these
 fullquotes beginning with
 .br
 "----- Original Message -----"
 .br
 and some header lines...)
 .TP
+.B "\-\-ms\-smart"
+Burn CPU cycles trying to be smart with MS style TOFU.
+.sp
+Please note that this is probably just a waste of time because most
+MS Outlook users who do produce this kind of TOFU won't care about
+making their messages the least bit readable or even predictable. So
+this option will probably just be interesting for mutt message hooks
+(to activate it on demand when you
+.BR know " the sender tries to write legible messages)."
+.sp
+Requires
+.BR "\-Mmutt" " and"
+.BR "\-m" .
+.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.)
+.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.
 .TP
 .BR "\-o" =FILE
 "output file":
 Define the file to be written *to*; the default output is to STDOUT.
+.sp
+If "NONE" is specified as file name, there will be no output at all (useful
+if all you need is t-prot's exit code). Use something like "./NONE" if you
+really want to write to a file of this name.
 .TP
-.BR "\-p" =ADDRESS
-"picky delivery:"
+.BR "\-p" [=ADDRESS]
+"picky delivery":
 If we really find some TOFU, abort with exit code 
 .IR EX_UNAVAILABLE .
-Otherwise redirect the message to ADDRESS.
+Otherwise redirect the message to ADDRESS if given.
 .sp
 Intended for use from within mail delivery agents (MDAs) or mail transport 
 agents (MTAs), so the message bounces if TOFU is detected, and does not get
 on *your* nerves. :) 
 .sp
+As an example for usage with
+.BR sendmail ,
+put this line into your alias file and invoke
+.BR newaliases :
+.sp
+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.
+.I Note
+that TOFU is only detected if you specify
+.B "\-t"
+respectively
+.BR "\-m" .
+.sp
 .B PLEASE be careful not to bounce messages to mailing lists!
 .TP
 .BR "\-P" =MESSAGE
@@ -133,6 +336,27 @@ on *your* nerves. :)
 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.
 .TP
+.B \-\-pgp\-move
+Move pgp verification output to bottom; requires
+.BR "\-Mmutt" .
+.TP
+.B \-\-pgp\-move\-vrf
+Move pgp verification outout 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" .
+.sp
+.IR Note :
+If gpg is terminated before finished (e.g. hitting Ctrl-C, or using
+.IR kill (1)),
+we cannot always detect if the check was interrupted. Though t-prot tries
+to be smart, there will be false positives.
+.TP
+.B \-\-pgp\-short
+Hide non-relevant pgp key uids; requires
+.BR "\-Mmutt" .
+.TP
 .B "\-r"
 "rip header off":
 Hides all mail header lines.
@@ -149,8 +373,7 @@ If no n is given, default is 4. (\fINote\fR: We do not recommend using a
 value other than 4. Consider this old-fashioned, but we actually do *like*
 RFC conformance.)
 .sp
-.IR
-Note :
+.IR Note :
 The line containing "-- " ist not counted when testing for an overlong 
 signature, but it is included when displaying how many lines were deleted.
 .TP
@@ -159,6 +382,24 @@ signature, but it is included when displaying how many lines were deleted.
 Hides signatures, i.e. all lines after a "signature dashes" line,
 i.e. a line with three characters: dash-dash-space (no more, no less).
 .TP
+.BR "\-\-sigsmax" [=n]
+"maximum number of tolerated signatures":
+Here you can define how many signatures you accept to be treated as such.
+(Most significant behaviour is when microsoft style quotes are removed.
+Experts please see the code for the more subtle implications of this
+option.)
+.br
+Leave empty or specify zero to have an unlimited number of sigs. 
+Default is 1.
+.TP
+.B "\-\-spass"
+"SpamAssassin workaround":
+SpamAssassin (available at
+.IR http://spamassassin.org/ ") often is configured that it adds some"
+lines to the message body containing information about the spam criteria
+which were found matching for the message. This option enables an extra
+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
@@ -172,7 +413,7 @@ recommended at all.)
 .B "\-w"
 "whitespace deletion":
 Hides trailing whitespace (sequences of space and tab).
-CAVEAT:  This may lead to interesting effects with crossposts
+CAVEAT: This may lead to interesting effects with crossposts
 between mailing lists or with undetected signature attempts.
 .TP
 .B "\-v, \-\-version"
@@ -246,17 +487,17 @@ Text coming now is not.
 .SH AUTHOR AND COPYRIGHT
 Written by Jochen Striepe <t-prot@tolot.escape.de>.
 .br
-Copyright \(co 2001, 2002 Jochen Striepe.
+Copyright \(co 2001, 2002, 2003, 2004 Jochen Striepe.
 .PP
 This is free software; you may use the source to whatever you like.
 Just keep in mind to mention the original source of the script and the manpage
 when you give it away. There is NO warranty; not even for MERCHANTABILITY or 
 FITNESS FOR A PARTICULAR PURPOSE.
 .SH IDEAS AND INSPIRATION
-Many good ideas, bug reports and support from Sven Guckes <t-prot@guckes.net>,
-Gerfried Fuchs, Christian Borss, Bjoern Buerger, Bjoern Laessig, Martin 
-Neitzel and Ralf Doeblitz. 
-Many thanks to all of them!
+Many good ideas, bug reports and support from (in alphabetical order) Bjoern
+Buerger, Bjoern Laessig, Christian Borss, Gerfried Fuchs, Martin Neitzel, Martin
+Dietze, Ralf Doeblitz, Sven Guckes and many more (see the ChangeLog for active
+contributors). Many thanks to all of them!
 .sp
 Many thanks to Gerhard H. Wrodnigg who uses a TOFU protection script
 in order to keep the responses to his cancel bot reasonably short.  The
@@ -266,24 +507,19 @@ his script on many usenet postings.
 You can get the latest version from
 .IR http://www.escape.de/users/tolot/mutt/ .
 .SH BUGS
-There is a problem when mutt gives a PGP verified or even a multipart
-message to
-.BR 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
-.BR t-prot .
-The problem should be worked around by now, please send a bug report if
-it does not work for you.
+Please note that t-prot development happens on
+.BR "current stable perl versions only" . 
+If you do run t-prot on earlier (or unstable) perl versions, you might
+encounter perl compiler bugs (or funny t-prot behaviour). One solution
+is to upgrade your perl, another is simply to write a bug report. If
+you do not run a current perl version, please include this information
+in your bug report. Thank you.
 .PP
-The script still does not solve the "Kammquoting" problem: Some bad MUAs
-wrap long lines, so a zig-zag shaped text block is the result. This is
-harder readable, and considered bad style. Your line length should not
-exceed 80 characters - better even stick to 72-75 chars, so some place
-is left for quoting. An anti "Kammquote" option is planned for one of the
-next
-.B t-prot
-releases.
+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
+around by now, please send a bug report if it does not work for you.
 .PP
 There probably are many more bugs in this piece of software. Feel free to
 fix them - it's
@@ -301,7 +537,10 @@ section). Beside that, all main features should be implemented by now.
 .BR muttrc (5)
 and the part about "display_filter", 
 .BR perl (1),
-RFC822, 
+.BR aliases (5),
+RFCs 822, 2045, 2046, 2049, and 2822,
 .I http://got.to/quote/
 (German language), 
-.I http://learn.to/edit_messages/
+.I http://www.river.com/users/share/etiquette/edit.html
+(the Learn To Edit Messages HowTo has found a new home).
+