]> git.deb.at Git - pkg/t-prot.git/blob - t-prot.1
Imported Upstream version 0.54.1
[pkg/t-prot.git] / t-prot.1
1 .\" Copyright Jochen Striepe <t-prot@tolot.escape.de>, 2001-2002.
2 .\" License see below.
3 .\" 
4 .\" $Id: t-prot.1,v 1.30 2002/03/22 11:38:35 jochen Exp $
5 .\"
6 .TH T-PROT "1" "March 2002" "T-PROT"
7 .SH NAME
8 t-prot \- TOFU Protection - Display Filter for RFC822 messages
9 .SH SYNOPSIS
10 .BI "t-prot [" OPTIONS "]..."
11 .SH DESCRIPTION
12 .PP
13 This program is a filter which shall improve the readability
14 for messages (emails and posts) by *hiding* some annoying parts,
15 e.g. mailing list footers, signatures, and TOFU (see definition below),
16 as well as squeezing sequences of blank lines or punctuation.
17 .br
18 The filter is written in Perl and relies on input to be a single RFC822 
19 conform message.
20 .PP
21 For easy usage, you can download a file to be included in your ~/.muttrc:
22 .IR http://www.escape.de/users/tolot/mutt/t-prot/muttrc.t-prot .
23 .SH OPTIONS
24 .TP
25 .BR "\-A" =DIRECTORY
26 "ad footer directory":
27 Defines the directory which contains the advertisement list footers (one
28 footer per file) which are to be tested when removing them with option
29 .BR -a .
30 .br
31 This option is also needed if you do not want signature lengths to be
32 counted wrong or fullquotes get undetected when an ad footer is
33 appended at the bottom of the message (especially when using 
34 .B "\-S"
35 or
36 .BR "\-t" ).
37 .TP
38 .B "\-a"
39 "commercial signature":
40 Hides "footers" (signatures) from commercial email providers.
41 .br
42 .IR NOTE :
43 This requires a directory with footer files to be given with option
44 .BR "\-A" =DIRECTORY.
45 .TP
46 .B "\-c"
47 "compress":
48 Squeezes a sequence of blank lines to just one blank line.
49 .TP
50 .B "\-d, \-\-debug"
51 "debug":
52 Print envelope info to syslog when bouncing TOFU contaminated email.
53 Default syslog facility is mail.debug. Requires
54 .BR \-p .
55 .TP
56 .B "\-\-diff"
57 "tolerate diff":
58 Tolerate unified diff (see 
59 .BR diff (1)
60 and
61 .BR patch (1))
62 appended *after* the signature (which usually makes the signature too long
63 to be detected). Not entirely consequent but sometimes useful, e.g. at the
64 linux kernel mailing list.
65 .TP
66 .B "\-e"
67 "ellipsis":
68 Squeezes a sequence of four or more dots, exclamation marks, or question marks
69 to only three dots or marks, respectively.
70 .TP
71 .B "\-h, \-\-help"
72 "help":
73 Displays a short help text with a summary on all options, and exits.
74 .TP
75 .BR "\-i" =FILE
76 "input file":
77 Defines a file for input; the default input is from '-' i.e. STDIN.
78 .TP
79 .BR "\-L" =DIRECTORY
80 "list footer directory":
81 Defines the directory which contains the mailing list footers (one footer
82 per file) which are to be tested when removing them with option
83 .BR -l .
84 .br
85 This option is also needed if you do not want signature lengths to be
86 counted wrong or fullquotes get undetected when a mailing list footer is
87 appended at the bottom of the message (especially when using 
88 .B "\-S"
89 or
90 .BR "\-t" ).
91 .TP
92 .B "\-l"
93 "list signature":
94 Hides "footers" (signatures) from mailing lists.
95 .br
96 .IR NOTE :
97 This requires a directory with footer files to be given with option
98 .BR "\-L" =DIRECTORY.
99 .TP
100 .B "\-m"
101 "microsoft TOFU":
102 Hides TOFU as given by some microsoft mailers. (You all sure know these
103 fullquotes beginning with
104 .br
105 "----- Original Message -----"
106 .br
107 and some header lines...)
108 .TP
109 .BR "\-M, \-\-mua" =MUA
110 "mail user agent":
111 Turn on special treatment for some mail user agents. (Right now only 
112 .BR mutt (1)
113 is supported, but more might be added in future.)
114 .TP
115 .BR "\-o" =FILE
116 "output file":
117 Define the file to be written *to*; the default output is to STDOUT.
118 .TP
119 .BR "\-p" =ADDRESS
120 "picky delivery:"
121 If we really find some TOFU, abort with exit code 
122 .IR EX_UNAVAILABLE .
123 Otherwise redirect the message to ADDRESS.
124 .sp
125 Intended for use from within mail delivery agents (MDAs) or mail transport 
126 agents (MTAs), so the message bounces if TOFU is detected, and does not get
127 on *your* nerves. :) 
128 .sp
129 .B PLEASE be careful not to bounce messages to mailing lists!
130 .TP
131 .BR "\-P" =MESSAGE
132 "user defined bounce message for picky delivery": 
133 You may specify your own bounce message to be returned when we try to deliver
134 an email and bounce it because there is TOFU inside.
135 .TP
136 .B "\-r"
137 "rip header off":
138 Hides all mail header lines.
139 .TP
140 .BR "\-S" [=n]
141 "supression of overlong signatures":
142 Signatures are to be n lines (not including the one containing dash-dash-space)
143 or less. If there are more, it is probably not that spirited after all. So
144 with this option you trade it for a
145 .B truely
146 nice line.
147 .br
148 If no n is given, default is 4. (\fINote\fR: We do not recommend using a 
149 value other than 4. Consider this old-fashioned, but we actually do *like*
150 RFC conformance.)
151 .sp
152 .IR
153 Note :
154 The line containing "-- " ist not counted when testing for an overlong 
155 signature, but it is included when displaying how many lines were deleted.
156 .TP
157 .B "\-s"
158 "signature deletion":
159 Hides signatures, i.e. all lines after a "signature dashes" line,
160 i.e. a line with three characters: dash-dash-space (no more, no less).
161 .TP
162 .B "\-t"
163 "TOFU deletion":
164 Hides "traditional style" TOFU, where each line begins with an
165 indent string like "> ".
166 .br
167 (You may edit the indent pattern in the script itself to suit your needs,
168 but it is surely
169 .I not
170 recommended at all.)
171 .TP
172 .B "\-w"
173 "whitespace deletion":
174 Hides trailing whitespace (sequences of space and tab).
175 CAVEAT:  This may lead to interesting effects with crossposts
176 between mailing lists or with undetected signature attempts.
177 .TP
178 .B "\-v, \-\-version"
179 "version info":
180 Prints the current version number and release date, and exit.
181 .SH TOFU?
182 TOFU is an abbreviation which mixes German and English words;
183 it expands to "text oben, full-quote unten" which means
184 "text above - full quote below" and describes the style of so
185 many users who let their mailer or newsreader quote everything
186 of the previous message and just add some text at the top;
187 obviously they think that quoted text must not be changed at all.
188 This is quite annoying as it needlessly sends a lot of data
189 even when it is not required. Some editing of messages is desired.
190 Please point these people to the page 
191 .I http://learn.to/edit_messages
192 - thank you!
193 .SH TROUBLESHOOTING
194 .TP
195 .IR Q :
196 I want to make my mailing list footer files match more different mailing
197 list footers. Can I use regular expressions, or how can I accomplish that?
198 .TP
199 .IR A :
200 Nope, regexp's do not work here. The comparison is made by the perl builtin
201 .IR index ()
202 function (see 
203 .B perldoc
204 for more detailed info), so you must exactly match the beginning of the
205 line. The longer the line you specify, the more precise the match; if
206 your line is empty you match unconditionally.
207 .PP
208 .TP
209 .IR Q :
210 I use the options -l and -L to supress mailing list footers when 
211 displaying messages in
212 .BR mutt (1).
213 This does work sometimes, but sometimes it does not: the footer is not
214 detected, and therefore full quotes are not deleted and signatures are
215 detected as too long (which they aren't).
216 .TP
217 .IR A :
218 This might occur if the message is badly encoded, so mutt cannot resolve
219 all encoded characters, e.g. if you have an encoded message on a mailing
220 list, and majordomo appends a mailing list footer in a different encoding
221 (or even plain us-ascii). "-- " simply does not match "--=20". 
222 .br
223 Another problem are non-us-ascii characters. Just avoid them, and 
224 everything should work fine.
225 .br
226 See the preceding Q+A for a solution.
227 .PP
228 .TP
229 .IR Q :
230 I want to write a message which contains parts that should *not* be 
231 deleted even when filtered with t-prot. Is this possible?
232 .TP
233 .IR A :
234 Yes, but please do not spread word of it. Make unobstrusive use of the
235 .I
236 verbatim
237 instruction:
238 .sp
239 #v+
240 .br
241 This line is protected from being filtered by t-prot !!!!!!!
242 .br
243 #v-
244 .br
245 Text coming now is not.
246 .SH AUTHOR AND COPYRIGHT
247 Written by Jochen Striepe <t-prot@tolot.escape.de>.
248 .br
249 Copyright \(co 2001, 2002 Jochen Striepe.
250 .PP
251 This is free software; you may use the source to whatever you like.
252 Just keep in mind to mention the original source of the script and the manpage
253 when you give it away. There is NO warranty; not even for MERCHANTABILITY or 
254 FITNESS FOR A PARTICULAR PURPOSE.
255 .SH IDEAS AND INSPIRATION
256 Many good ideas, bug reports and support from Sven Guckes <t-prot@guckes.net>,
257 Gerfried Fuchs, Christian Borss, Bjoern Buerger, Bjoern Laessig, Martin 
258 Neitzel and Ralf Doeblitz. 
259 Many thanks to all of them!
260 .sp
261 Many thanks to Gerhard H. Wrodnigg who uses a TOFU protection script
262 in order to keep the responses to his cancel bot reasonably short.  The
263 entire inspiration for this hack came from the "TOFU protection" line of
264 his script on many usenet postings.
265 .SH AVAILIBILITY
266 You can get the latest version from
267 .IR http://www.escape.de/users/tolot/mutt/ .
268 .SH BUGS
269 There is a problem when mutt gives a PGP verified or even a multipart
270 message to
271 .BR t-prot :
272 The information where the PGP encrypted/signed data or even attachments
273 begin and end is plainly embedded in the text, not really cleanly 
274 recognizeable for
275 .BR t-prot .
276 The problem should be worked around by now, please send a bug report if
277 it does not work for you.
278 .PP
279 The script still does not solve the "Kammquoting" problem: Some bad MUAs
280 wrap long lines, so a zig-zag shaped text block is the result. This is
281 harder readable, and considered bad style. Your line length should not
282 exceed 80 characters - better even stick to 72-75 chars, so some place
283 is left for quoting. An anti "Kammquote" option is planned for one of the
284 next
285 .B t-prot
286 releases.
287 .PP
288 There probably are many more bugs in this piece of software. Feel free to
289 fix them - it's
290 .BR perl ,
291 so you have the sources. Ah, and while you're at it, please drop a note to
292 the author - thanks in advance! 
293 .SH "REPORTING BUGS"
294 Please send your bug report to <t-prot-bugs@tolot.escape.de>.
295 .SH TODO
296 Fix bugs (see the 
297 .I BUGS
298 section). Beside that, all main features should be implemented by now.
299 .SH "SEE ALSO"
300 .BR mutt (1),
301 .BR muttrc (5)
302 and the part about "display_filter", 
303 .BR perl (1),
304 RFC822, 
305 .I http://got.to/quote/
306 (German language), 
307 .I http://learn.to/edit_messages/