1 .\" Copyright Jochen Striepe <t-prot@tolot.escape.de>, 2001-2002.
4 .\" $Id: t-prot.1,v 1.30 2002/03/22 11:38:35 jochen Exp $
6 .TH T-PROT "1" "March 2002" "T-PROT"
8 t-prot \- TOFU Protection - Display Filter for RFC822 messages
10 .BI "t-prot [" OPTIONS "]..."
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.
18 The filter is written in Perl and relies on input to be a single RFC822
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 .
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
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
39 "commercial signature":
40 Hides "footers" (signatures) from commercial email providers.
43 This requires a directory with footer files to be given with option
48 Squeezes a sequence of blank lines to just one blank line.
52 Print envelope info to syslog when bouncing TOFU contaminated email.
53 Default syslog facility is mail.debug. Requires
58 Tolerate unified diff (see
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.
68 Squeezes a sequence of four or more dots, exclamation marks, or question marks
69 to only three dots or marks, respectively.
73 Displays a short help text with a summary on all options, and exits.
77 Defines a file for input; the default input is from '-' i.e. STDIN.
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
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
94 Hides "footers" (signatures) from mailing lists.
97 This requires a directory with footer files to be given with option
102 Hides TOFU as given by some microsoft mailers. (You all sure know these
103 fullquotes beginning with
105 "----- Original Message -----"
107 and some header lines...)
109 .BR "\-M, \-\-mua" =MUA
111 Turn on special treatment for some mail user agents. (Right now only
113 is supported, but more might be added in future.)
117 Define the file to be written *to*; the default output is to STDOUT.
121 If we really find some TOFU, abort with exit code
123 Otherwise redirect the message to ADDRESS.
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
129 .B PLEASE be careful not to bounce messages to mailing lists!
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.
138 Hides all mail header lines.
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
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*
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.
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).
164 Hides "traditional style" TOFU, where each line begins with an
165 indent string like "> ".
167 (You may edit the indent pattern in the script itself to suit your needs,
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.
178 .B "\-v, \-\-version"
180 Prints the current version number and release date, and exit.
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
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?
200 Nope, regexp's do not work here. The comparison is made by the perl builtin
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.
210 I use the options -l and -L to supress mailing list footers when
211 displaying messages in
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).
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".
223 Another problem are non-us-ascii characters. Just avoid them, and
224 everything should work fine.
226 See the preceding Q+A for a solution.
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?
234 Yes, but please do not spread word of it. Make unobstrusive use of the
241 This line is protected from being filtered by t-prot !!!!!!!
245 Text coming now is not.
246 .SH AUTHOR AND COPYRIGHT
247 Written by Jochen Striepe <t-prot@tolot.escape.de>.
249 Copyright \(co 2001, 2002 Jochen Striepe.
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!
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.
266 You can get the latest version from
267 .IR http://www.escape.de/users/tolot/mutt/ .
269 There is a problem when mutt gives a PGP verified or even a multipart
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
276 The problem should be worked around by now, please send a bug report if
277 it does not work for you.
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
288 There probably are many more bugs in this piece of software. Feel free to
291 so you have the sources. Ah, and while you're at it, please drop a note to
292 the author - thanks in advance!
294 Please send your bug report to <t-prot-bugs@tolot.escape.de>.
298 section). Beside that, all main features should be implemented by now.
302 and the part about "display_filter",
305 .I http://got.to/quote/
307 .I http://learn.to/edit_messages/