From: Gerfried Fuchs Date: Wed, 17 Feb 2010 19:23:23 +0000 (+0100) Subject: Imported Upstream version 1.49 X-Git-Tag: upstream/1.49 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=84485b6c74f64257185f30753e2f0fd36ac1a33f;p=pkg%2Ft-prot.git Imported Upstream version 1.49 --- diff --git a/BUGS b/BUGS index e97e0b2..79c2eed 100644 --- a/BUGS +++ b/BUGS @@ -11,15 +11,20 @@ for known bugs. To report bugs, please drop an email to . Please do not report a bug if - * you found it in the TODO file or the BUGS section of the man page. + * you found it in the TODO file or the BUGS section of the man page. We do know those and try to fix them as soon as possible. - * you have an old t-prot version. If you encounter a problem, first + * you have an old t-prot version. If you encounter a problem, first see if there is a new t-prot version which fixes the issue. If you upgraded to the latest version and it *still* occurs, a bug report is just great. If you noticed a bug when processing a message and want to provide the -t-prot team with some useful info, please apply the latest debugging -patch from the contrib/ directory. Please read contrib/README.patches -carefully before applying the patch. - +t-prot team with some useful info, please: + * if invoking t-prot by mutt's $display_filter facility, just set +display_filter to something like "tee ~/foobar|t-prot " +and include ~/foobar in the bug report -- this way we might reproduce +the bug *much* easier if you are using a different environment than we +do. + * provide information on what command line options you use t-prot +with, what perl version t-prot runs on your system, and what else might +be important to enable us reproducing the bug. diff --git a/ChangeLog b/ChangeLog index 10d46f7..f9c0ac1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,211 +1,1376 @@ -2002-03-23 11:47 jochen +2005-02-02 13:46 Jochen Striepe + + * t-prot: Release as v1.49. + +2005-02-02 12:22 Jochen Striepe + + * t-prot: Torsten Veller spotted a violation of RFC 2822 in the + pgp() code when dealing with multi-line From: headers. Many thanks + for reporting! + +2005-02-01 15:38 Jochen Striepe + + * t-prot: Fix missing Locale value. + +2005-02-01 14:15 Jochen Striepe + + * t-prot: Fix another regex. + +2005-02-01 13:50 Jochen Striepe + + * t-prot: Fix regexes. + +2005-01-08 11:05 Jochen Striepe + + * t-prot.1: Fix broken link. + +2005-01-07 18:15 Jochen Striepe + + * contrib/t-prot.sl: Now that line breaks by the encoding are + better detected, we will turn on signature checking once again. + +2005-01-07 18:14 Jochen Striepe + + * contrib/t-prot.sl: Gregor Herrmann found some problems with + S-Lang variables and provided documentation improvements. + +2005-01-01 13:17 Jochen Striepe + + * t-prot.1: Fix typo. + +2005-01-01 13:14 Jochen Striepe + + * t-prot.1: T-prot's name does not have to be highlighted each time + it occurs. + +2005-01-01 13:12 Jochen Striepe + + * t-prot.1: Add note about t-prot fitting to recent mutt and gnupg + versions. + +2004-12-31 13:45 Jochen Striepe + + * t-prot: Release as v1.48. + +2004-12-31 13:39 Jochen Striepe + + * t-prot: Fix off-by-one error in TOFU code. + +2004-12-31 13:33 Jochen Striepe + + * t-prot: Gnupg-1.4.0 again changes the locales. Sigh. + +2004-10-25 22:50 Jochen Striepe + + * t-prot: Fix false positive reported by Gerfried Fuchs. Many + thanks! + +2004-10-21 16:16 Jochen Striepe + + * t-prot: Release as v1.47. + +2004-10-21 16:16 Jochen Striepe + + * t-prot: Fix --ftr-ad and --ftr-ml command line parsing and + initialisation. --ftr-ad implicitely sets -a, --ftr-ml implicitely + sets -l. Many thanks to Andre Berger. + +2004-10-21 15:13 Jochen Striepe + + * t-prot.1: Make the documentation for -a, -A, and --ftr-ad (resp. + -l, -L, and --ftr-ml) more elaborate. Many thanks to Andre Berger. + +2004-10-21 12:26 Jochen Striepe + + * t-prot.1: Try to explain -a and -l in more detail (without + confusing everyone). + +2004-10-21 12:13 Jochen Striepe + + * t-prot: Release as v1.46. + +2004-10-10 21:10 Jochen Striepe + + * contrib/t-prot.sl: Remove -S command line option as line counts + get wrong with quoted-printable (which gets more and more widely + used). + +2004-10-10 20:47 Jochen Striepe + + * t-prot, t-prot.1: Remove the groups flag within --check: This is + done easier inside filter_innd.pl (where it is actually implemented + already). + +2004-10-10 20:43 Jochen Striepe + + * t-prot: Realign global vars into three categories: command-line + switches, mutt locales, gnupg locales. This should be much more + readable. + +2004-10-10 20:27 Jochen Striepe + + * t-prot.1: Fix typo. Update date string. + +2004-10-10 20:26 Jochen Striepe + + * contrib/filter_innd.pl: Reject full quotes as well. + +2004-10-10 19:50 Jochen Striepe + + * t-prot: Performance fix. + +2004-10-10 19:47 Jochen Striepe + + * contrib/filter_innd.pl: Update comment. + +2004-10-10 19:28 Jochen Striepe + + * t-prot: Fix --check flags parsing to be stricter. + +2004-10-10 19:22 Jochen Striepe + + * t-prot: Fix --check flags parsing. + +2004-10-09 10:17 Jochen Striepe + + * t-prot: Release as v1.45. + +2004-10-09 10:08 Jochen Striepe + + * t-prot: Check for empty footer files before processing them. Many + thanks to Markus Hubig. + +2004-09-28 11:19 Jochen Striepe + + * t-prot: Release as v1.44. + +2004-09-28 11:19 Jochen Striepe + + * t-prot: Fix detection of MS-style TOFU within PGP signed + messages. Many thanks to Gerfried Fuchs for reporting. + +2004-09-27 17:45 Jochen Striepe + + * t-prot.1: Update time stamp. + +2004-09-27 17:40 Jochen Striepe + + * t-prot.1, contrib/filter_innd.pl: Add credits to Martin Dietze. + +2004-09-27 17:23 Jochen Striepe + + * t-prot: Release as v1.43. + +2004-09-27 17:22 Jochen Striepe + + * t-prot: Fix MS-style TOFU removal for attachments when invoked + from mutt. Many thanks to Gerfried Fuchs. + +2004-09-27 17:05 Jochen Striepe + + * t-prot: Fix typo, small performance enhancement. + +2004-09-27 15:27 Jochen Striepe + + * t-prot: Minor cleanup. + +2004-09-20 17:02 Jochen Striepe + + * contrib/filter_innd.pl: New file. + +2004-09-20 17:01 Jochen Striepe + + * t-prot, t-prot.1: Add INN2 filtering aids. New command line + switch --check. + + Release as v1.42. + +2004-09-20 14:13 Jochen Striepe + + * t-prot: Website http://learn.to/edit_messages/ is no longer + available. + +2004-08-28 11:50 Jochen Striepe + + * t-prot: Release as v1.41. + +2004-08-28 11:42 Jochen Striepe + + * t-prot, t-prot.1: Make t-prot use gnupg's locales as in + gpg-1.2.6. + +2004-08-07 16:57 Jochen Striepe + + * t-prot.1: Update Copyright date. + +2004-08-07 16:34 Jochen Striepe + + * t-prot: Fix last changes so attachments are separated by at least + one empty line (as done in the pgp code as well). + +2004-08-07 15:52 Jochen Striepe + + * t-prot: Release as v1.40. + +2004-08-07 15:51 Jochen Striepe + + * t-prot, t-prot.1: Add new option --ms-smart. Right now only + special pgp treatment is included (this fixes the behaviour when + there is a clear text pgp signed message embedded in some MS style + TOFU). + + This should work fine, but you never know what crap Outlook users + will send. So please give feedback if the results are not as they + should be. + +2004-08-07 13:37 Jochen Striepe + + * t-prot.1: Remove "require" line note. Update date string. + +2004-08-07 13:20 Jochen Striepe + + * t-prot: More checks on command line correctness. + +2004-08-07 12:58 Jochen Striepe + + * t-prot: Fix typo introduced with last update. + +2004-08-07 12:48 Jochen Striepe + + * t-prot: Fix "require" statement to match the code. + +2004-07-31 11:41 Jochen Striepe + + * t-prot: Release as v1.39. + +2004-07-31 11:10 Jochen Striepe + + * t-prot.1: Reflect locale changes in gnupg-1.2.5, update date + string. + +2004-07-31 10:41 Jochen Striepe + + * t-prot: Fix "be" gnupg locales. + + Update locales to newly released gnupg-1.2.5 (and be incompatible + to gnupg-1.2.4 and earlier once again, *sigh* -- however, that's + the price for not simply setting the LC vars to "C"...). + +2004-07-17 13:28 Jochen Striepe + + * t-prot, t-prot.1: Add option to have no output file. + +2004-04-25 01:51 Jochen Striepe + + * t-prot.1: Add warning regarding --pgp-move-vrfy and signals to + gpg. + +2004-03-02 16:57 Jochen Striepe + + * t-prot: Comment updated: Reflect the fact that no locales have + changed in mutt-1.4.2.1. + +2004-03-02 15:54 Jochen Striepe + + * muttrc.t-prot, t-prot.sl: Moved to contrib/. + +2004-02-11 16:05 Jochen Striepe + + * t-prot: Comment updated: Reflect the fact that no locales have + changed in mutt-1.4.2. + +2004-01-31 02:06 Jochen Striepe + + * t-prot.1: Fix copyright date. + +2004-01-30 15:20 Jochen Striepe + + * t-prot.1: Change --ftr to --ftr-ad, add --ftr-ml. + +2004-01-30 15:08 Jochen Striepe + + * t-prot: Release as v1.38. + +2004-01-30 14:38 Jochen Striepe + + * t-prot: Change --ftr option to --ftr-ad. Add --ftr-ml option. + Many thanks to Christian Wach for pointing at the problem. + +2004-01-30 14:31 Jochen Striepe + + * t-prot: Small performance fix in footer treatment. + +2004-01-21 13:46 Jochen Striepe + + * t-prot: Release as v1.37. + +2004-01-21 13:45 Jochen Striepe + + * t-prot: Fix processing if first attachment is of type + application/pgp. + +2004-01-21 13:39 Jochen Striepe + + * t-prot: Small performance fix. + +2003-12-29 17:06 Jochen Striepe + + * t-prot: Release as 1.36. + +2003-12-29 17:06 Jochen Striepe + + * t-prot: Fix Kammquote behaviour for words divided by a hyphen. + +2003-12-29 15:33 Jochen Striepe + + * t-prot.1: Update date string. + +2003-12-29 15:09 Jochen Striepe + + * t-prot, t-prot.1: Update locales for gnupg-1.2.4. + +2003-12-29 12:59 Jochen Striepe + + * t-prot: Mutt-1.4.1 has no support for SSL, so we may drop it + altogether. Mutt developer versions are handled in patches. + +2003-11-22 02:35 Jochen Striepe + + * t-prot: Fix comments for gpg and mutt locales. + +2003-11-20 14:51 Jochen Striepe + + * t-prot: Fixed --pgp-move-vrf: Obviously, gpg output should not be + interpreted as successful if a bug showed up (boy, I never saw this + with good old gnupg-1.0.7). + + Released as v1.35. + +2003-11-19 21:05 Jochen Striepe + + * t-prot: Release as v1.34. + +2003-11-19 20:58 Jochen Striepe + + * t-prot: Cosmetics. + +2003-11-19 20:45 Jochen Striepe + + * t-prot.1: Cosmetics. + +2003-11-19 20:43 Jochen Striepe + + * t-prot.1: Change time stamp. + +2003-11-19 20:43 Jochen Striepe + + * t-prot.1: Update man page to reflect last changes. + +2003-11-19 20:41 Jochen Striepe + + * t-prot: Update gpg's locales to gpg-1.2.3. Support for + gpg-1.0.7's locales is available as a patch. + +2003-11-19 20:11 Jochen Striepe + + * t-prot.1: Update man page to reflect last changes. + +2003-11-19 20:10 Jochen Striepe + + * t-prot: Removed option --mutt-ver for sanity reasons. Special + adapations for mutt developer versions will be available as a + patch. + +2003-09-10 11:32 Jochen Striepe + + * t-prot.1: Make clear t-prot.sl is just an example implementation. + Update date string. + +2003-09-10 11:30 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Additional comments. + +2003-08-11 14:35 Jochen Striepe + + * t-prot: Release as v1.33. + +2003-08-11 14:35 Jochen Striepe + + * t-prot.1: Improve description for --mutt-ver. + +2003-08-11 14:33 Jochen Striepe + + * t-prot.1: Update date string. + +2003-08-11 14:32 Jochen Striepe + + * t-prot: Clean up locales stuff. + +2003-08-11 14:19 Jochen Striepe + + * t-prot: Fix parsing order with --mutt-ver and --locale. + +2003-08-11 14:05 Jochen Striepe + + * t-prot.1: Add description for --mutt-ver. + +2003-08-11 14:00 Jochen Striepe + + * t-prot: Add some locale that changed in mutt-1.5.4 (and made pgp + block detection fail). New parameter --mutt-ver. Many thanks to + Gerfried Fuchs. + + Release as v1.32. + +2003-08-11 13:41 Jochen Striepe + + * t-prot: Simplify regex introduced in last update. + +2003-08-09 22:22 Jochen Striepe + + * t-prot: Fix some cases where SIGINT was not detected for pgp + verification from within mutt. + + Release as v1.31. + +2003-07-21 13:12 Jochen Striepe + + * t-prot: Release as v1.30. + +2003-07-21 13:12 Jochen Striepe + + * t-prot: Recognize LC_MESSAGES for locales. Thanks to Gerfried + Fuchs. + +2003-07-15 13:39 Jochen Striepe + + * t-prot: Release as v1.29. + +2003-07-15 13:38 Jochen Striepe + + * t-prot: Fix email adress verification inside pgp(). Fix locale + detection. + +2003-07-09 21:11 Jochen Striepe + + * t-prot: Use the environment variable LC_ALL (and if this fails, + LANG) to determine a reasonable locale default. Suggested by + Michael Olbrich. + + Release as v1.28. + +2003-06-24 23:52 Jochen Striepe + + * t-prot: Release as v1.27. + +2003-06-24 23:52 Jochen Striepe + + * t-prot: Getting some rare multipart message from mutt, t-prot got + locked into a probably endless 100% CPU consuming loop (see msgid + <20030624071950.GA24479@sil.at>). This was a DoS and therefore a + security problem if you use t-prot in some automated setup. This + bug was only triggered when used with -Mmutt. BTW, fixing this + should also increase performance when processing multipart messages + with -Mmutt. + + Many many thanks to Gerfried Fuchs for alerting us and pointing out + the DoS character of the bug (though most people might not use mutt + to do fully automated email processing). + +2003-06-24 22:44 Jochen Striepe + + * t-prot: Fix treatment of forwarded messages by Opera7. + +2003-06-23 14:10 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Quoted-printable treatment + (hopefully this will be obsolet with S-Lang-2.0) and some minor + fixes. + +2003-06-23 13:20 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Add missing semicolon. + +2003-06-23 12:58 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Fix error treatment. + +2003-06-22 23:47 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Make the tmp dir configurable, + correct some plain wrong comments, and add some more comments. + +2003-06-22 22:57 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Make the S-Lang example macro more + configurable (thanks to Gerfried Fuchs for some suggestions) and + provide a possibility to toggle filtering on/off from within slrn + (thanks to Michael Prokop for feedback). + +2003-06-15 22:53 Jochen Striepe + + * t-prot.1, t-prot.sl, contrib/t-prot.sl: Add some comments to + t-prot.sl and update the man page to mention the S-Lang example + macro. + +2003-06-15 22:33 Jochen Striepe + + * t-prot.sl, contrib/t-prot.sl: Added S-Lang macro to use t-prot + from within slrn(1). + +2003-05-04 12:40 Jochen Striepe + + * t-prot: Fix handling of empty lines in traditional TOFU code: + TOFU broken into parts by empty lines will be detected correctly + now, empty lines will not be deleted if there is no TOFU at all. + + Release as v1.26. + +2003-04-23 14:50 Jochen Striepe + + * t-prot: Finally fix thrown away verbatim information with + --pgp-move-vrf and -k (hope you had a happy Easter too). Many + thanks to Gerfried Fuchs. + + Release as v1.25. + +2003-04-03 13:26 Jochen Striepe + + * t-prot: Regex performance fixes. + +2003-03-20 02:09 Jochen Striepe + + * t-prot, t-prot.1: New locale in mutt-1.4.1: bg. + + Release as v1.24. + +2003-03-18 16:08 Jochen Striepe + + * t-prot: Clean up $0 usage. + +2003-03-08 17:05 Jochen Striepe + + * t-prot: Pure cosmetics. + +2003-03-08 16:48 Jochen Striepe + + * t-prot: Release as v1.23. + +2003-03-08 16:43 Jochen Striepe + + * t-prot: Fix another typo. + +2003-03-08 16:40 Jochen Striepe + + * t-prot: Fix typo in last commit. + +2003-03-08 16:37 Jochen Striepe + + * t-prot: Add a handler for SIGINT -- pgp() has to know if we got + an interrupt. Many thanks to Gerfried Fuchs. + +2003-03-08 02:24 Jochen Striepe + + * t-prot, t-prot.1: Add a workaround for old mutt versions using + the pagerfilter patch. Do not activate --lax-security unless you + really know what you are doing. + +2003-03-07 14:19 Jochen Striepe + + * t-prot: Ignore SIGINTs when called from within mutt. You probably + want the chance to stop PGP verification and still have the message + displayed. Idea by Peter Palfrader, suggested for t-prot by + Gerfried Fuchs. Thanks, great idea! + + Release as v1.22. + +2003-03-05 17:26 Jochen Striepe + + * t-prot: Release as v1.21. + +2003-03-05 17:15 Jochen Striepe + + * t-prot: Various performance fixes. + +2003-03-05 17:02 Jochen Striepe + + * t-prot: Another performance fix. + +2003-03-05 16:59 Jochen Striepe + + * t-prot: Fix multipart boundary detection. + +2003-03-05 16:53 Jochen Striepe + + * t-prot: Another performance fix in pgp(). + +2003-03-05 16:51 Jochen Striepe + + * t-prot: Fix bad typo. + +2003-03-05 16:35 Jochen Striepe + + * t-prot: Performance improvements in pgp(). + +2003-03-05 16:14 Jochen Striepe + + * t-prot: Make kammquote code more efficient. + +2003-03-05 16:09 Jochen Striepe + + * t-prot: Fix kammquote condition. + +2003-03-05 15:54 Jochen Striepe + + * t-prot: Some cosmetics, no code changes. + +2003-03-01 17:49 Jochen Striepe + + * t-prot: Formatting: Replace tabs with spaces. + +2003-03-01 17:46 Jochen Striepe + + * t-prot: Add some comments. + +2003-02-26 22:56 Jochen Striepe + + * t-prot.1: Reflect the fact that world has not stopped spinning + after RFC 822 (so far, at least). Mention RFCs 2045, 2046, 2049, + and 2822. Thanks to Thomas Bliesener for noticing. + +2003-02-26 22:32 Jochen Striepe + + * t-prot.1: Add an example for bouncing TOFU'ed messages using + sendmail(8). Add a note that -m/-t is needed for successful use of + -p. Thanks to Thomas Bliesener. + +2003-02-19 22:05 Jochen Striepe + + * t-prot: Release as v1.20. + +2003-02-19 21:53 Jochen Striepe + + * t-prot: Fix missing verbatim vals when moving gpg output. + +2003-02-17 15:00 Jochen Striepe + + * t-prot.1: Update Copyright date. + +2003-02-17 13:53 Jochen Striepe + + * t-prot: Fix moving gpg output for signatures by expired keys. + + Release v1.19. + +2003-02-17 13:35 Jochen Striepe + + * t-prot: Fix sender address for --pgp-short. + +2003-02-17 13:02 Jochen Striepe + + * t-prot: Remove unnecessary variable in write_msg(). + +2003-02-17 12:59 Jochen Striepe + + * t-prot: Regex performance improvements. + +2003-02-17 01:59 Jochen Striepe + + * t-prot: Fix mutt-pgp code: if we have nested signed/encrypted + mime parts, we must take care that all gpg output is printed. + + Release v1.18. + +2003-02-17 00:08 Jochen Striepe + + * t-prot: Make t-prot compile again on perl-5.6.1 (many thanks to + Brian Medley). + + Release v1.17. + +2003-02-14 14:50 Jochen Striepe + + * t-prot: Fix missing check. + +2003-02-14 14:42 Jochen Striepe + + * t-prot: Fix really annoying footer unflexibility. Now empty lines + on the bottom of a message are ignored. + + Release v1.16. + +2003-02-11 21:06 Jochen Striepe + + * t-prot: Fix --bigq for big quotes that go down to one of the two + last lines. + + Release v1.15. + +2003-02-11 13:49 Jochen Striepe + + * t-prot: Fix ad footers within pgp signed stuff. + +2003-02-11 13:42 Jochen Striepe + + * t-prot: Fix trailing empty lines ("match anything") in ad footer + files. + + Release v1.14. + +2003-02-09 20:34 Jochen Striepe + + * t-prot: Add support for mutt-1.5.x's OpenSSL output for S/MIME. + Thanks to Michael Loeffler. + + Clean up some regexps for mutt's separators (should give better + performance now). + + Release v1.13. + +2003-02-08 18:19 Jochen Striepe + + * t-prot, t-prot.1: Integrate the footers patch to allow aggressive + ad footer matching. + + Release v1.12. + +2003-02-08 17:44 Jochen Striepe + + * t-prot: Use constants where possible. + +2003-02-07 19:16 Jochen Striepe + + * t-prot: Fix two bugs in the Big Kammquote Condition. Using -k + should work again. + + Release v1.11. + +2003-02-07 18:26 Jochen Striepe + + * t-prot: Fix another terminal color sequence. + +2003-02-07 16:29 Jochen Striepe + + * t-prot.1: List contributors in alphabetical order. + +2003-02-07 16:00 Jochen Striepe + + * t-prot.1: Update date string. + +2003-02-07 15:55 Jochen Striepe + + * t-prot.1: Add a note to the BUGS section about possible perl + compiler errors with not-up-to-date perl installations. + +2003-02-07 11:51 Jochen Striepe + + * t-prot: Make --pgp-move-vrf work for BAD signatures too (many + thanks to Gerfried Fuchs). + + Release v1.10. + +2003-02-06 16:11 Jochen Striepe + + * t-prot: Last change broke attachment detection for -Mmutt. + +2003-02-06 15:37 Jochen Striepe + + * t-prot: Fix mutt terminal color sequences. Fix false positive for + overlong signatures with mutt-1.5.3 (MANY MANY thanks to Gerfried + Fuchs for reporting the bug and providing vital data!). + + Release v1.9. + +2003-01-29 03:24 Jochen Striepe + + * t-prot.1: Update date string. + +2003-01-29 03:23 Jochen Striepe + + * t-prot.1: Fix spellling error. + +2003-01-28 12:00 Jochen Striepe + + * t-prot: Make -h work again. + + Version bump to 1.8. + +2002-12-29 03:52 Jochen Striepe + + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Enable + spamassassin workaround. Update man page and sample config file + accordingly. + + Correct some speling errors in the man page. + + Bump to v1.7. + +2002-12-11 18:53 Jochen Striepe + + * t-prot: Mutt content type fix. + + Version bump to 1.6. + +2002-12-11 01:46 Jochen Striepe + + * t-prot: Improve M$ style TOFU heuristics. + + Bump to v1.5. + +2002-12-08 22:45 Jochen Striepe + + * t-prot: Remove unused else. + +2002-12-06 16:21 Jochen Striepe + + * t-prot: Fix treatment of pgp uids without email adress for + --pgp-move. Many thanks to Gerfried Fuchs for noticing. + + Small performance fix for --pgp-move-vrf. + + Bump to v1.4. + +2002-12-04 20:45 Jochen Striepe + + * t-prot: Fix --pgp-short to be overzealous with gpg encryption + output. + + Version bump to 1.3. + +2002-12-04 09:06 Jochen Striepe + + * t-prot.1: Another --locale fix. + +2002-12-04 09:01 Jochen Striepe + + * t-prot.1: Update --locale description. + +2002-12-03 18:20 Jochen Striepe + + * t-prot: Add internationalization for --pgp-move-vrf from + gnupg-1.0.7's po files. Should work with gnupg-1.2.x as well. + + Bump to v1.2. + +2002-12-02 21:04 Jochen Striepe + + * t-prot.1: Update man page date string. + +2002-12-02 21:03 Jochen Striepe + + * t-prot.1: Make last man page update more complete. + +2002-12-02 21:00 Jochen Striepe + + * t-prot, t-prot.1: Add an option to move only positive pgp + verification output (this works for English gpg-1.0.7 right now -- + no internationalization, no pgp.com support). Thanks to Markus + Hubig for suggesting. + +2002-11-11 02:59 Jochen Striepe + + * t-prot: Version 1.0. + +2002-11-09 02:22 Jochen Striepe + + * t-prot.1: Man page update. + +2002-11-09 01:53 Jochen Striepe + + * t-prot: Adding comment for pgp(). + +2002-11-05 13:29 Jochen Striepe + + * t-prot: Fix a race condition introduced in 0.70. Many many thanks + to Wichert Akkerman and Gerfried Fuchs. + + Bump to v0.94. + +2002-11-04 19:01 Jochen Striepe + + * t-prot: Fix typo from last submission. + + Bump to v0.93. + +2002-11-04 18:49 Jochen Striepe + + * t-prot: Markus Hubig noticed a bug in the kammquote condition + that ate the first (empty) line of pgp signed data when using + t-prot within mutt. Many thanks! + + Version bump to 0.92. + +2002-11-02 16:35 Jochen Striepe + + * t-prot: Replace all die()s with exit()s and appropriate exit + codes for better interaction with MTAs. + + Bump to v0.91. + +2002-11-02 16:08 Jochen Striepe + + * t-prot: Minor changes. + +2002-11-02 01:05 Jochen Striepe + + * t-prot.1: Update man page modification stamp. + +2002-11-01 18:30 Jochen Striepe + + * t-prot, t-prot.1: Merge the pgp hack after solving the last + pending bug report (thanks to Markus Hubig). Update the man page to + represent changes. + + Huge version jump to v0.90: this is a release candidate for v1.0, + every main feature should work fine by now. Please tell me *now* if + something does not work for you (or if you have a major feature + request that should be considered before v1.0). + +2002-10-31 18:29 Jochen Striepe + + * t-prot: Eye candy: People using vim with a tabwidth!=4 should see + the source with proper alignment now. + +2002-10-31 14:17 Jochen Striepe + + * t-prot: T-prot would cheerfully create an output file without + checking to see if it was about to write to a symlink or a named + pipe. If a user used t-prot to write data into open shared + directories, such as /tmp, this vulnerability could be used by a + local attacker to overwrite files or lead to privilege escalation. + + Bump to v0.70. + +2002-10-22 16:42 Jochen Striepe + + * t-prot: Add French M$ tofu detection (many thanks to Mikael + Berthe for suggesting). + +2002-10-19 17:22 Jochen Striepe + + * t-prot: Using any of --kminl, --kmaxl, or --kdiff implicitely + activates -k. + + Specifying an empty string for -i or -o is no longer tolerated. + + Version bump to 0.69. + +2002-10-19 16:15 Jochen Striepe + + * t-prot: Support for Dutch(?) M$-style TOFU markers. + +2002-09-14 05:24 Jochen Striepe + + * t-prot: Fixed thinko in M$ TOFU/Forwarding treatment. + +2002-09-14 05:10 Jochen Striepe + + * t-prot: Johan Almqvist found another bug, this time false + positives with some M$ MUA's forwarded messages. + +2002-09-12 12:59 Jochen Striepe + + * t-prot: Add swedish M$ TOFU detection. Thanks to Johan Almqvist + for noticing. Bumped to v0.68. + +2002-07-26 14:03 Jochen Striepe + + * t-prot: Eye candy: add vim-6.x compliant folding comments. + +2002-07-09 14:07 Jochen Striepe + + * t-prot: Try better heuristics for M$ style TOFU. Gerfried Fuchs + had some very reasonable ideas + (<20020705143319.GH11482@asgard.pte.at>, 2002-07-05). We now + tolerate MS style TOFU if there is no text above. + + Version bump to v0.67. + +2002-06-27 21:37 Jochen Striepe + + * t-prot: Fix unbelievable stupid typo introduced in the last + commit. + + Bump to v0.66. + +2002-06-27 19:54 Jochen Striepe + + * t-prot: Fix detection of mailing list footers in attachments + within attachments. + + Bump to v0.65. + +2002-06-27 18:16 Jochen Striepe + + * t-prot, t-prot.1: Fix thinko where to search for mailing list + footers, bug reported by Gerfried Fuchs (many thanks!). + + Update manpage to make clear -Mmutt is *required* when t-prot is + called from within mutt. + + Bump to v0.64. + +2002-06-18 01:45 Jochen Striepe + + * t-prot: Another tweak on the kammquote condition. + +2002-06-16 12:32 Jochen Striepe + + * t-prot: Fixed the line count header with -Mmutt and attachments, + pgp signatures and encryption. + +2002-06-15 17:18 Jochen Striepe + + * t-prot: Another tweak on the kammquote condition. + +2002-06-08 19:50 Jochen Striepe + + * muttrc.t-prot, contrib/muttrc.t-prot: Add warning comment about + required mutt version. + +2002-06-02 07:51 Jochen Striepe + + * t-prot: Fixed some typos. + +2002-06-02 07:12 Jochen Striepe + + * t-prot.1: Updated manpage. The Kammquote problem should be mostly + solved by now. + +2002-06-02 02:12 Jochen Striepe + + * t-prot, t-prot.1: New option --sigsmax for fine-tuning the + tolerated number of signatures. Manpage updated. Version bump to + v0.61. + +2002-05-30 11:24 Jochen Striepe + + * t-prot: Update help to reflect -p changes. + +2002-05-30 11:16 Jochen Striepe + + * t-prot: Bump to v0.60. + +2002-05-30 10:45 Jochen Striepe + + * t-prot.1: Update manpage for new behaviour of -p. + +2002-05-10 02:18 Jochen Striepe + + * t-prot: Add some quick hack to make t-prot an easy drop-in for + spamassassin: the parameter for -p is optionally right now. If + there is none supplied, there is no mail sent, of course. + +2002-05-03 02:02 Jochen Striepe + + * t-prot.1: Fix typo. + +2002-05-03 01:56 Jochen Striepe + + * t-prot.1: Update man page date. + +2002-05-03 01:55 Jochen Striepe + + * t-prot.1: Man page fixes and updates. + +2002-04-30 17:23 Jochen Striepe + + * t-prot: Improve the comment on the Kammquote condition. + +2002-04-30 17:16 Jochen Striepe + + * t-prot: Further tweak on the Kammquote condition. Should really + do The Right Thing by now. + +2002-04-24 14:08 Jochen Striepe + + * t-prot: Performance tweak in debigq(). + +2002-04-24 13:33 Jochen Striepe + + * t-prot, t-prot.1: Added an option to remove the bigger part of + huge blocks of quoted lines (--bigq). Updated the man page + accordingly. + + Updated the man page's contributors text. + + Bump to v0.58. + +2002-04-20 21:32 Jochen Striepe + + * t-prot: Just insert one space when joining lines in decomb(). + +2002-04-20 15:37 Jochen Striepe + + * t-prot.1: Update man page to reflect upon new options --kminl, + --kmaxl, and --kdiff. + +2002-04-20 15:18 Jochen Striepe + + * t-prot: Some more tweaks to the Kammquote condition. Add some + command line switches to make behaviour a little more flexible. + + Bump to v0.57. + +2002-04-20 11:10 Jochen Striepe + + * t-prot: Another small tweak in the Kammquoting condition. + +2002-04-20 11:03 Jochen Striepe + + * t-prot: Another small tweak in the Kammquote condition. + +2002-04-20 10:58 Jochen Striepe + + * t-prot: Make the Kammquote condition a little pickier. + +2002-04-20 02:48 Jochen Striepe + + * t-prot.1: Add description of the anti Kammquoting option. + +2002-04-20 02:28 Jochen Striepe + + * t-prot: Added an option to fix those zig-zag shaped quotings, + well-known to German users as "Kammquoting". + + Lines with verbatim statements (#v+/-) itselves are now verbatim by + definition, so they won't be cleaned away. + + Bumped to v0.56. + +2002-04-18 22:51 Jochen Striepe + + * t-prot: Clean up revision number a bit. + +2002-04-11 05:14 Jochen Striepe + + * t-prot: Just catch the last signature if there are more. + +2002-04-11 04:46 Jochen Striepe + + * t-prot: Hugo Haas reported that t-prot did not detect TOFU if + there is an overlong signature and no -S on the command line. + Though this was intended behaviour, this is changed: by now + signatures are always interpreted as such, so the text before can + be parsed properly. + +2002-03-29 01:46 Jochen Striepe + + * t-prot.1: Add description for --locale=LOCALE. + +2002-03-29 01:15 Jochen Striepe + + * t-prot: Add option to treat mutt(1)'s locales correctly. Bump to + v0.55. + +2002-03-23 10:47 Jochen Striepe * t-prot: Fix typo. -2002-03-22 12:38 jochen +2002-03-22 11:38 Jochen Striepe * t-prot.1: Add ghw to the IDEAS AND INSPIRATION section. -2002-03-21 23:26 jochen +2002-03-21 22:26 Jochen Striepe * t-prot: Bump to 0.54. -2002-03-21 14:16 jochen +2002-03-21 13:16 Jochen Striepe * t-prot: More cleanups in the multipart code. -2002-03-21 13:53 jochen +2002-03-21 12:53 Jochen Striepe * t-prot: Fix comment in the mutt specific multipart code. -2002-03-21 13:27 jochen +2002-03-21 12:27 Jochen Striepe * t-prot: Fixed assumption in the mutt-specific code that the first attachment always would be text/plain containing the actual message text. -2002-03-20 23:58 jochen +2002-03-20 22:58 Jochen Striepe * t-prot: Fix some false positives in footers and multipart code. -2002-03-20 18:02 jochen +2002-03-20 17:02 Jochen Striepe * t-prot: More cleanups and performance improvements. Fixed tofu deletion when diff appended to signature. Fixed broken detection of mutt(1)'s mime/pgp output. Bumped to 0.53. -2002-03-20 16:12 jochen +2002-03-20 15:12 Jochen Striepe * t-prot: Make mime/multipart parts with type=message/rfc822 being processed if the message has been processed by mutt(1) before. -2002-03-20 14:16 jochen +2002-03-20 13:16 Jochen Striepe * t-prot: Another HUGE cleanup. -2002-03-20 02:56 jochen +2002-03-20 01:56 Jochen Striepe * t-prot: Major cleanup. Bump to 0.52. -2002-03-19 15:16 jochen +2002-03-19 14:16 Jochen Striepe * t-prot: Fixed some bugs in the multipart code. Bumped version to 0.51. -2002-03-19 13:42 jochen +2002-03-19 12:42 Jochen Striepe * t-prot.1: Add note describing the complicated and confusing line count thingie when deleting an overlong signature. -2002-03-19 13:38 jochen +2002-03-19 12:38 Jochen Striepe * t-prot: Correct line count in snipped-overlong-sig message. -2002-03-18 20:19 jochen +2002-03-18 19:19 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Add new options (-a and -A=dir) - to get rid of those annoying hotmail advertisements appended to - messages from people using gratis email providers. Update manpage - and muttrc sample. + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Add new + options (-a and -A=dir) to get rid of those annoying hotmail + advertisements appended to messages from people using gratis email + providers. Update manpage and muttrc sample. Add non-usascii-problem to TROUBLESHOOTING section of the man page. Bump to v0.50. -2002-03-18 16:49 jochen +2002-03-18 15:49 Jochen Striepe * t-prot: Fix the line count header. Bump to v0.49. -2002-03-16 01:01 jochen +2002-03-16 00:01 Jochen Striepe * t-prot.1: Minor fix. -2002-03-16 00:58 jochen +2002-03-15 23:58 Jochen Striepe * t-prot.1: Minor cleanup. -2002-03-15 02:48 jochen +2002-03-15 01:48 Jochen Striepe * t-prot: Fix variables initialisation. -2002-03-14 23:21 jochen +2002-03-14 22:21 Jochen Striepe * t-prot: Fix a bug in the multipart code. Bump to v0.48. -2002-03-13 09:07 jochen +2002-03-13 08:07 Jochen Striepe * t-prot.1: Add some explanation for the verbatim instruction to the troubleshooting section. -2002-03-13 08:52 jochen +2002-03-13 07:52 Jochen Striepe * t-prot: Make verbatim instructions work for everything except mailing list footers. Bump to v0.47. -2002-03-13 02:19 jochen +2002-03-13 01:19 Jochen Striepe * t-prot.1: Fixed typo. -2002-03-12 18:16 jochen +2002-03-12 17:16 Jochen Striepe * t-prot.1: Add TROUBLESHOOTING section. -2002-03-12 17:44 jochen +2002-03-12 16:44 Jochen Striepe * t-prot.1: Changed one makro which was overseen last commit. -2002-03-12 17:24 jochen +2002-03-12 16:24 Jochen Striepe * t-prot.1: Big man page cleanup. -2002-03-12 16:41 jochen +2002-03-12 15:41 Jochen Striepe * t-prot.1: Further improvement of the -L man page text. -2002-03-12 16:39 jochen +2002-03-12 15:39 Jochen Striepe * t-prot.1: Improved man page text for -L. -2002-03-12 16:37 jochen +2002-03-12 15:37 Jochen Striepe * t-prot.1: Clarify the man page text for -l and -L. -2002-03-12 03:47 jochen +2002-03-12 02:47 Jochen Striepe * t-prot, t-prot.1: Add the "tolerate diff" option. Bump to v0.46. -2002-03-09 18:18 jochen +2002-03-09 17:18 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Add option -M/--mua and try to - detect attachments only when necessary. Updated man page and - muttrc sample. Version bump to 0.45. + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Add + option -M/--mua and try to detect attachments only when necessary. + Updated man page and muttrc sample. Version bump to 0.45. -2002-03-08 21:29 jochen +2002-03-08 20:29 Jochen Striepe * t-prot: Fix an off-by-one error when removing mutt(1)'s attachments. Credits to Gerfried Fuchs for reporting and locating the bug. -2002-03-02 03:26 jochen +2002-03-02 02:26 Jochen Striepe * t-prot: Some minor cleanups. -2002-03-02 03:18 jochen +2002-03-02 02:18 Jochen Striepe * t-prot: Some minor cleanups. -2002-03-01 11:10 jochen +2002-03-01 10:10 Jochen Striepe * t-prot: Fixed a missing range check reported by Gerfried Fuchs with messages only containing the mailing list footer. -2002-02-26 13:20 jochen +2002-02-26 12:20 Jochen Striepe * t-prot: Add infrastructure for better debugging. -2002-02-26 12:11 jochen +2002-02-26 11:11 Jochen Striepe - * muttrc.t-prot: Make the muttrc example a little shorter, and add - colors. + * muttrc.t-prot, contrib/muttrc.t-prot: Make the muttrc example a + little shorter, and add colors. -2002-02-26 04:05 jochen +2002-02-26 03:05 Jochen Striepe * t-prot: Improve empty line handling between body and signature. -2002-02-26 03:50 jochen +2002-02-26 02:50 Jochen Striepe * t-prot: Fixed thinko in signature handling. Be more tolerant with empty lines around signatures and mailing list footers. Version bump to 0.42. -2002-02-25 20:20 jochen +2002-02-25 19:20 Jochen Striepe * t-prot: Widened the rexexp for mutt(1)'s attachments a little - some cases were not caught before. -2002-02-25 19:48 jochen +2002-02-25 18:48 Jochen Striepe * t-prot: Gerfried Fuchs found a bug in the signature code (many thanks!). It was ugly anyway, so that part got a clean rewrite. Bumped version to 0.41. -2002-02-22 16:55 jochen +2002-02-22 15:55 Jochen Striepe * t-prot: Another slight performance hit with multipart messages. -2002-02-22 16:36 jochen +2002-02-22 15:36 Jochen Striepe * t-prot: Leave only the body of the first multipart message part for processing, not the headers. -2002-02-22 00:27 jochen +2002-02-21 23:27 Jochen Striepe * t-prot.1: Updated the manpage to reflect the fix of the multipart bug. -2002-02-22 00:24 jochen +2002-02-21 23:24 Jochen Striepe * t-prot: Fix no TOFU is detected in multipart messages without signature and without previous preparation by mutt(1). Now @@ -213,25 +1378,25 @@ Only the first part is processed, and only if it has the content type "text/plain" or none specified as described in RFC 1341. -2002-02-20 17:51 jochen +2002-02-20 16:51 Jochen Striepe * t-prot: Bump version to 0.39. -2002-02-20 17:50 jochen +2002-02-20 16:50 Jochen Striepe * t-prot.1: Updated manpage for long options. -2002-02-18 20:44 jochen +2002-02-18 19:44 Jochen Striepe * t-prot.1: Updated credits in manpage. -2002-02-16 01:06 jochen +2002-02-16 00:06 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Switched command line system to - Getopt::Mixed as recommended by Gerfried Fuchs. One of the reasons - is that now the parameter of the option '-S' is optionally, what - was not cleanly realizeable before. The opportunity has been used - to do a cleanup on some things, too ... + * muttrc.t-prot, t-prot, contrib/muttrc.t-prot, t-prot.1: Switched + command line system to Getopt::Mixed as recommended by Gerfried + Fuchs. One of the reasons is that now the parameter of the option + '-S' is optionally, what was not cleanly realizeable before. The + opportunity has been used to do a cleanup on some things, too ... Please note that Getopt::Mixed now is mandatory to run t-prot - you can get it at CPAN. The trade-off seems worthy IMHO - please drop @@ -240,107 +1405,110 @@ Updated manpage. -2002-02-15 04:49 jochen +2002-02-15 03:49 Jochen Striepe * t-prot.1: Beautify the manpage, and add some more info about bugs and todos. -2002-02-15 04:30 jochen +2002-02-15 03:30 Jochen Striepe * t-prot: Beautify help text. -2002-02-14 17:32 jochen +2002-02-14 16:32 Jochen Striepe * t-prot, t-prot.1: Bjoern Buerger requested an option to make t-prot write a syslog entry for each message bounced when invoked with -p. So -d is new. Will only write syslog entries if Sys::Syslog is available but will not crash if not. -2002-02-14 14:26 jochen +2002-02-14 13:26 Jochen Striepe * t-prot: Minor cleanup. -2002-02-14 12:04 jochen +2002-02-14 11:04 Jochen Striepe * t-prot: Fix unbelieveable stupid bug in attachment fix. Bump to v0.36. -2002-02-13 02:08 jochen +2002-02-13 01:08 Jochen Striepe * t-prot: Version bump to 0.35. -2002-02-12 14:57 jochen +2002-02-12 13:57 Jochen Striepe * t-prot, t-prot.1: Added Option -P=MESSAGE. Updated manpage. -2002-02-12 13:47 jochen +2002-02-12 12:47 Jochen Striepe * t-prot.1: Update manpage for -S=n. -2002-02-12 13:45 jochen +2002-02-12 12:45 Jochen Striepe - * muttrc.t-prot, t-prot: Improve bounce message. Change option -S - to accept an integer denoting the maximum allowed lines for a valid - signature. + * muttrc.t-prot, contrib/muttrc.t-prot, t-prot: Improve bounce + message. Change option -S to accept an integer denoting the maximum + allowed lines for a valid signature. -2002-02-12 05:44 jochen +2002-02-12 04:44 Jochen Striepe * t-prot, t-prot.1: New option -p=ADDRESS added: Finally you may use t-prot in your MTA's aliases file to bounce TOFUed emails. Manpage updated. -2002-02-12 02:03 jochen +2002-02-12 01:03 Jochen Striepe * t-prot: Corrected help when called with -h. Small indent cleanup. -2002-02-11 21:40 jochen +2002-02-11 20:40 Jochen Striepe * t-prot.1: Updated manpage date. -2002-02-11 21:33 jochen +2002-02-11 20:33 Jochen Striepe * t-prot, t-prot.1: Gerfried Fuchs reported that t-prot eats up attachments when hiding lines, that flaw should be fixed right now. Manpage has been updated to reflect upon that fact. -2002-02-11 20:13 jochen +2002-02-11 19:13 Jochen Striepe * t-prot: Corrected line count for overlong signatures. Problem reported by Gerfried Fuchs (thanks, Alfie!). -2002-01-29 15:57 jochen +2002-01-29 14:57 Jochen Striepe * t-prot: Remove goto. Patch by Gerfried Fuchs . -2002-01-28 21:34 jochen +2002-01-28 20:34 Jochen Striepe * t-prot: Bump version to 0.32. -2002-01-28 17:53 jochen +2002-01-28 16:53 Jochen Striepe * t-prot: Just again a version fix. Should be done now... -2002-01-28 17:52 jochen +2002-01-28 16:52 Jochen Striepe * t-prot: Sigh. Another version fix. -2002-01-28 17:50 jochen +2002-01-28 16:50 Jochen Striepe * t-prot.1: Fix manpage version. -2002-01-28 17:48 jochen +2002-01-28 16:48 Jochen Striepe * t-prot, t-prot.1: Fix version strings. -2002-01-28 17:46 jochen +2002-01-28 16:46 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Version cleanup. + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Version + cleanup. -2002-01-28 17:39 jochen +2002-01-28 16:39 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Initial revision + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Initial + version. -2002-01-28 17:39 jochen +2002-01-28 16:39 Jochen Striepe - * muttrc.t-prot, t-prot, t-prot.1: Initial version. + * muttrc.t-prot, t-prot, t-prot.1, contrib/muttrc.t-prot: Initial + revision diff --git a/README b/README index 3636629..fe1eac8 100644 --- a/README +++ b/README @@ -14,41 +14,32 @@ thank you! 2. What does the script do? - It detects, and when demanded hides annoying parts in rfc822 messages: - TOFU, signatures (especially when they are too long), excessive - punktuation, blocks of empty lines, trailing spaces and tabs. - For use inside of MTAs or MDAs it may exit with appropriate libc exit + It detects, and when demanded hides annoying parts in rfc822 messages: + TOFU, huge quoted blocks, signatures (especially when they are too long), + excessive punktuation, blocks of empty lines, trailing spaces and tabs. + For use inside of MTAs or MDAs it may exit with appropriate libc exit codes, so annoying messages may be bounced easily. 3. For what can I use it? There are several possibilities. One is to filter your email or news - messages when displaying them in your MUA. Another is blocking annoying - messages entirely from your system - using the script in some sendmail - or procmail rule, or perhaps even inside innd. + messages when displaying them in your User Agent. Another is blocking + annoying messages entirely from your system - using the script in some + sendmail (see the man page for an example) or procmail rule, or even + inside innd. 4. Give me some example! What about an example configuration for the MUA - mutt(1)? + mutt(1), or the NUA slrn(1)? An example is included in the distribution. Please see the man page for further details on the activated features. -5. And what about other MUAs? - I just use mutt, so I do not know how to filter messages in other MUAs. - If you know how to incorporate t-prot e.g. in Gnus, please just drop me - a note. ;) +5. And what about other User Agents? + I just use mutt and slrn, so I do not know how to filter messages in + other User Agents. If you know how to incorporate t-prot e.g. in Gnus, + please just drop me a note. ;) -6. And what about an example for bouncing emails? - Put a line like the following in your /etc/mail/aliases: - ------SNIPP------ - notofu: |"/usr/local/bin/t-prot -cemtS -p=user@mydomain" - ------SNIPP------ - (Do not forget to call `newaliases`.) Messages for notofu@mydomain will - be scanned for TOFU. If t-prot found TOFU in a message, it will bounce, - otherwise it will be forwarded to user@mydomain. This works great with - sendmail, if you use another MTA you probably have to adapt it. - -7. Where did the idea come from? - 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 +6. Where did the idea come from? + 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 entire inspiration for this hack came from the "TOFU protection" line of his script on many usenet postings. diff --git a/TODO b/TODO index 16f6fea..73a5f44 100644 --- a/TODO +++ b/TODO @@ -1,26 +1,61 @@ TODO LIST FOR T-PROT ==================== -Ordered by priority (highest comes first): +For more issues and/or some details, please see the BUGS section of +the man page. - * Fix internationalization bug with mutt(1) reported by Christian -Borss: If you use mutt with locales for languages other than English, -most probably detection of mutt's multipart lines (attachments, pgp -validation, ...) will fail. A workaround is to call mutt with LC_ALL=C -for now (OK, you won't have localization then, but at least t-prot works -fine, and it will be fixed ASAP anyway). +To report bugs, please first see the BUGS file. +To make suggestions or tell about features you miss, please drop an +email to . - * Add an option to repair "Kammquotings". - * Better heuristics for M$ style TOFU. The actual algorithm is very -greedy (actually, it simply snipps everything down to the signature). -Perhaps add an option to toggle between both behaviours. Comments welcome. +Known Bugs (more severe ones come first) +======================================== + * In raw multipart messages we snip MS-like TOFU even if there +is no relevant text above -- we will have to detect Boundaries and +Content-Type lines as for "$mua eq mutt" in t-prot, l.1142. -For more issues and/or some details, please see the BUGS section of the -manpage. +Wishlist +======== + * Better heuristics for M$ style TOFU. The actual algorithm still +is just too greedy (actually, it simply snips most things down to the +signature). User ignorance makes it tricky to detect gold inside the +crap, though. As always, comments and ideas are welcome. -To report bugs, please first see the BUGS file. -To make suggestions or tell about features you miss, please drop an email -to . + * New option to block-align lines of text. Should be especially +pleasing when used together with -k (you could re-align a whole para- +graph using these both). + + +Rejected issues +=============== + * If you set mutt's display_filter to "tee foo" when viewing a pgp +signed message and attach the resulting file to a pgp signed message, +the result is confusion when displaying this new message with t-prot. + +This sounds much like "garbage in, garbage out", so just keep in mind +that the whole idea behind t-prot using the display_filter thing is +that you can turn it off with just one key stroke. It is definitely not +t-prot's responsibility to make *everything* look good and readable. + + + +Known Bugs for t-prot.sl (more severe ones come first) +====================================================== + * Mailing list footers seem not always to be snipped correctly +from MIME/multipart messages if called by t-prot.sl. + + +Wishlist for t-prot.sl +====================== +Known problems: + * t-prot.sl interacts badly with some other macros using the +read_article_hook. + * ESC-0/ESC-1 as described in t-prot.sl does not take effect on the +article currently displayed (just on those processed later on). +Please remember that t-prot.sl is an *example* script (for you to get +an idea on how to integrate t-prot into other software), so these are +really low priority. However, patches in unified diff format are always +welcome. ;) diff --git a/contrib/README.examples b/contrib/README.examples new file mode 100644 index 0000000..3c0d440 --- /dev/null +++ b/contrib/README.examples @@ -0,0 +1,31 @@ +T-PROT EXAMPLES +=============== + +Here are some examples on how to use t-prot effectively with other +programs. + + +muttrc.t-prot +============= +You can use the `source' statement to include this into your mutt[1] +configuration file -- /etc/Muttrc system-wide, or ~/.muttrc for your +very personal configuration. + +t-prot.sl +========= +A small S-Lang macro to show how to use t-prot from within slrn[2]. +Please note that there are still some problems with this macro -- +see the TODO file for details. + +filter_innd.pl +============== +An example for using t-prot to reject messages containing TOFU or +excessive quoting by your INN2. Many thanks to Martin Dietze (who +gave me the whole idea)[3]. + + +Links: +====== +[1] http://www.mutt.org/ +[2] http://slrn.sourceforge.net/ +[3] http://www.fh-wedel.de/pub/fh-wedel/staff/herbert/linux/ diff --git a/contrib/README.patches b/contrib/README.patches index 492c756..8a66aea 100644 --- a/contrib/README.patches +++ b/contrib/README.patches @@ -1,29 +1,109 @@ +T-PROT PATCHES +============== + +These t-prot patches still did not make it into vanilla t-prot, mostly +for one of these reasons: They decrease performance, accuracy, flexibility, +reliability or are hard to maintain. + +Still, there might be a chance to have them included into vanilla t-prot: +You can send an email to the author and ask him to include this or that +specific patch because you *need* it. + +Remember, filtering is a trade-off. If *many* people need a specific patch, +odds are high for it to be included into vanilla t-prot, even though there +are some drawbacks with it. If you keep silent, the patch will be dropped +at some time, because noone seems to need it. + + +Some patches are there because they bring *big* changes and need some more +testing. So if you use these patches, please send an email to the author, +and give some feedback on how well the patch works. It will be most helpful +to decide if some specific feature makes it into vanilla t-prot. + + + +RECENT PATCHES +============== + +t-prot-*-gpg1*.diff +=================== +Your distribution's gnupg version is not quite up-to-date, and you want +to use a current t-prot version with it? No problem, this patch changes +the locales back to a not so current gpg version. + +Please note that this patch will most likely be applied by your t-prot +package maintainer if the distribution makes use of an old gnupg version. + +t-prot-*-mutt15*.diff +===================== +You want to be on the bleeding edge, using a developer version of mutt? +No problem, this patch changes the locales so most things should work +smoothly. Please send a bug report if there are some great new features +in the new mutt which break anything inside t-prot. + +Please note that this patch will most likely be applied by your t-prot +package maintainer if the distribution makes use of mutt-1.5.4 or newer, +e.g. Debian Testing/Unstable. + + +OBSOLETE PATCHES +================ + +t-prot-*-adjtz.diff +=================== +This patch has been dropped. Noone seems to make use of it, and it +depends on an external program (GNU date) that may not be available +everywhere. Running this program and loading another additional Perl +Module also decreases performance. + t-prot-*-debug.diff =================== -With this patch applied t-prot dumps a lot of debugging output to -"/tmp/t-prot-d_$PID_*". -You might want to use the command line parameter "--debugpath" to change -the storage location for this data, so the data (which contains the -entire message you process) will not be stored where other users have -read/write permissions (which would otherwise compromise confidential -messages you might process). -Please be careful not to apply this patch for daily use. It is solely -intended for easier providing debug data when reporting bugs to the -t-prot team (if you encounter any bugs, please drop a message to - -- thanks!). +This patch is no longer available -- it seems most users find it too +hard to apply it and include the resulting debug output to their bug +report. Thanks to everyone who sent bug reports or gave feedback. + +t-prot-*-deb.unstable.diff +========================== +This patch is no longer available. Please use t-prot-*-mutt15*.diff +(or any newer replacements) for this purpose. +Ah yes, and thanks to the authors of the mutt and gnupg po files for +providing enough work and inconsistencies for me never to get bored. t-prot-*-ftr.diff ================= -With this patch applied 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! ;) -With this patch even GMX ads should be easy to hide -- you buy this with -a slight performance hit (which is the reason the patch hasn't made it -into the vanilla tree yet), and with the possibility that sometimes the -algorithm is just a little *too* greedy. +This patch is no longer available -- starting with v1.12 it is merged +into vanilla t-prot. Thanks to everyone who sent bug reports or gave +feedback. + +t-prot-*-gol.diff +================= +This patch is no longer available. + +The feedback to Debian Bug #193937 came only from two people: the Debian +package maintainer, and the original poster of the bug report. The +opinion of both of them is very appreciated, but since there came no +feedback from *anyone* else, I think the vast majority of users has no +interest in switching to Getopt::Long. Furthermore (as stated before), +I see no benefits in using Getopt::Long over Getopt::Mixed as long as +the latter is working and available at CPAN. + +t-prot-*-gpg107.diff +==================== +This patch has been dropped, since noone seems to make use of it. + +t-prot-*-indentms.diff +====================== +This patch has been dropped, since noone seems to make use of it. + +t-prot-*-pgphack.diff +===================== +This patch is no longer available -- starting with v0.90 it is merged +into vanilla t-prot. Thanks to everyone who sent bug reports or gave +feedback. + +t-prot-*-sigtrace.diff +====================== +This patch has been dropped. Noone seems to use it, *and* it looks +wiser to apply stripping directly to sigtrace. diff --git a/contrib/filter_innd.pl b/contrib/filter_innd.pl new file mode 100644 index 0000000..dd6985a --- /dev/null +++ b/contrib/filter_innd.pl @@ -0,0 +1,65 @@ +# $Id: filter_innd.pl,v 1.4 2004/10/10 20:26:24 jochen Exp $ +# Copyright (c) 2004 Jochen Striepe +# +# This file is provided as an example how t-prot can be used for +# Perl filtering with INN2. It is NOT meant for production use. +# Read the README.perl_hook coming with your version of INN2, and +# adapt the script to your needs. +# +# Please see t-prot's man page for command line parameter details. +# +# Requirements/Bugs: mktemp(1) should be quite widely spread by +# now -- if it is not installed on your system, get the sources +# from Debian Linux or OpenBSD. Of course, rm(1) is POSIX and will +# be present on any reasonably Unix-like system. +# The script should not be run on any heavy-duty machines -- the +# writes to /tmp will be costly when many articles are committed +# at the same time. Sadly, there seems to be no really clean, +# portable, and standard way to realize a two-way pipe with perl. +# Please point me to some documentation if I am wrong. Thank you. :) +# +# License: This file is part of the t-prot package and therefore +# available under the same conditions. See t-prot's man page for +# details. +# The whole idea is robbed from Martin Dietze -- see his version at +# http://www.fh-wedel.de/pub/fh-wedel/staff/herbert/linux/ +# Please note that there is no code copied from there, so the files +# in the t-prot package are *not* available under the terms of the +# GPL. + +sub filter_art { + my $rval = "" ; # Assume we'll accept. Cannot be `0' + + if ($hdr{'Newsgroups'} =~ /^local\./) { + my $foo = $hdr{'__BODY__'}; + $foo =~ s/\r\n/\n/gs; + + open(TMP, '/usr/bin/mktemp -q /tmp/INN2.tmp.XXXXXX | tr -d \'\n\'|') + || return ''; + my $f = ; + close TMP; + + open(OUT, ">$f") + || return ''; + print OUT $foo; + close OUT; + + open(IN, "/usr/bin/t-prot -m -t -p --check -i $f|") + || goto FINISH; + $rval = ; + close IN; + + FINISH: system('/bin/rm', $f); + } + + $rval ; +} + +sub filter_mode { +} + +sub filter_messageid { + $rval = ''; + $rval; +} + diff --git a/contrib/muttrc.t-prot b/contrib/muttrc.t-prot new file mode 100644 index 0000000..0c5c9c2 --- /dev/null +++ b/contrib/muttrc.t-prot @@ -0,0 +1,18 @@ +# $Id: muttrc.t-prot,v 1.9 2002/12/29 03:52:57 jochen Exp $ + +# This all works only if you have mutt-1.3.12 or newer +# or if you use something like the pagerfilter patch +# (http://www.escape.de/users/tolot/mutt/). +set display_filter='t-prot -acelmtS -Mmutt --spass -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters' + +# toggle TOFU protection with ESC-0 and ESC-1 +macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off" +macro generic \e1 ":set display_filter='t-prot -acelmtS -Mmutt --spass -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'\n" "Turn TOFU protection on" + +# same in pager mode - ugly but what the hell... +macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off" +macro pager \e1 ":set display_filter='t-prot -acelmtS -Mmutt --spass -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'; exec exit\n:exec display-message\n" "Turn TOFU protection on" + +# highlight TOFU protection: +color body brightmagenta black "^\\[---.*" +color body green black "^#v[-+]" diff --git a/contrib/t-prot-r1.206-mutt156.diff b/contrib/t-prot-r1.206-mutt156.diff new file mode 100644 index 0000000..bf65762 --- /dev/null +++ b/contrib/t-prot-r1.206-mutt156.diff @@ -0,0 +1,323 @@ +--- t-prot Sun Oct 10 23:25:08 2004 ++++ t-prot-M156 Sun Oct 10 23:28:23 2004 +@@ -31,7 +31,7 @@ + + $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned + $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted +- $mutt_pgpoutstart $mutt_pgpoutend ++ $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend + ); + + +@@ -57,9 +57,9 @@ + $msg_ratio = "Blocked by $0: This message has been rejected because of excessive quoting. Please see http://learn.to/quote/ and http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n"; + # end of user adjusted vals + +-# mutt's locales as in mutt-1.3.28 up to mutt-1.4.2.1 {{{ ++# mutt's locales as in mutt-1.5.6 {{{ + my %mutt_attachment = ( +- 'bg' => '[-- Ïðèêà÷åí ôàéë: #', ++ 'bg' => '[-- Ïðèëîæåíèå: #', + 'ca' => '[-- Fitxer adjunt #', + 'cs' => '[-- Pøíloha #', + 'da' => '[-- Brevdel #', +@@ -117,31 +117,31 @@ + my %mutt_pgpsigned = ( + 'bg' => '[-- Êðàé íà ïîäïèñàíèòå äàííè --]', + 'ca' => '[-- Final de les dades signades. --]', +- 'cs' => '', ++ 'cs' => '[-- Konec podepsaných dat --]', + 'da' => '[-- Slut på underskrevne data --]', + 'de' => '[-- Ende der signierten Daten --]', +- 'el' => '[-- ÔÝëïò äåäïìÝíùí õðïãåãñáììÝíùí --]', ++ 'el' => '[-- ÔÝëïò õðïãåãñáììÝíùí äåäïìÝíùí --]', + 'eo' => '[-- Fino de subskribitaj datenoj --]', +- 'es' => '', ++ 'es' => '[-- Fin de datos firmados --]', + 'et' => '[-- Allkirjastatud info lõpp --]', + 'fr' => '[-- Fin des données signées --]', +- 'gl' => '', +- 'hu' => '', ++ 'gl' => '[-- Fin dos datos asinados --]', ++ 'hu' => '[-- Aláírt adat vége --]', + 'id' => '[-- Akhir data yang ditandatangani --]', + 'it' => '[-- Fine dei dati firmati --]', + 'ja' => '[-- ½ð̾¥Ç¡¼¥¿½ªÎ» --]', +- 'ko' => '[-- ¼­¸í ÀÚ·á ³¡ --]', +- 'lt' => '', +- 'nl' => '', ++ 'ko' => '[-- ¼­¸í ÀÚ·áÀÇ ³¡ --]', ++ 'lt' => '[-- Pasiraðytø duomenø pabaiga --]', ++ 'nl' => '[-- Einde van ondertekende gegevens --]', + 'pl' => '[-- Koniec podpisanych danych --]', +- 'pt_BR' => '', ++ 'pt_BR' => '[-- Fim dos dados assinados --]', + 'ru' => '[-- ëÏÎÅà ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', +- 'sk' => '', ++ 'sk' => '[-- Koniec dát s podpisom PGP/MIME --]', + 'sv' => '[-- Slut på signerat data --]', +- 'tr' => '', ++ 'tr' => '[-- Imzalanmýþ bilginin sonu --]', + 'uk' => '[-- ë¦ÎÅÃØ Ð¦ÄÐÉÓÁÎÉÈ ÄÁÎÉÈ --]', +- 'zh_CN' => '', +- 'zh_TW' => '' ++ 'zh_CN' => '[-- Ç©ÊðµÄ×ÊÁϽáÊø --]', ++ 'zh_TW' => '[-- 簽署的資料結束 --]', + ); + my %mutt_beginsigned = ( + 'bg' => '[-- Ñëåäíèòå äàííè ñà ïîäïèñàíè --]', +@@ -161,7 +161,7 @@ + 'ja' => '[-- °Ê²¼¤Î¥Ç¡¼¥¿¤Ï½ð̾¤µ¤ì¤Æ¤¤¤ë --]', + 'ko' => '[-- ¾Æ·¡ÀÇ ÀÚ·á´Â ¼­¸í µÇ¾úÀ½ --]', + 'lt' => '[-- Toliau einantys duomenys yra pasiraðyti --]', +- 'nl' => '[-- De volgende gegevens zijn PGP/MIME ondertekend --]', ++ 'nl' => '[-- De volgende gegevens zijn ondertekend --]', + 'pl' => '[-- Poni¿sze dane s± podpisane --]', + 'pt_BR' => '[-- Os dados a seguir estão assinados --]', + 'ru' => '[-- îÁÞÁÌÏ ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', +@@ -173,9 +173,9 @@ + 'zh_TW' => '[-- 以下的資料已被簽署 --]', + ); + my %mutt_pgpencrypted = ( +- 'bg' => '[-- Êðàé íà PGP/MIME øèôðîâàíèòå äàííè --]', ++ 'bg' => '[-- Êðàé íà øèôðîâàíèòå ñ PGP/MIME äàííè --]', + 'ca' => '[-- Final de les dades xifrades amb PGP/MIME. --]', +- 'cs' => '', ++ 'cs' => '[-- Konec dat za¹ifrovaných ve formátu PGP/MIME --]', + 'da' => '[-- Slut på PGP/MIME-krypteret data --]', + 'de' => '[-- Ende der PGP/MIME-verschlüsselten Daten --]', + 'el' => '[-- ÔÝëïò äåäïìÝíùí êñõðôïãñáöçìÝíùí ìÝóù PGP/MIME --]', +@@ -184,13 +184,13 @@ + 'et' => '[-- PGP/MIME krüptitud info lõpp --]', + 'fr' => '[-- Fin des données chiffrées avec PGP/MIME --]', + 'gl' => '', +- 'hu' => '', ++ 'hu' => '[-- PGP/MIME titkosított adat vége --]', + 'id' => '[-- Akhir data yang dienkripsi dg PGP/MIME --]', + 'it' => '[-- Fine dei dati cifrati con PGP/MIME --]', +- 'ja' => '[-- PGP/MIME°Å¹æ²½¥Ç¡¼¥¿½ªÎ» --]', ++ 'ja' => '[-- PGP/MIME °Å¹æ²½¥Ç¡¼¥¿½ªÎ» --]', + 'ko' => '[-- PGP/MIME ¾Ïȣȭ ÀÚ·á ³¡ --]', + 'lt' => '', +- 'nl' => '', ++ 'nl' => '[-- Einde van PGP/MIME versleutelde data --]', + 'pl' => '[-- Koniec danych zaszyfrowanych PGP/MIME --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÄÁÎÎÙÈ, ÚÁÛÉÆÒÏ×ÁÎÎÙÈ × ÆÏÒÍÁÔÅ PGP/MIME --]', +@@ -204,20 +204,20 @@ + my %mutt_pgpclearsigned = ( + 'bg' => '[-- ÊÐÀÉ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', + 'ca' => '[-- TERMINA EL MISSATGE PGP SIGNAT --]', +- 'cs' => '', ++ 'cs' => '[-- KONEC PODEPSANÉ PGP ZPRÁVY --]', + 'el' => '[-- ÔÅËÏÓ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', + 'eo' => '[-- FINO DE PGP-SUBSKRIBITA MESAØO --]', + 'es' => '', + 'et' => '[-- PGP ALLKIRJASTATUD TEATE LÕPP --]', + 'fr' => '[-- FIN DE MESSAGE SIGNÉ PGP --]', + 'gl' => '', +- 'hu' => '', ++ 'hu' => '[-- PGP ALÁÍRT LEVÉL VÉGE --]', + 'id' => '[-- AKHIR PESAN DG TANDATANGAN PGP --]', + 'it' => '[-- FINE DEL MESSAGGIO FIRMATO CON PGP --]', +- 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸½ªÎ» --]', ++ 'ja' => '[-- PGP ½ð̾¥á¥Ã¥»¡¼¥¸½ªÎ» --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ³¡ --]', + 'lt' => '', +- 'nl' => '', ++ 'nl' => '[-- EINDE PGP ONDERTEKEND BERICHT --]', + 'pl' => '[-- KONIEC LISTU PODPISANEGO PGP --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÓÏÏÂÝÅÎÉÑ, ÐÏÄÐÉÓÁÎÎÏÇÏ PGP --]', +@@ -229,7 +229,7 @@ + 'zh_TW' => '' + ); + my %mutt_pgpclearsigstart = ( +- 'bg' => '[-- ÍÀ×ÀËÎ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', ++ 'bg' => '[-- ÍÀ×ÀËÎ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎ ÏÈÑÌÎ --]', + 'ca' => '[-- COMENÇA EL MISSATGE PGP SIGNAT --]', + 'cs' => '[-- ZAÈÁTEK PODEPSANÉ PGP ZPRÁVY --]', + 'el' => '[-- ÅÍÁÑÎÇ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', +@@ -241,7 +241,7 @@ + 'hu' => '[-- PGP ALÁÍRT LEVÉL KEZDÕDIK --]', + 'id' => '[-- AWAL SURAT DG TANDATANGAN PGP --]', + 'it' => '[-- INIZIO DEL MESSAGGIO FIRMATO CON PGP --]', +- 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸³«»Ï --]', ++ 'ja' => '[-- PGP ½ð̾¥á¥Ã¥»¡¼¥¸³«»Ï --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ½ÃÀÛ --]', + 'lt' => '[-- PGP PASIRAÐYTO LAIÐKO PRADÞIA --]', + 'nl' => '[-- BEGIN PGP ONDERTEKEND BERICHT --]', +@@ -256,29 +256,29 @@ + 'zh_TW' => '[-- PGP 簽名的信件開始 --]' + ); + my %mutt_pgpoutstart = ( +- 'bg' => '[-- ñëåäâà ðåçóëòàòà îò PGP (òåêóùî âåìå: ', +- 'ca' => '[-- Aquesta és l\'eixida de PGP (data actual: ', +- 'cs' => '[-- následuje výstup PGP (aktuální èas: ', ++ 'bg' => '[-- ñëåäâà ðåçóëòàòúòPGP) --]', ++ 'ca' => '[-- Aquesta és l\'eixida de PGP', ++ 'cs' => '[-- následuje výstup PGP ', + 'da' => '[-- PGP-uddata følger (aktuelt tidspunkt: ', +- 'de' => '[-- PGP-Ausgabe folgt (aktuelle Zeit: ', +- 'el' => '[-- Áêïëïõèåß Ýîïäïò ôïõ PGP (ôñÝ÷ïõóá þñá: ', +- 'eo' => '[-- Eligo de PGP sekvas (nuna horo: ', ++ 'de' => '[-- PGP Ausgabe folgt', ++ 'el' => '[-- PGP áêïëïõèåß Ýîïäïò', ++ 'eo' => '[-- PGP eligo sekvas', + 'es' => '[-- Salida de PGP a continuación (tiempo actual: ', +- 'et' => '[-- järgneb PGP väljund (praegune aeg: ', +- 'fr' => '[-- La sortie PGP suit (heure courante : ', ++ 'et' => '[-- järgneb PGP väljund', ++ 'fr' => '[-- La sortie PGP suit', + 'gl' => '[-- Saída PGP a continuación (hora actual: ', +- 'hu' => '[-- PGP kimenet következik (idõ: ', +- 'id' => '[-- Keluaran dari PGP (waktu skrg: ', ++ 'hu' => '[-- PGP kimenet következik', ++ 'id' => '[-- Keluaran dari PGP', + 'it' => '[-- Segue l\'output di PGP (ora attuale: ', +- 'ja' => '[-- PGP ½ÐÎϤϰʲ¼¤ÎÄ̤ê (¸½ºß»þ¹ï: ', +- 'ko' => '[-- PGP Ãâ·Â (ÇöÀç ½Ã°£: ', ++ 'ja' => '[-- PGP ½ÐÎϤϰʲ¼¤ÎÄ̤ê', ++ 'ko' => '[-- PGP Ãâ·Â °á°ú ', + 'lt' => '[-- Toliau PGP iðvestis (esamas laikas: ', +- 'nl' => '[-- PGP uitvoer volgt (Huidige tijd: ', +- 'pl' => '[-- Wynik dzia³ania PGP (bie¿±ca data i czas: ', ++ 'nl' => '[-- PGP uitvoer volgt', ++ 'pl' => '[-- Wynik dzia³ania PGP ', + 'pt_BR' => '[-- Saída do PGP a seguir (hora atual: ', +- 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ PGP (ÔÅËÕÝÅÅ ×ÒÅÍÑ: ', ++ 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ PGP', + 'sk' => '[-- Nasleduje výstup PGP (aktuálny èas: ', +- 'sv' => '[-- Utdata från PGP följer (aktuell tid: ', ++ 'sv' => '[-- PGP utdata följer', + 'tr' => '[-- PGP geri verisi (geçerli zaman: ', + 'uk' => '[-- ÔÅËÓÔ ÎÁ ×ÉÈÏĦ PGP (ÞÁÓ: ', + 'zh_CN' => '[-- ÒÔÏÂΪ PGP Êä³öµÄ×ÊÁÏ£¨ÏÖÔÚʱ¼ä£º ', +@@ -299,7 +299,7 @@ + 'hu' => '[-- PGP kimenet vége --]', + 'id' => '[-- Akhir keluaran PGP --]', + 'it' => '[-- Fine dell\'output di PGP --]', +- 'ja' => '[-- PGP½ÐÎϽªÎ» --]', ++ 'ja' => '[-- PGP ½ÐÎϽªÎ» --]', + 'ko' => '[-- PGP Ãâ·Â ³¡ --]', + 'lt' => '[-- PGP iðvesties pabaiga --]', + 'nl' => '[-- Einde van PGP uitvoer --]', +@@ -313,6 +313,63 @@ + 'zh_CN' => '[-- PGP Êä³ö²¿·Ý½áÊø --]', + 'zh_TW' => '[-- PGP 輸出部份結束 --]' + ); ++my %mutt_ssloutstart = ( ++ 'bg' => '[-- ñëåäâà ðåçóëòàòúòOpenSSL) --]', ++ 'ca' => '[-- Aquesta és l\'eixida de OpenSSL', ++ 'cs' => '[-- následuje výstup OpenSSL ', ++ 'da' => '[-- PGP-uddata følger (aktuelt tidspunkt: ', ++ 'de' => '[-- OpenSSL Ausgabe folgt', ++ 'el' => '[-- OpenSSL áêïëïõèåß Ýîïäïò', ++ 'eo' => '[-- OpenSSL eligo sekvas', ++ 'es' => '[-- Salida de PGP a continuación (tiempo actual: ', ++ 'et' => '[-- järgneb OpenSSL väljund', ++ 'fr' => '[-- La sortie OpenSSL suit', ++ 'gl' => '[-- Saída PGP a continuación (hora actual: ', ++ 'hu' => '[-- OpenSSL kimenet következik', ++ 'id' => '[-- Keluaran dari OpenSSL', ++ 'it' => '[-- Segue l\'output di PGP (ora attuale: ', ++ 'ja' => '[-- OpenSSL ½ÐÎϤϰʲ¼¤ÎÄ̤ê', ++ 'ko' => '[-- OpenSSL Ãâ·Â °á°ú ', ++ 'lt' => '[-- Toliau PGP iðvestis (esamas laikas: ', ++ 'nl' => '[-- OpenSSL uitvoer volgt', ++ 'pl' => '[-- Wynik dzia³ania OpenSSL ', ++ 'pt_BR' => '[-- Saída do PGP a seguir (hora atual: ', ++ 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ OpenSSL', ++ 'sk' => '[-- Nasleduje výstup PGP (aktuálny èas: ', ++ 'sv' => '[-- OpenSSL utdata följer', ++ 'tr' => '[-- PGP geri verisi (geçerli zaman: ', ++ 'uk' => '[-- ÔÅËÓÔ ÎÁ ×ÉÈÏĦ PGP (ÞÁÓ: ', ++ 'zh_CN' => '[-- ÒÔÏÂΪ PGP Êä³öµÄ×ÊÁÏ£¨ÏÖÔÚʱ¼ä£º ', ++ 'zh_TW' => '[-- 以下為 PGP 輸出的資料(現在時間:' ++); ++my %mutt_ssloutend = ( ++ 'bg' => '[-- Êðàé íà OpenSSL-ðåçóëòàòà --]', ++ 'ca' => '[-- Final de l\'eixida d\'OpenSSL. --]', ++ 'cs' => '[-- Konec OpenSSL výstupu --]', ++ 'da' => '[-- Slut på PGP-uddata --]', ++ 'de' => '[-- Ende der OpenSSL-Ausgabe --]', ++ 'el' => '[-- ÔÝëïò ôçò åîüäïõ OpenSSL --]', ++ 'eo' => '[-- Fino de OpenSSL-eligo --]', ++ 'es' => '[-- Fin de salida PGP --]', ++ 'et' => '[-- OpenSSL väljundi lõpp --]', ++ 'fr' => '[-- Fin de sortie OpenSSL --]', ++ 'hu' => '[-- OpenSSL kimenet vége --]', ++ 'id' => '[-- Akhir keluaran OpenSSL --]', ++ 'it' => '[-- Fine dell\'output di PGP --]', ++ 'ja' => '[-- OpenSSL ½ÐÎϽªÎ» --]', ++ 'ko' => '[-- OpenSSL Ãâ·Â ³¡ --]', ++ 'lt' => '[-- PGP iðvesties pabaiga --]', ++ 'nl' => '[-- Einde van OpenSSL uitvoer --]', ++ 'pl' => '[-- Koniec komunikatów OpenSSL --]', ++ 'pt_BR' => '[-- Fim da saída do PGP --]', ++ 'ru' => '[-- ëÏÎÅà ×Ù×ÏÄÁ ÐÒÏÇÒÁÍÍÙ OpenSSL --]', ++ 'sk' => '[-- Koniec výstupu PGP --]', ++ 'sv' => '[-- Slut på utdata från S/MIME --]', ++ 'tr' => '[-- PGP geri verisi sonu --]', ++ 'uk' => '[-- ë¦ÎÅÃØ ÔÅËÓÔÕ ÎÁ ×ÉÈÏĦ PGP --]', ++ 'zh_CN' => '[-- PGP Êä³ö²¿·Ý½áÊø --]', ++ 'zh_TW' => '[-- PGP 輸出部份結束 --]' ++); + # }}} + # set the defaults to the C locale + $mutt_attachment = '[-- Attachment #'; +@@ -324,6 +381,8 @@ + $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; + $mutt_pgpoutstart = '[-- PGP output follows (current time:'; + $mutt_pgpoutend = '[-- End of PGP output --]'; ++$mutt_ssloutstart = '[-- OpenSSL output follows'; ++$mutt_ssloutend = '[-- End of OpenSSL output --]'; + + # gpg's locales as in gpg-1.2.6 {{{ + my %gpg_WARNING = ( +@@ -818,7 +877,7 @@ + for (my $x=0; $x '', + 'ca' => 'AV�S: ', +@@ -343,6 +343,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'LET OP: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'AVISO: ', + 'pt_BR' => 'AVISO: ', +@@ -351,8 +352,7 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:我们不信任这把密钥!', +- 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I' ++ 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I\n' + ); + my %gpg_Warning = ( + 'be' => '', +@@ -371,6 +371,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'LET OP: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'CUIDADO: ', + 'pt_BR' => 'CUIDADO: ', +@@ -379,8 +380,7 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:加密过的报文已经变造!', +- 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I' ++ 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I\n' + ); + my %gpg_Cantcheck = ( + 'be' => '', +@@ -399,6 +399,7 @@ + 'id' => 'Tidak dapat memeriksa signature: ', + 'it' => 'Impossibile controllare la firma: ', + 'ja' => '½ð̾¤ò¸¡ºº¤Ç¤­¤Þ¤»¤ó: ', ++ 'nl' => 'Kan ondertekening niet controleren: ', + 'pl' => 'Nie mo¿na sprawdziæ podpisu: ', + 'pt' => 'Impossível verificar assinatura: ', + 'pt_BR' => 'Impossível verificar assinatura: ', +@@ -407,7 +408,6 @@ + 'sk' => 'Nemô¾em overi» podpis: ', + 'sv' => 'Kan inte verifiera signaturen: ', + 'tr' => 'Ä°mza kontrol edilemedi: ', +- 'zh_CN' => '无法检查签字:', + 'zh_TW' => 'µLªkÀˬdñ³¹¡G ' + ); + my %gpg_aka = ( +@@ -420,23 +420,23 @@ + 'eo' => ' alinome ', + 'es' => ' alias ', + 'et' => ' ka ', +- 'fr' => ' alias « ', ++ 'fr' => ' alias ', + 'gl' => ' alias ', + 'hu' => ' azaz ', + 'id' => ' alias ', + 'it' => ' alias ', +- 'ja' => ' ÊÌ̾¡È', ++ 'ja' => ' ÊÌ̾ ', ++ 'nl' => ' alias ', + 'pl' => ' alias ', + 'pt' => ' ou ', + 'pt_BR' => ' ou ', + 'sk' => ' alias ', +- 'sv' => ' även känd som ', ++ 'sv' => ' även känd som ', + 'tr' => ' den ', +- 'zh_CN' => ' 亦即“', + 'zh_TW' => ' ¥ç§Y ' + ); + my %gpg_bad = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura INCORRECTA de ', + 'cs' => '©PATNÝ podpis od ', + 'da' => 'DÅRLIG signatur fra ', +@@ -445,22 +445,22 @@ + 'eo' => 'MALBONA subskribo de ', + 'es' => 'Firma INCORRECTA de ', + 'et' => 'HALB allkiri kasutajalt ', +- 'fi' => 'VÄÄRÄ allekirjoitus lähettäjältä ', +- 'fr' => 'MAUVAISE signature de « ', ++ 'fi' => 'Allekirjoitus EI TÄSMÄÄ lähettäjallä ', ++ 'fr' => 'MAUVAISE signature de ', + 'gl' => 'Sinatura INCORRECTA de', + 'hu' => 'ROSSZ aláírás a következõtõl: ', + 'id' => 'signature BURUK dari ', + 'it' => 'Firma NON corretta da ', +- 'ja' => '¡È', ++ 'ja' => 'ÉÔÀµ¤Ê ½ð̾: ', ++ 'nl' => 'FOUTE ondertekening van ', + 'pl' => 'NIEPOPRAWNY podpis z³o¿ony przez ', + 'pt' => 'Assinatura INCORRECTA de ', + 'pt_BR' => 'Assinatura INCORRETA de ', + 'ro' => 'Semnãturã INCORECTà din ', + 'ru' => 'ПЛОХАЯ подпись от ', + 'sk' => 'ZLÝ podpis od ', +- 'sv' => 'FELAKTIG signatur frÃ¥n ', ++ 'sv' => 'FELAKTIG signatur från ', + 'tr' => 'KÖTÜ imza: ', +- 'zh_CN' => '已损坏的签字,来自于“', + 'zh_TW' => '*·lÃa* ªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_expired = ( +@@ -473,26 +473,26 @@ + 'eo' => 'Noto: Æi tiu þlosilo eksvalidiøis!', + 'es' => 'Nota: ¡Esta clave ha caducado!', + 'et' => 'Märkus: See võti on aegunud!', +- 'fi' => 'Huom: Tämä avain on vanhentunut!', ++ 'fi' => 'Huom: Tämä avain on vanhentunut!', + 'fr' => 'Note: Cette clé a expiré !', + 'gl' => 'Nota: ¡Esta chave xa caducou!', + 'hu' => 'Megjegyzés: Ez a kulcs lejárt!', + 'id' => 'Catatan: Kunci ini telah berakhir!', + 'it' => 'Nota: questa chiave è scaduta!', +- 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤ÏËþλ¤Ç¤¹!', ++ 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤Ï´ü¸ÂÀÚ¤ì¤Ç¤¹!', ++ 'nl' => 'Let op: Deze sleutel is verlopen!', + 'pl' => 'Uwaga: Data wa¿no¶ci tego klucza up³ynê³a!', + 'pt' => 'Nota: Esta chave expirou!', + 'pt_BR' => 'Nota: Esta chave expirou!', + 'ro' => 'Notã: Aceastã cheie a expirat!', + 'ru' => 'ПРЕДУПРЕЖДАЮ: Данный ключ просрочен!', + 'sk' => 'Poznámka: Skonèila platnos» tohto kµúèa!', +- 'sv' => 'Obs: Giltighetstiden för denna nyckel har gÃ¥tt ut!', ++ 'sv' => 'Notera: Denna nyckel har gått ut!', + 'tr' => 'Bilgi: Bu anahtarın kullanım süresi dolmuştu!', +- 'zh_CN' => '注意:这把密钥已经过期了!', + 'zh_TW' => '½Ðª`·N¡G³o§âª÷Æ_¤w¸g¹L´Á¤F¡I' + ); + my %gpg_good = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura correcta de ', + 'cs' => 'Dobrý podpis od ', + 'da' => 'God signatur fra ', +@@ -501,22 +501,22 @@ + 'eo' => 'Bona subskribo de ', + 'es' => 'Firma correcta de ', + 'et' => 'Korrektne allkiri kasutajalt ', +- 'fi' => 'Allekirjoitus täsmää lähettäjään ', +- 'fr' => 'Bonne signature de « ', ++ 'fi' => 'Allekirjoitus täsmää lähettäjään ', ++ 'fr' => 'Bonne signature de ', + 'gl' => 'Sinatura correcta de ', + 'hu' => 'Jó aláírás a következõtõl: ', + 'id' => 'Signature baik dari ', + 'it' => 'Firma valida da ', +- 'ja' => '¡È', ++ 'ja' => 'Àµ¤·¤¤½ð̾: ', ++ 'nl' => 'Correcte ondertekening van ', + 'pl' => 'Poprawny podpis z³o¿ony przez ', + 'pt' => 'Assinatura correcta de ', + 'pt_BR' => 'Assinatura correta de ', + 'ro' => 'Semnãturã bunã din ', + 'ru' => 'Действительная подпись от ', + 'sk' => 'Dobrý podpis od ', +- 'sv' => 'Korrekt signatur frÃ¥n ', ++ 'sv' => 'Korrekt signatur från ', + 'tr' => 'Kullanıcı kimliği: ', +- 'zh_CN' => '完好的签字,来自于“', + 'zh_TW' => '§¹¦nªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_bug = ( +@@ -529,22 +529,22 @@ + 'eo' => '... æi tio estas cimo (', + 'es' => '... esto es un bug (', + 'et' => '... see on viga (', +- 'fi' => '...tämä on ohjelmistovika (', ++ 'fi' => '...tämä on ohjelmistovika (', + 'fr' => '... cest un bug (', + 'gl' => '... isto é un erro (', + 'hu' => 'Ez egy programhiba... (', + 'id' => '... kesalahan (', + 'it' => '... questo è un bug (', + 'ja' => '... ¥Ð¥°¤Ç¤¹ (', ++ 'nl' => '... dit is een programmeerfout (', + 'pl' => '... to jest b³±d programu (', + 'pt' => '... isto é um bug (', + 'pt_BR' => '... isto é um bug (', + 'ro' => '... acesta este un bug (', + 'ru' => ' ... это ошибка (', + 'sk' => '... toto je chyba v programe (', +- 'sv' => '... detta är ett fel i programmet (', ++ 'sv' => '... detta är ett fel i programmet (', + 'tr' => '... bu bir yazılım hatası (', +- 'zh_CN' => '……这是个程序缺陷(', + 'zh_TW' => '... ³o¬O­Ó·å²« (' + ); + # }}} diff --git a/contrib/t-prot-r1.213-gpg125.diff b/contrib/t-prot-r1.213-gpg125.diff new file mode 100644 index 0000000..1d0d631 --- /dev/null +++ b/contrib/t-prot-r1.213-gpg125.diff @@ -0,0 +1,195 @@ +--- t-prot Fri Dec 31 14:45:11 2004 ++++ t-prot-g125 Sat Jan 8 11:45:41 2005 +@@ -325,7 +325,7 @@ + $mutt_pgpoutstart = '[-- PGP output follows (current time:'; + $mutt_pgpoutend = '[-- End of PGP output --]'; + +-# gpg's locales as in gpg-1.4.0 {{{ ++# gpg's locales as in gpg-1.2.5 {{{ + my %gpg_WARNING = ( + 'be' => '', + 'ca' => 'AV�S: ', +@@ -343,6 +343,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'WAARSCHUWING: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'AVISO: ', + 'pt_BR' => 'AVISO: ', +@@ -351,8 +352,8 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:我们不信任这把密钥!', +- 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I' ++ 'zh_CN' => '¾¯¸æ£ºÎÒÃDz»ÐÅÈÎÕâ°ÑÃÜÔ¿£¡\n', ++ 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I\n' + ); + my %gpg_Warning = ( + 'be' => '', +@@ -371,6 +372,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'WAARSCHUWING: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'CUIDADO: ', + 'pt_BR' => 'CUIDADO: ', +@@ -379,8 +381,8 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:加密过的报文已经变造!', +- 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I' ++ 'zh_CN' => '¾¯¸æ£º¼ÓÃܹýµÄ±¨ÎÄÒѾ­±äÔ죡\n', ++ 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I\n' + ); + my %gpg_Cantcheck = ( + 'be' => '', +@@ -399,6 +401,7 @@ + 'id' => 'Tidak dapat memeriksa signature: ', + 'it' => 'Impossibile controllare la firma: ', + 'ja' => '½ð̾¤ò¸¡ºº¤Ç¤­¤Þ¤»¤ó: ', ++ 'nl' => 'Kan ondertekening niet controleren: ', + 'pl' => 'Nie mo¿na sprawdziæ podpisu: ', + 'pt' => 'Impossível verificar assinatura: ', + 'pt_BR' => 'Impossível verificar assinatura: ', +@@ -407,7 +410,7 @@ + 'sk' => 'Nemô¾em overi» podpis: ', + 'sv' => 'Kan inte verifiera signaturen: ', + 'tr' => 'Ä°mza kontrol edilemedi: ', +- 'zh_CN' => '无法检查签字:', ++ 'zh_CN' => 'ÎÞ·¨¼ì²éÇ©×Ö£º', + 'zh_TW' => 'µLªkÀˬdñ³¹¡G ' + ); + my %gpg_aka = ( +@@ -420,23 +423,24 @@ + 'eo' => ' alinome ', + 'es' => ' alias ', + 'et' => ' ka ', +- 'fr' => ' alias « ', ++ 'fr' => ' alias ', + 'gl' => ' alias ', + 'hu' => ' azaz ', + 'id' => ' alias ', + 'it' => ' alias ', +- 'ja' => ' ÊÌ̾¡È', ++ 'ja' => ' ÊÌ̾ ', ++ 'nl' => ' alias ', + 'pl' => ' alias ', + 'pt' => ' ou ', + 'pt_BR' => ' ou ', + 'sk' => ' alias ', +- 'sv' => ' även känd som ', ++ 'sv' => ' även känd som ', + 'tr' => ' den ', +- 'zh_CN' => ' 亦即“', ++ 'zh_CN' => ' Ò༴ ', + 'zh_TW' => ' ¥ç§Y ' + ); + my %gpg_bad = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura INCORRECTA de ', + 'cs' => '©PATNÝ podpis od ', + 'da' => 'DÅRLIG signatur fra ', +@@ -446,21 +450,22 @@ + 'es' => 'Firma INCORRECTA de ', + 'et' => 'HALB allkiri kasutajalt ', + 'fi' => 'VÄÄRÄ allekirjoitus lähettäjältä ', +- 'fr' => 'MAUVAISE signature de « ', ++ 'fr' => 'MAUVAISE signature de ', + 'gl' => 'Sinatura INCORRECTA de', + 'hu' => 'ROSSZ aláírás a következõtõl: ', + 'id' => 'signature BURUK dari ', + 'it' => 'Firma NON corretta da ', +- 'ja' => '¡È', ++ 'ja' => 'ÉÔÀµ¤Ê ½ð̾: ', ++ 'nl' => 'SLECHTE ondertekening van ', + 'pl' => 'NIEPOPRAWNY podpis z³o¿ony przez ', + 'pt' => 'Assinatura INCORRECTA de ', + 'pt_BR' => 'Assinatura INCORRETA de ', + 'ro' => 'Semnãturã INCORECTà din ', + 'ru' => 'ПЛОХАЯ подпись от ', + 'sk' => 'ZLÝ podpis od ', +- 'sv' => 'FELAKTIG signatur frÃ¥n ', ++ 'sv' => 'FELAKTIG signatur från ', + 'tr' => 'KÖTÜ imza: ', +- 'zh_CN' => '已损坏的签字,来自于“', ++ 'zh_CN' => 'ÒÑË𻵵ÄÇ©×Ö£¬À´×ÔÓÚ', + 'zh_TW' => '*·lÃa* ªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_expired = ( +@@ -479,20 +484,21 @@ + 'hu' => 'Megjegyzés: Ez a kulcs lejárt!', + 'id' => 'Catatan: Kunci ini telah berakhir!', + 'it' => 'Nota: questa chiave è scaduta!', +- 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤ÏËþλ¤Ç¤¹!', ++ 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤Ï´ü¸ÂÀÚ¤ì¤Ç¤¹!', ++ 'nl' => 'Let op: Deze sleutel is verlopen!', + 'pl' => 'Uwaga: Data wa¿no¶ci tego klucza up³ynê³a!', + 'pt' => 'Nota: Esta chave expirou!', + 'pt_BR' => 'Nota: Esta chave expirou!', + 'ro' => 'Notã: Aceastã cheie a expirat!', + 'ru' => 'ПРЕДУПРЕЖДАЮ: Данный ключ просрочен!', + 'sk' => 'Poznámka: Skonèila platnos» tohto kµúèa!', +- 'sv' => 'Obs: Giltighetstiden för denna nyckel har gÃ¥tt ut!', ++ 'sv' => 'Notera: Denna nyckel har gått ut!', + 'tr' => 'Bilgi: Bu anahtarın kullanım süresi dolmuştu!', +- 'zh_CN' => '注意:这把密钥已经过期了!', ++ 'zh_CN' => '×¢Ò⣺Õâ°ÑÃÜÔ¿ÒѾ­¹ýÆÚÁË£¡', + 'zh_TW' => '½Ðª`·N¡G³o§âª÷Æ_¤w¸g¹L´Á¤F¡I' + ); + my %gpg_good = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura correcta de ', + 'cs' => 'Dobrý podpis od ', + 'da' => 'God signatur fra ', +@@ -502,21 +508,22 @@ + 'es' => 'Firma correcta de ', + 'et' => 'Korrektne allkiri kasutajalt ', + 'fi' => 'Allekirjoitus täsmää lähettäjään ', +- 'fr' => 'Bonne signature de « ', ++ 'fr' => 'Bonne signature de ', + 'gl' => 'Sinatura correcta de ', + 'hu' => 'Jó aláírás a következõtõl: ', + 'id' => 'Signature baik dari ', + 'it' => 'Firma valida da ', +- 'ja' => '¡È', ++ 'ja' => 'Àµ¤·¤¤½ð̾: ', ++ 'nl' => 'Goede ondertekening van ', + 'pl' => 'Poprawny podpis z³o¿ony przez ', + 'pt' => 'Assinatura correcta de ', + 'pt_BR' => 'Assinatura correta de ', + 'ro' => 'Semnãturã bunã din ', + 'ru' => 'Действительная подпись от ', + 'sk' => 'Dobrý podpis od ', +- 'sv' => 'Korrekt signatur frÃ¥n ', ++ 'sv' => 'Korrekt signatur från ', + 'tr' => 'Kullanıcı kimliği: ', +- 'zh_CN' => '完好的签字,来自于“', ++ 'zh_CN' => 'ÍêºÃµÄÇ©×Ö£¬À´×ÔÓÚ', + 'zh_TW' => '§¹¦nªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_bug = ( +@@ -536,15 +543,16 @@ + 'id' => '... kesalahan (', + 'it' => '... questo è un bug (', + 'ja' => '... ¥Ð¥°¤Ç¤¹ (', ++ 'nl' => '... dit is een softwarefout (', + 'pl' => '... to jest b³±d programu (', + 'pt' => '... isto é um bug (', + 'pt_BR' => '... isto é um bug (', + 'ro' => '... acesta este un bug (', + 'ru' => ' ... это ошибка (', + 'sk' => '... toto je chyba v programe (', +- 'sv' => '... detta är ett fel i programmet (', ++ 'sv' => '... detta är ett fel i programmet (', + 'tr' => '... bu bir yazılım hatası (', +- 'zh_CN' => '……这是个程序缺陷(', ++ 'zh_CN' => '¡­¡­ÕâÊǸö³ÌÐòȱÏÝ(', + 'zh_TW' => '... ³o¬O­Ó·å²« (' + ); + # }}} diff --git a/contrib/t-prot-r1.213-gpg126.diff b/contrib/t-prot-r1.213-gpg126.diff new file mode 100644 index 0000000..b2de292 --- /dev/null +++ b/contrib/t-prot-r1.213-gpg126.diff @@ -0,0 +1,210 @@ +--- t-prot Fri Dec 31 14:45:11 2004 ++++ t-prot-g126 Sat Jan 8 11:47:14 2005 +@@ -325,10 +325,10 @@ + $mutt_pgpoutstart = '[-- PGP output follows (current time:'; + $mutt_pgpoutend = '[-- End of PGP output --]'; + +-# gpg's locales as in gpg-1.4.0 {{{ ++# gpg's locales as in gpg-1.2.6 {{{ + my %gpg_WARNING = ( + 'be' => '', +- 'ca' => 'AV�S: ', ++ 'ca' => 'AVÍS: ', + 'cs' => 'VAROVÁNÍ: ', + 'da' => 'ADVARSEL: ', + 'de' => 'WARNUNG: ', +@@ -343,6 +343,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'WAARSCHUWING: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'AVISO: ', + 'pt_BR' => 'AVISO: ', +@@ -351,12 +352,12 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:我们不信任这把密钥!', +- 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I' ++ 'zh_CN' => '¾¯¸æ£ºÎÒÃDz»ÐÅÈÎÕâ°ÑÃÜÔ¿£¡\n', ++ 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I\n' + ); + my %gpg_Warning = ( + 'be' => '', +- 'ca' => 'AV�S: ', ++ 'ca' => 'AVÍS: ', + 'cs' => 'VAROVÁNÍ: ', + 'da' => '', + 'de' => 'Warnung: ', +@@ -371,6 +372,7 @@ + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', ++ 'nl' => 'WAARSCHUWING: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'CUIDADO: ', + 'pt_BR' => 'CUIDADO: ', +@@ -379,8 +381,8 @@ + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', +- 'zh_CN' => '警告:加密过的报文已经变造!', +- 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I' ++ 'zh_CN' => '¾¯¸æ£º¼ÓÃܹýµÄ±¨ÎÄÒѾ­±äÔ죡\n', ++ 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I\n' + ); + my %gpg_Cantcheck = ( + 'be' => '', +@@ -399,6 +401,7 @@ + 'id' => 'Tidak dapat memeriksa signature: ', + 'it' => 'Impossibile controllare la firma: ', + 'ja' => '½ð̾¤ò¸¡ºº¤Ç¤­¤Þ¤»¤ó: ', ++ 'nl' => 'Kan ondertekening niet controleren: ', + 'pl' => 'Nie mo¿na sprawdziæ podpisu: ', + 'pt' => 'Impossível verificar assinatura: ', + 'pt_BR' => 'Impossível verificar assinatura: ', +@@ -407,7 +410,7 @@ + 'sk' => 'Nemô¾em overi» podpis: ', + 'sv' => 'Kan inte verifiera signaturen: ', + 'tr' => 'Ä°mza kontrol edilemedi: ', +- 'zh_CN' => '无法检查签字:', ++ 'zh_CN' => 'ÎÞ·¨¼ì²éÇ©×Ö£º', + 'zh_TW' => 'µLªkÀˬdñ³¹¡G ' + ); + my %gpg_aka = ( +@@ -420,23 +423,24 @@ + 'eo' => ' alinome ', + 'es' => ' alias ', + 'et' => ' ka ', +- 'fr' => ' alias « ', ++ 'fr' => ' alias ', + 'gl' => ' alias ', + 'hu' => ' azaz ', + 'id' => ' alias ', + 'it' => ' alias ', +- 'ja' => ' ÊÌ̾¡È', ++ 'ja' => ' ÊÌ̾ ', ++ 'nl' => ' alias ', + 'pl' => ' alias ', + 'pt' => ' ou ', + 'pt_BR' => ' ou ', + 'sk' => ' alias ', +- 'sv' => ' även känd som ', ++ 'sv' => ' även känd som ', + 'tr' => ' den ', +- 'zh_CN' => ' 亦即“', ++ 'zh_CN' => ' Ò༴ ', + 'zh_TW' => ' ¥ç§Y ' + ); + my %gpg_bad = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura INCORRECTA de ', + 'cs' => '©PATNÝ podpis od ', + 'da' => 'DÅRLIG signatur fra ', +@@ -446,21 +450,22 @@ + 'es' => 'Firma INCORRECTA de ', + 'et' => 'HALB allkiri kasutajalt ', + 'fi' => 'VÄÄRÄ allekirjoitus lähettäjältä ', +- 'fr' => 'MAUVAISE signature de « ', ++ 'fr' => 'MAUVAISE signature de ', + 'gl' => 'Sinatura INCORRECTA de', + 'hu' => 'ROSSZ aláírás a következõtõl: ', + 'id' => 'signature BURUK dari ', + 'it' => 'Firma NON corretta da ', +- 'ja' => '¡È', ++ 'ja' => 'ÉÔÀµ¤Ê ½ð̾: ', ++ 'nl' => 'SLECHTE ondertekening van ', + 'pl' => 'NIEPOPRAWNY podpis z³o¿ony przez ', + 'pt' => 'Assinatura INCORRECTA de ', + 'pt_BR' => 'Assinatura INCORRETA de ', + 'ro' => 'Semnãturã INCORECTà din ', + 'ru' => 'ПЛОХАЯ подпись от ', + 'sk' => 'ZLÝ podpis od ', +- 'sv' => 'FELAKTIG signatur frÃ¥n ', ++ 'sv' => 'FELAKTIG signatur från ', + 'tr' => 'KÖTÜ imza: ', +- 'zh_CN' => '已损坏的签字,来自于“', ++ 'zh_CN' => 'ÒÑË𻵵ÄÇ©×Ö£¬À´×ÔÓÚ', + 'zh_TW' => '*·lÃa* ªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_expired = ( +@@ -479,20 +484,21 @@ + 'hu' => 'Megjegyzés: Ez a kulcs lejárt!', + 'id' => 'Catatan: Kunci ini telah berakhir!', + 'it' => 'Nota: questa chiave è scaduta!', +- 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤ÏËþλ¤Ç¤¹!', ++ 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤Ï´ü¸ÂÀÚ¤ì¤Ç¤¹!', ++ 'nl' => 'Let op: Deze sleutel is verlopen!', + 'pl' => 'Uwaga: Data wa¿no¶ci tego klucza up³ynê³a!', + 'pt' => 'Nota: Esta chave expirou!', + 'pt_BR' => 'Nota: Esta chave expirou!', + 'ro' => 'Notã: Aceastã cheie a expirat!', + 'ru' => 'ПРЕДУПРЕЖДАЮ: Данный ключ просрочен!', + 'sk' => 'Poznámka: Skonèila platnos» tohto kµúèa!', +- 'sv' => 'Obs: Giltighetstiden för denna nyckel har gÃ¥tt ut!', ++ 'sv' => 'Notera: Denna nyckel har gått ut!', + 'tr' => 'Bilgi: Bu anahtarın kullanım süresi dolmuştu!', +- 'zh_CN' => '注意:这把密钥已经过期了!', ++ 'zh_CN' => '×¢Ò⣺Õâ°ÑÃÜÔ¿ÒѾ­¹ýÆÚÁË£¡', + 'zh_TW' => '½Ðª`·N¡G³o§âª÷Æ_¤w¸g¹L´Á¤F¡I' + ); + my %gpg_good = ( +- 'be' => 'нерэчаісны хэш-альгарытм ', ++ 'be' => '', + 'ca' => 'Signatura correcta de ', + 'cs' => 'Dobrý podpis od ', + 'da' => 'God signatur fra ', +@@ -502,26 +508,27 @@ + 'es' => 'Firma correcta de ', + 'et' => 'Korrektne allkiri kasutajalt ', + 'fi' => 'Allekirjoitus täsmää lähettäjään ', +- 'fr' => 'Bonne signature de « ', ++ 'fr' => 'Bonne signature de ', + 'gl' => 'Sinatura correcta de ', + 'hu' => 'Jó aláírás a következõtõl: ', + 'id' => 'Signature baik dari ', + 'it' => 'Firma valida da ', +- 'ja' => '¡È', ++ 'ja' => 'Àµ¤·¤¤½ð̾: ', ++ 'nl' => 'Goede ondertekening van ', + 'pl' => 'Poprawny podpis z³o¿ony przez ', + 'pt' => 'Assinatura correcta de ', + 'pt_BR' => 'Assinatura correta de ', + 'ro' => 'Semnãturã bunã din ', + 'ru' => 'Действительная подпись от ', + 'sk' => 'Dobrý podpis od ', +- 'sv' => 'Korrekt signatur frÃ¥n ', ++ 'sv' => 'Korrekt signatur från ', + 'tr' => 'Kullanıcı kimliği: ', +- 'zh_CN' => '完好的签字,来自于“', ++ 'zh_CN' => 'ÍêºÃµÄÇ©×Ö£¬À´×ÔÓÚ', + 'zh_TW' => '§¹¦nªºÃ±³¹¨Ó¦Û©ó ' + ); + my %gpg_bug = ( + 'be' => '', +- 'ca' => '... a�� �s un bug (', ++ 'ca' => '... açò és un bug (', + 'cs' => '... toto je chyba v programu (', + 'da' => '... dette er en fejl (', + 'de' => '... dies ist ein Bug (Programmfehler) (', +@@ -536,15 +543,16 @@ + 'id' => '... kesalahan (', + 'it' => '... questo è un bug (', + 'ja' => '... ¥Ð¥°¤Ç¤¹ (', ++ 'nl' => '... dit is een softwarefout (', + 'pl' => '... to jest b³±d programu (', + 'pt' => '... isto é um bug (', + 'pt_BR' => '... isto é um bug (', + 'ro' => '... acesta este un bug (', + 'ru' => ' ... это ошибка (', + 'sk' => '... toto je chyba v programe (', +- 'sv' => '... detta är ett fel i programmet (', ++ 'sv' => '... detta är ett fel i programmet (', + 'tr' => '... bu bir yazılım hatası (', +- 'zh_CN' => '……这是个程序缺陷(', ++ 'zh_CN' => '¡­¡­ÕâÊǸö³ÌÐòȱÏÝ(', + 'zh_TW' => '... ³o¬O­Ó·å²« (' + ); + # }}} diff --git a/contrib/t-prot-r1.217-mutt157.diff b/contrib/t-prot-r1.217-mutt157.diff new file mode 100644 index 0000000..0e013fa --- /dev/null +++ b/contrib/t-prot-r1.217-mutt157.diff @@ -0,0 +1,345 @@ +--- t-prot Wed Feb 2 13:22:52 2005 ++++ t-prot-M157 Wed Feb 2 14:21:06 2005 +@@ -31,7 +31,7 @@ + + $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned + $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted +- $mutt_pgpoutstart $mutt_pgpoutend ++ $mutt_pgpoutstart $mutt_pgpoutend $mutt_ssloutstart $mutt_ssloutend + ); + + +@@ -57,9 +57,9 @@ + $msg_ratio = "Blocked by $0: This message has been rejected because of excessive quoting. Please see http://learn.to/quote/ and http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n"; + # end of user adjusted vals + +-# mutt's locales as in mutt-1.3.28 up to mutt-1.4.2.1 {{{ ++# mutt's locales as in mutt-1.5.7 {{{ + my %mutt_attachment = ( +- 'bg' => '[-- Ïðèêà÷åí ôàéë: #', ++ 'bg' => '[-- Ïðèëîæåíèå: #', + 'ca' => '[-- Fitxer adjunt #', + 'cs' => '[-- Pøíloha #', + 'da' => '[-- Brevdel #', +@@ -117,31 +117,31 @@ + my %mutt_pgpsigned = ( + 'bg' => '[-- Êðàé íà ïîäïèñàíèòå äàííè --]', + 'ca' => '[-- Final de les dades signades. --]', +- 'cs' => '', ++ 'cs' => '[-- Konec podepsaných dat --]', + 'da' => '[-- Slut på underskrevne data --]', + 'de' => '[-- Ende der signierten Daten --]', +- 'el' => '[-- ÔÝëïò äåäïìÝíùí õðïãåãñáììÝíùí --]', ++ 'el' => '[-- ÔÝëïò õðïãåãñáììÝíùí äåäïìÝíùí --]', + 'eo' => '[-- Fino de subskribitaj datenoj --]', +- 'es' => '', ++ 'es' => '[-- Fin de datos firmados --]', + 'et' => '[-- Allkirjastatud info lõpp --]', + 'fr' => '[-- Fin des données signées --]', +- 'gl' => '', +- 'hu' => '', ++ 'gl' => '[-- Fin dos datos asinados --]', ++ 'hu' => '[-- Aláírt adat vége --]', + 'id' => '[-- Akhir data yang ditandatangani --]', + 'it' => '[-- Fine dei dati firmati --]', + 'ja' => '[-- ½ð̾¥Ç¡¼¥¿½ªÎ» --]', +- 'ko' => '[-- ¼­¸í ÀÚ·á ³¡ --]', +- 'lt' => '', +- 'nl' => '', ++ 'ko' => '[-- ¼­¸í ÀÚ·áÀÇ ³¡ --]', ++ 'lt' => '[-- Pasiraðytø duomenø pabaiga --]', ++ 'nl' => '[-- Einde van ondertekende gegevens --]', + 'pl' => '[-- Koniec podpisanych danych --]', +- 'pt_BR' => '', ++ 'pt_BR' => '[-- Fim dos dados assinados --]', + 'ru' => '[-- ëÏÎÅà ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', +- 'sk' => '', ++ 'sk' => '[-- Koniec dát s podpisom PGP/MIME --]', + 'sv' => '[-- Slut på signerat data --]', +- 'tr' => '', ++ 'tr' => '[-- Imzalanmýþ bilginin sonu --]', + 'uk' => '[-- ë¦ÎÅÃØ Ð¦ÄÐÉÓÁÎÉÈ ÄÁÎÉÈ --]', +- 'zh_CN' => '', +- 'zh_TW' => '' ++ 'zh_CN' => '[-- Ç©ÊðµÄ×ÊÁϽáÊø --]', ++ 'zh_TW' => '[-- 簽署的資料結束 --]', + ); + my %mutt_beginsigned = ( + 'bg' => '[-- Ñëåäíèòå äàííè ñà ïîäïèñàíè --]', +@@ -161,7 +161,7 @@ + 'ja' => '[-- °Ê²¼¤Î¥Ç¡¼¥¿¤Ï½ð̾¤µ¤ì¤Æ¤¤¤ë --]', + 'ko' => '[-- ¾Æ·¡ÀÇ ÀÚ·á´Â ¼­¸í µÇ¾úÀ½ --]', + 'lt' => '[-- Toliau einantys duomenys yra pasiraðyti --]', +- 'nl' => '[-- De volgende gegevens zijn PGP/MIME ondertekend --]', ++ 'nl' => '[-- De volgende gegevens zijn ondertekend --]', + 'pl' => '[-- Poni¿sze dane s± podpisane --]', + 'pt_BR' => '[-- Os dados a seguir estão assinados --]', + 'ru' => '[-- îÁÞÁÌÏ ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', +@@ -173,9 +173,9 @@ + 'zh_TW' => '[-- 以下的資料已被簽署 --]', + ); + my %mutt_pgpencrypted = ( +- 'bg' => '[-- Êðàé íà PGP/MIME øèôðîâàíèòå äàííè --]', ++ 'bg' => '[-- Êðàé íà øèôðîâàíèòå ñ PGP/MIME äàííè --]', + 'ca' => '[-- Final de les dades xifrades amb PGP/MIME. --]', +- 'cs' => '', ++ 'cs' => '[-- Konec dat za¹ifrovaných ve formátu PGP/MIME --]', + 'da' => '[-- Slut på PGP/MIME-krypteret data --]', + 'de' => '[-- Ende der PGP/MIME-verschlüsselten Daten --]', + 'el' => '[-- ÔÝëïò äåäïìÝíùí êñõðôïãñáöçìÝíùí ìÝóù PGP/MIME --]', +@@ -184,18 +184,18 @@ + 'et' => '[-- PGP/MIME krüptitud info lõpp --]', + 'fr' => '[-- Fin des données chiffrées avec PGP/MIME --]', + 'gl' => '', +- 'hu' => '', ++ 'hu' => '[-- PGP/MIME titkosított adat vége --]', + 'id' => '[-- Akhir data yang dienkripsi dg PGP/MIME --]', + 'it' => '[-- Fine dei dati cifrati con PGP/MIME --]', +- 'ja' => '[-- PGP/MIME°Å¹æ²½¥Ç¡¼¥¿½ªÎ» --]', ++ 'ja' => '[-- PGP/MIME °Å¹æ²½¥Ç¡¼¥¿½ªÎ» --]', + 'ko' => '[-- PGP/MIME ¾Ïȣȭ ÀÚ·á ³¡ --]', + 'lt' => '', +- 'nl' => '', ++ 'nl' => '[-- Einde van PGP/MIME versleutelde data --]', + 'pl' => '[-- Koniec danych zaszyfrowanych PGP/MIME --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÄÁÎÎÙÈ, ÚÁÛÉÆÒÏ×ÁÎÎÙÈ × ÆÏÒÍÁÔÅ PGP/MIME --]', + 'sk' => '', +- 'sv' => '[-- Slut på data krypterad enligt PGP/MIME --]', ++ 'sv' => '[-- Slut på PGP/MIME-krypterad data --]', + 'tr' => '', + 'uk' => '[-- ë¦ÎÅÃØ ÄÁÎÉÈ, ÚÁÛÉÆÒÏ×ÁÎÉÈ PGP/MIME --]', + 'zh_CN' => '', +@@ -204,32 +204,32 @@ + my %mutt_pgpclearsigned = ( + 'bg' => '[-- ÊÐÀÉ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', + 'ca' => '[-- TERMINA EL MISSATGE PGP SIGNAT --]', +- 'cs' => '', ++ 'cs' => '[-- KONEC PODEPSANÉ PGP ZPRÁVY --]', + 'el' => '[-- ÔÅËÏÓ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', + 'eo' => '[-- FINO DE PGP-SUBSKRIBITA MESAØO --]', + 'es' => '', + 'et' => '[-- PGP ALLKIRJASTATUD TEATE LÕPP --]', + 'fr' => '[-- FIN DE MESSAGE SIGNÉ PGP --]', + 'gl' => '', +- 'hu' => '', ++ 'hu' => '[-- PGP ALÁÍRT LEVÉL VÉGE --]', + 'id' => '[-- AKHIR PESAN DG TANDATANGAN PGP --]', + 'it' => '[-- FINE DEL MESSAGGIO FIRMATO CON PGP --]', +- 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸½ªÎ» --]', ++ 'ja' => '[-- PGP ½ð̾¥á¥Ã¥»¡¼¥¸½ªÎ» --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ³¡ --]', + 'lt' => '', +- 'nl' => '', ++ 'nl' => '[-- EINDE PGP ONDERTEKEND BERICHT --]', + 'pl' => '[-- KONIEC LISTU PODPISANEGO PGP --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÓÏÏÂÝÅÎÉÑ, ÐÏÄÐÉÓÁÎÎÏÇÏ PGP --]', + 'sk' => '', +- 'sv' => '[-- SLUT PÅ MEDDELANDE SIGNERAT MED PGP --]', ++ 'sv' => '[-- SLUT PÅ PGP-SIGNERAT MEDDELANDE --]', + 'tr' => '', + 'uk' => '[-- ë¦ÎÅÃØ ÐÏצÄÏÍÌÅÎÎÑ Ú PGP ЦÄÐÉÓÏÍ --]', + 'zh_CN' => '', + 'zh_TW' => '' + ); + my %mutt_pgpclearsigstart = ( +- 'bg' => '[-- ÍÀ×ÀËÎ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', ++ 'bg' => '[-- ÍÀ×ÀËÎ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎ ÏÈÑÌÎ --]', + 'ca' => '[-- COMENÇA EL MISSATGE PGP SIGNAT --]', + 'cs' => '[-- ZAÈÁTEK PODEPSANÉ PGP ZPRÁVY --]', + 'el' => '[-- ÅÍÁÑÎÇ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', +@@ -241,7 +241,7 @@ + 'hu' => '[-- PGP ALÁÍRT LEVÉL KEZDÕDIK --]', + 'id' => '[-- AWAL SURAT DG TANDATANGAN PGP --]', + 'it' => '[-- INIZIO DEL MESSAGGIO FIRMATO CON PGP --]', +- 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸³«»Ï --]', ++ 'ja' => '[-- PGP ½ð̾¥á¥Ã¥»¡¼¥¸³«»Ï --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ½ÃÀÛ --]', + 'lt' => '[-- PGP PASIRAÐYTO LAIÐKO PRADÞIA --]', + 'nl' => '[-- BEGIN PGP ONDERTEKEND BERICHT --]', +@@ -249,36 +249,36 @@ + 'pt_BR' => '[-- INÍCIO DE MENSAGEM ASSINADA POR PGP --]', + 'ru' => '[-- îÁÞÁÌÏ ÓÏÏÂÝÅÎÉÑ, ÐÏÄÐÉÓÁÎÎÏÇÏ PGP --]', + 'sk' => '[-- ZAÈIATOK SPRÁVY PODPÍSANEJ S PGP --]', +- 'sv' => '[-- MEDDELANDE SIGNERAT MED PGP BÖRJAR --]', ++ 'sv' => '[-- START PÅ PGP-SIGNERAT MEDDELANDE --]', + 'tr' => '[-- PGP IMZALANMIÞ ILETI BAÞI --]', + 'uk' => '[-- ðÏÞÁÔÏË ÐÏצÄÏÍÌÅÎÎÑ Ú PGP ЦÄÐÉÓÏÍ --]', + 'zh_CN' => '[-- PGP Ç©ÃûµÄÐżþ¿ªÊ¼ --]', + 'zh_TW' => '[-- PGP 簽名的信件開始 --]' + ); + my %mutt_pgpoutstart = ( +- 'bg' => '[-- ñëåäâà ðåçóëòàòà îò PGP (òåêóùî âåìå: ', +- 'ca' => '[-- Aquesta és l\'eixida de PGP (data actual: ', +- 'cs' => '[-- následuje výstup PGP (aktuální èas: ', ++ 'bg' => '[-- ñëåäâà ðåçóëòàòúòPGP) --]', ++ 'ca' => '[-- Aquesta és l\'eixida de PGP', ++ 'cs' => '[-- následuje výstup PGP ', + 'da' => '[-- PGP-uddata følger (aktuelt tidspunkt: ', +- 'de' => '[-- PGP-Ausgabe folgt (aktuelle Zeit: ', +- 'el' => '[-- Áêïëïõèåß Ýîïäïò ôïõ PGP (ôñÝ÷ïõóá þñá: ', +- 'eo' => '[-- Eligo de PGP sekvas (nuna horo: ', ++ 'de' => '[-- PGP Ausgabe folgt', ++ 'el' => '[-- PGP áêïëïõèåß Ýîïäïò', ++ 'eo' => '[-- PGP eligo sekvas', + 'es' => '[-- Salida de PGP a continuación (tiempo actual: ', +- 'et' => '[-- järgneb PGP väljund (praegune aeg: ', +- 'fr' => '[-- La sortie PGP suit (heure courante : ', ++ 'et' => '[-- järgneb PGP väljund', ++ 'fr' => '[-- La sortie PGP suit', + 'gl' => '[-- Saída PGP a continuación (hora actual: ', +- 'hu' => '[-- PGP kimenet következik (idõ: ', +- 'id' => '[-- Keluaran dari PGP (waktu skrg: ', +- 'it' => '[-- Segue l\'output di PGP (ora attuale: ', +- 'ja' => '[-- PGP ½ÐÎϤϰʲ¼¤ÎÄ̤ê (¸½ºß»þ¹ï: ', +- 'ko' => '[-- PGP Ãâ·Â (ÇöÀç ½Ã°£: ', ++ 'hu' => '[-- PGP kimenet következik', ++ 'id' => '[-- Keluaran dari PGP', ++ 'it' => '[-- Segue l\'output di PGP', ++ 'ja' => '[-- PGP ½ÐÎϤϰʲ¼¤ÎÄ̤ê', ++ 'ko' => '[-- PGP Ãâ·Â °á°ú ', + 'lt' => '[-- Toliau PGP iðvestis (esamas laikas: ', +- 'nl' => '[-- PGP uitvoer volgt (Huidige tijd: ', +- 'pl' => '[-- Wynik dzia³ania PGP (bie¿±ca data i czas: ', ++ 'nl' => '[-- PGP uitvoer volgt', ++ 'pl' => '[-- Wynik dzia³ania PGP ', + 'pt_BR' => '[-- Saída do PGP a seguir (hora atual: ', +- 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ PGP (ÔÅËÕÝÅÅ ×ÒÅÍÑ: ', ++ 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ PGP', + 'sk' => '[-- Nasleduje výstup PGP (aktuálny èas: ', +- 'sv' => '[-- Utdata från PGP följer (aktuell tid: ', ++ 'sv' => '[-- PGP utdata följer', + 'tr' => '[-- PGP geri verisi (geçerli zaman: ', + 'uk' => '[-- ÔÅËÓÔ ÎÁ ×ÉÈÏĦ PGP (ÞÁÓ: ', + 'zh_CN' => '[-- ÒÔÏÂΪ PGP Êä³öµÄ×ÊÁÏ£¨ÏÖÔÚʱ¼ä£º ', +@@ -299,7 +299,7 @@ + 'hu' => '[-- PGP kimenet vége --]', + 'id' => '[-- Akhir keluaran PGP --]', + 'it' => '[-- Fine dell\'output di PGP --]', +- 'ja' => '[-- PGP½ÐÎϽªÎ» --]', ++ 'ja' => '[-- PGP ½ÐÎϽªÎ» --]', + 'ko' => '[-- PGP Ãâ·Â ³¡ --]', + 'lt' => '[-- PGP iðvesties pabaiga --]', + 'nl' => '[-- Einde van PGP uitvoer --]', +@@ -307,7 +307,64 @@ + 'pt_BR' => '[-- Fim da saída do PGP --]', + 'ru' => '[-- ëÏÎÅà ×Ù×ÏÄÁ ÐÒÏÇÒÁÍÍÙ PGP --]', + 'sk' => '[-- Koniec výstupu PGP --]', +- 'sv' => '[-- Slut på utdata från PGP --]', ++ 'sv' => '[-- Slut på PGP-utdata --]', ++ 'tr' => '[-- PGP geri verisi sonu --]', ++ 'uk' => '[-- ë¦ÎÅÃØ ÔÅËÓÔÕ ÎÁ ×ÉÈÏĦ PGP --]', ++ 'zh_CN' => '[-- PGP Êä³ö²¿·Ý½áÊø --]', ++ 'zh_TW' => '[-- PGP 輸出部份結束 --]' ++); ++my %mutt_ssloutstart = ( ++ 'bg' => '[-- ñëåäâà ðåçóëòàòúòOpenSSL) --]', ++ 'ca' => '[-- Aquesta és l\'eixida de OpenSSL', ++ 'cs' => '[-- následuje výstup OpenSSL ', ++ 'da' => '[-- PGP-uddata følger (aktuelt tidspunkt: ', ++ 'de' => '[-- OpenSSL Ausgabe folgt', ++ 'el' => '[-- OpenSSL áêïëïõèåß Ýîïäïò', ++ 'eo' => '[-- OpenSSL eligo sekvas', ++ 'es' => '[-- Salida de PGP a continuación (tiempo actual: ', ++ 'et' => '[-- järgneb OpenSSL väljund', ++ 'fr' => '[-- La sortie OpenSSL suit', ++ 'gl' => '[-- Saída PGP a continuación (hora actual: ', ++ 'hu' => '[-- OpenSSL kimenet következik', ++ 'id' => '[-- Keluaran dari OpenSSL', ++ 'it' => '[-- Segue l\'output di OpenSSL', ++ 'ja' => '[-- OpenSSL ½ÐÎϤϰʲ¼¤ÎÄ̤ê', ++ 'ko' => '[-- OpenSSL Ãâ·Â °á°ú ', ++ 'lt' => '[-- Toliau PGP iðvestis (esamas laikas: ', ++ 'nl' => '[-- OpenSSL uitvoer volgt', ++ 'pl' => '[-- Wynik dzia³ania OpenSSL ', ++ 'pt_BR' => '[-- Saída do PGP a seguir (hora atual: ', ++ 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ OpenSSL', ++ 'sk' => '[-- Nasleduje výstup PGP (aktuálny èas: ', ++ 'sv' => '[-- OpenSSL utdata följer', ++ 'tr' => '[-- PGP geri verisi (geçerli zaman: ', ++ 'uk' => '[-- ÔÅËÓÔ ÎÁ ×ÉÈÏĦ PGP (ÞÁÓ: ', ++ 'zh_CN' => '[-- ÒÔÏÂΪ PGP Êä³öµÄ×ÊÁÏ£¨ÏÖÔÚʱ¼ä£º ', ++ 'zh_TW' => '[-- 以下為 PGP 輸出的資料(現在時間:' ++); ++my %mutt_ssloutend = ( ++ 'bg' => '[-- Êðàé íà OpenSSL-ðåçóëòàòà --]', ++ 'ca' => '[-- Final de l\'eixida d\'OpenSSL. --]', ++ 'cs' => '[-- Konec OpenSSL výstupu --]', ++ 'da' => '[-- Slut på PGP-uddata --]', ++ 'de' => '[-- Ende der OpenSSL-Ausgabe --]', ++ 'el' => '[-- ÔÝëïò ôçò åîüäïõ OpenSSL --]', ++ 'eo' => '[-- Fino de OpenSSL-eligo --]', ++ 'es' => '[-- Fin de salida PGP --]', ++ 'et' => '[-- OpenSSL väljundi lõpp --]', ++ 'fr' => '[-- Fin de sortie OpenSSL --]', ++ 'hu' => '[-- OpenSSL kimenet vége --]', ++ 'id' => '[-- Akhir keluaran OpenSSL --]', ++ 'it' => '[-- Fine dell\'output di OpenSSL --]', ++ 'ja' => '[-- OpenSSL ½ÐÎϽªÎ» --]', ++ 'ko' => '[-- OpenSSL Ãâ·Â ³¡ --]', ++ 'lt' => '[-- PGP iðvesties pabaiga --]', ++ 'nl' => '[-- Einde van OpenSSL uitvoer --]', ++ 'pl' => '[-- Koniec komunikatów OpenSSL --]', ++ 'pt_BR' => '[-- Fim da saída do PGP --]', ++ 'ru' => '[-- ëÏÎÅà ×Ù×ÏÄÁ ÐÒÏÇÒÁÍÍÙ OpenSSL --]', ++ 'sk' => '[-- Koniec výstupu PGP --]', ++ 'sv' => '[-- Slut på utdata från OpenSSL --]', + 'tr' => '[-- PGP geri verisi sonu --]', + 'uk' => '[-- ë¦ÎÅÃØ ÔÅËÓÔÕ ÎÁ ×ÉÈÏĦ PGP --]', + 'zh_CN' => '[-- PGP Êä³ö²¿·Ý½áÊø --]', +@@ -324,6 +381,8 @@ + $mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; + $mutt_pgpoutstart = '[-- PGP output follows (current time:'; + $mutt_pgpoutend = '[-- End of PGP output --]'; ++$mutt_ssloutstart = '[-- OpenSSL output follows'; ++$mutt_ssloutend = '[-- End of OpenSSL output --]'; + + # gpg's locales as in gpg-1.4.0 {{{ + my %gpg_WARNING = ( +@@ -810,7 +869,7 @@ + for (my $x=0; $x - # (you might have to adjust those if not using GNU libc) -@@ -29,6 +30,10 @@ - $sendmail = '/usr/sbin/sendmail -oi'; # MTA expecting mail on STDIN - $boun = "Blocked by $0: This user does not accept TOFUed email. Please see and for more info. Have a nice day!\n"; - $ofile = '-'; # use STDOUT if nothing is specified -+$dc = 0; # debug dump counter -+$debugpath = '/tmp'; -+ # this should better be changed by command line for -+ # confidential messages - # end of user adjusted vals - - -@@ -39,6 +44,7 @@ - -A=DIRECTORY ad footer directory, treat ad footers as signature - -c merge multiple blank lines - -d, --debug print notice to syslog when bouncing; requires -p -+ --debugpath=DIR where to dump debug info - --diff tolerate diffs appended *after* the signature - -e force ellipsis for excessive punctuation - -h, --help show this short help and exit -@@ -64,9 +70,30 @@ - # version(): print version info and exit with appropriate exit code - sub version { - print "$0 v$VER$REV ($REL), Jochen Striepe -+This is a debugging version. DO NOT INSTALL THIS VERSION FOR DAILY USE! - Get the latest version at \n"; - exit($EX_OK); - } -+ -+# write useful debugging output -+# usage: debug_dump('/tmp/foo', $foo, $bar, @klotz); -+sub debug_dump { -+ if (scalar(@_)<2) { die "bad parameters"; } -+ my $f = shift; -+ if (-l $f) { die "We won't write to $f for security reasons"; } -+ -+ open(DBG, ">$f") || die "Could not open $f: $!"; -+ my $foo; -+ while (@_) { -+ $foo = shift; -+ chomp($foo); -+ $^W = 0; -+ print DBG "$foo\n"; -+ $^W = 1; -+ } -+ close DBG; -+} -+ - - # remove_footers(): remove any trailing appearance of footers contained - # in the given directory. -@@ -139,6 +166,7 @@ - for ($x=0; $x<$#$lines; $x++) { if (@$lines[$x] =~ /^$/) { last; }; } - @hdr = @$lines[0..$x]; - splice(@$lines, 0, $x+1); -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # See if we have a multipart content type. If yes, see if it is already - # ripped (e.g. by mutt(1)), otherwise only leave the first part if it -@@ -240,6 +268,7 @@ - last; - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Pipe message/rfc822 parts to another instance of process_msg() - # for further processing. -@@ -267,12 +296,15 @@ - } - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Remove ML footers: - remove_footers($lines, \@ftr, $footers, undef); -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Remove ad footers: - remove_footers($lines, \@ads, $ads, undef); -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Remove signature: - if (scalar(@$lines)) { -@@ -307,6 +339,7 @@ - } - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Now care about TOFU. - # One common mispractice is M$ style TOFU: -@@ -331,6 +364,7 @@ - $j = scalar(@$lines)-$x; - splice(@$lines, $x); - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Nothing? Then try traditional TOFU: - if ($trad && (!$j) && !$vrb[$#$lines]) { -@@ -345,6 +379,7 @@ - pop(@$lines); - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # OK, if we found TOFU, we will leave a message that we were here... - if ($j) { -@@ -368,6 +403,7 @@ - - push(@$lines, "[---=| TOFU protection by $0: $j lines snipped |=---]\n"); - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - - # Care for trailing whitespaces: -@@ -376,6 +412,7 @@ - if (!$vrb[$x]) { $$lines[$x] =~ s/[\ \t]+$//; } - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Care for punctuation abuse: - if ($elli) { -@@ -383,6 +420,7 @@ - if (!$vrb[$x]) { $$lines[$x] =~ s/([.?!])(\1{2})\1+/$1 . $2/eg; } - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # (Nearly) at last care for multiple blank lines. (Do not do this - # earlier -- the way it is done right now would screw up the verbatim -@@ -396,6 +434,7 @@ - else { $t = 0; } - } - } -+ debug_dump($debugpath.'_'.$$.'_'.$dc++, @$lines); - - # Everything changing the body is done now. Time to fix the line count - # header so naive clients do not get confused. Just to be sure, append -@@ -428,12 +467,13 @@ - # get command line params: - $0 =~ s!^.*/!!; - Getopt::Mixed::init('a A=s c d e h i=s L=s l m M=s o=s P=s p=s r S:i'. -- ' s t v w debug>d diff help>h mua>M version>v'); -+ ' s t v w debug>d debugpath diff help>h mua>M version>v'); - while (my ($opt, $val, $pretty) = nextOption()) { - if ($opt eq 'a') { $ad = 1; } - elsif ($opt eq 'A') { $ads = $val; } - elsif ($opt eq 'c') { $cr = 1; } - elsif ($opt eq 'd') { $sysl = 1; } -+ elsif ($opt eq 'debugpath') { $debugpath = $val; } - elsif ($opt eq 'diff') { $diff = 1; } - elsif ($opt eq 'e') { $elli = 1; } - elsif ($opt eq 'i') { $ifile = $val; } -@@ -454,17 +494,26 @@ - } - Getopt::Mixed::cleanup(); - if (($ml && $footers eq '')||($ad && $ads eq '')) { help(); } -- -+$debugpath .= '/t-prot-d'; - - # Read message: - open(IN, $ifile) || die "Could not open $ifile: $!"; - my @message = ; - close IN; -+debug_dump($debugpath.'_'.$$.'_'.$dc++, -+ $VER.$REV, $REL, -+ "ad=$ad", "ads=$ads", "cr=$cr", "sysl=$sysl", "elli=$elli", "ml=$ml", -+ "ms=$ms", "mda=$mda", "mua=$mua", "hdrs=$hdrs", "lsig=$lsig", "sig=$sig", -+ "trad=$trad", "trsp=$trsp", "footers=$footers", "ifile=$ifile", -+ "ofile=$ofile", "maxsig=$maxsig", "indent=$indent", "sendmail=$sendmail", -+ "boun=$boun"); -+debug_dump($debugpath.'_'.$$.'_'.$dc++, @message); - - # this should be self-explanatory: - process_msg(\@message); - - # Finally, print clean lines: - write_msg(($mda?"|$sendmail $mda":">$ofile"), \@message); -+debug_dump($debugpath.'_'.$$.'_'.$dc++, @message); - - # eof diff --git a/contrib/t-prot-r1.51-ftr.diff b/contrib/t-prot-r1.51-ftr.diff deleted file mode 100644 index a11af29..0000000 --- a/contrib/t-prot-r1.51-ftr.diff +++ /dev/null @@ -1,78 +0,0 @@ ---- t-prot-x 2002-03-25 02:15:50.000000000 +0100 -+++ t-prot 2002-03-25 03:24:03.000000000 +0100 -@@ -14,7 +14,7 @@ - - # Version info - $VER = '0.54'; --$REV = ''; -+$REV = '-ftr'; - $REL = q$Revision: 1.51 $; chop($REL); - # From - # (you might have to adjust those if not using GNU libc) -@@ -75,6 +75,7 @@ - my $S = shift; # array to store removed lines in - my $F = shift; # footers dir name - my $O = shift; # remove only one footer? -+ my $V = shift; # allow footers match before end of message - - if ($F && scalar(@$L)) { - opendir(DIR, $F) || die "Could not open $F: $!"; -@@ -85,25 +86,27 @@ - open(IN, "$F/$f") || die "Could not open $F/$f: $!"; - my @l = ; - close IN; -+ for (my $z=0; $z<=$#l; $z++) { chomp($l[$z]); } - -- while (scalar(@l)<=scalar(@$L)) { -- my $y = 0; -- for(my $x=1; $x<=scalar(@l); $x++) { -- chomp($l[scalar(@l)-$x]); -- if (index($$L[scalar(@$L)-$x], $l[scalar(@l)-$x])!=0) { -- $y = 1; -- } -- } -- if (!$y) { -- unshift(@$S, @$L[$#$L-$#l..$#$L]); -- splice(@$L, $#$L-$#l); -- while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) { -- unshift(@$S, pop(@$L)); -- } -- if ($O) { last; } -- } -- else { last; } -- } -+ WIPE: for (my $z=$V?(scalar(@$L)-scalar(@l)):0; $z>=0; $z--) -+ { -+ if (scalar(@l)+$z<=scalar(@$L)) { -+ my $y = 0; -+ for(my $x=1; $x<=scalar(@l); $x++) { -+ if (index($$L[scalar(@$L)-$x-$z], $l[scalar(@l)-$x])!=0) { -+ $y = 1; -+ } -+ } -+ if (!$y) { -+ unshift(@$S, @$L[$#$L-$#l-$z..$#$L]); -+ splice(@$L, $#$L-$#l-$z); -+ while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) { -+ unshift(@$S, pop(@$L)); -+ } -+ if ($O) { last; } else { goto WIPE; } -+ } -+ } -+ } - } - } - } -@@ -269,10 +272,10 @@ - } - - # Remove ML footers: -- remove_footers($lines, \@ftr, $footers, undef); -+ remove_footers($lines, \@ftr, $footers, undef, undef); - - # Remove ad footers: -- remove_footers($lines, \@ads, $ads, undef); -+ remove_footers($lines, \@ads, $ads, undef, '1'); - - # Remove signature: - if (scalar(@$lines)) { diff --git a/contrib/t-prot.sl b/contrib/t-prot.sl new file mode 100644 index 0000000..1fc1aad --- /dev/null +++ b/contrib/t-prot.sl @@ -0,0 +1,103 @@ +% $Id: t-prot.sl,v 1.11 2005/01/07 18:15:36 jochen Exp $ +% Copyright (c) 2003 Jochen Striepe +% +% This file is provided as an example implemention for articles to be +% filtered through t-prot before displayed. They are still filtered if +% you reply to such a message so you will have to deactivate this if +% you want to include quotes of the original article. +% +% Activate this macro by adding +% interpret t-prot.sl +% to your ~/.slrnrc. +% +% If you are not happy with the suggested t-prot default parameters, +% put something like +% variable t_prot_params = "-cemtS"; +% variable t_prot_tmpdir = "$HOME/.tmpdir"; +% variable t_prot_qp = ""; +% into ~/.slrn/t-prot-cfg and add +% interpret .slrn/t-prot-cfg +% to your ~/.slrnrc (after 'interpret t-prot.sl'). However, please keep +% in mind that the path of the temp directory should NOT be readable to +% other users -- otherwise it might reveal information on what you read, +% and probably even be a security hole. +% Please see t-prot's man page for details on command line parameters. +% +% If you want to toggle t-prot filtering on/off without leaving slrn, +% you may want to add something like +% setkey article register_t_prot "\e1" +% setkey article unregister_t_prot "\e0" +% to your ~/.slrnrc -- press ESC-1 to activate t-prot filtering, and +% ESC-0 to disable it (this will take effect on the next article you +% read, see the package's TODO file). +% +% Requirements/Bugs: tr(1) and rm(1) are POSIX and should be available +% on any Unix-like system, mktemp(1) should be available on any recent +% OpenBSD or Debian Linux system -- you can get the sources there +% if your system happens to lack this program. This macro has been +% tested with slrn-0.9.7.4 to slrn-0.9.8.0 and S-Lang v1.4.5, it might +% fail with other versions. As always, bug reports, patches (preferrably +% in unified diff format), comments and suggestions are welcome. +% +% License: This file is part of the t-prot package and therefore +% available under the same conditions. See t-prot's man page for +% details. + + +% these should be reasonable defaults (they work fine for me, SCNR): +variable t_prot_params = "-aceklmtS --diff --bigq -L$HOME/.slrn/mlfooters -A$HOME/.slrn/adfooters"; +variable t_prot_tmpdir = "$HOME/tmp/slrn"; +variable t_prot_qp = "perl -i -p -e '$p=1 if /^Content-Transfer-Encoding: quoted-printable/i; if ($p==1) { s/=([0-9a-f][0-9a-f])/chr(hex($1))/egi; s/=\n//eg; };'"; + +define t_prot () { + variable art, f, fname, line, qp; + art = ""; + + % Keep in mind that the path should NOT be readable to other users -- + % otherwise it might reveal information on what you read, and probably + % even be a security hole: + f = popen ("mktemp -q "+t_prot_tmpdir+"/t-prot.sl.XXXXXX | tr -d '\n'", "r"); + if (f == NULL) return; + if (-1 == fgets (&fname, f)) return; + pclose (f); + + + if (t_prot_qp != "") { qp = t_prot_qp+"|"; } else { qp = ""; } + pipe_article (qp+"t-prot "+t_prot_params+" >"+fname); + + f = fopen (fname, "r"); + if (f == NULL) { + error (fname+" could not be opened."); + return; + } + while (-1 != fgets (&line, f)) { + art = art + line; + } + fclose (f); + + % The removal of the tmp file works this way but should be made a + % little more reliable. Any ideas? + system ("rm -f "+fname); + replace_article (art); +} + +define register_t_prot () { + if (1 == register_hook("read_article_hook", "t_prot")) { + error("t-prot filtering activated"); + } + else { + error("t-prot filtering NOT activated"); + } +} + +define unregister_t_prot () { + if (1 == unregister_hook("read_article_hook", "t_prot")) { + error("t-prot filtering deactivated"); + } + else { + error("t-prot filtering NOT deactivated"); + } +} + +% filtering is enabled by default: +register_hook("read_article_hook", "t_prot"); diff --git a/muttrc.t-prot b/muttrc.t-prot deleted file mode 100644 index dacddf8..0000000 --- a/muttrc.t-prot +++ /dev/null @@ -1,14 +0,0 @@ -# $Id: muttrc.t-prot,v 1.7 2002/03/18 19:19:23 jochen Exp $ -set display_filter='t-prot -acelmtS -Mmutt -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters' - -# toggle TOFU protection with ESC-0 and ESC-1 -macro generic \e0 ":unset display_filter\n" "Turn TOFU protection off" -macro generic \e1 ":set display_filter='t-prot -acelmtS -Mmutt -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'\n" "Turn TOFU protection on" - -# same in pager mode - ugly but what the hell... -macro pager \e0 ":unset display_filter; exec exit\n:exec display-message\n" "Turn TOFU protection off" -macro pager \e1 ":set display_filter='t-prot -acelmtS -Mmutt -L$HOME/.mutt/mlfooters -A$HOME/.mutt/adfooters'; exec exit\n:exec display-message\n" "Turn TOFU protection on" - -# highlight TOFU protection: -color body brightmagenta black "^\\[---.*" -color body green black "^#v[-+]" diff --git a/t-prot b/t-prot index 7cd2da4..936a4ac 100755 --- a/t-prot +++ b/t-prot @@ -1,463 +1,1485 @@ #!/usr/bin/perl -w -# $Id: t-prot,v 1.51 2002/03/23 10:47:32 jochen Exp $ +# $Id: t-prot,v 1.218 2005/02/02 13:46:42 jochen Exp $ -require 5.005; +require 5.006; use strict; +use Fcntl qw(O_EXCL O_WRONLY O_CREAT); use Getopt::Mixed qw(nextOption); +use constant VER => '1.49'; +use constant REV => ''; +use constant REL => q$Revision: 1.218 $=~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'; +# From +# (you might have to adjust those if your libc wants different values) +use constant EX_OK => 0; +use constant EX_USAGE => 64; +use constant EX_DATAERR => 65; +use constant EX_UNAVAILABLE => 69; +use constant EX_IOERR => 74; +use constant EX_BOUNCE => EX_UNAVAILABLE; use vars qw( - $VER $REV $REL - $EX_OK $EX_USAGE $EX_DATAERR $EX_UNAVAILABLE $EX_BOUNCE - $ad $ads $boun $cr $diff $elli $footers $hdrs $indent $lsig $maxsig - $mda $ml $ms $mua $ofile $sendmail $sig $sysl $trad $trsp + $ad $ads $bigqn $bigqx $boun $check $check_ratio $cr $diff $elli + $footers $ftr_ad $ftr_ml $hdrs $indent $kamm $kdiff $kminl $kmaxl + $lax $lsig $maxsig $mda $ml $ms $ms_smart $msg_quote $msg_ratio + $mua $ofile $pgpshort $pgpmove $pgpmovevrf $sig $sigint $sign + $spass $spass_prefix $sysl $trad $trsp + + $gpg_WARNING $gpg_Warning $gpg_Cantcheck $gpg_aka $gpg_bad + $gpg_expired $gpg_good $gpg_bug + + $mutt_attachment $mutt_contenttype $mutt_pgpsigned $mutt_beginsigned + $mutt_pgpclearsigned $mutt_pgpclearsigstart $mutt_pgpencrypted + $mutt_pgpoutstart $mutt_pgpoutend ); -# Version info -$VER = '0.54'; -$REV = ''; -$REL = q$Revision: 1.51 $; chop($REL); -# From -# (you might have to adjust those if not using GNU libc) -$EX_OK = 0; -$EX_USAGE = 64; -$EX_DATAERR = 65; -$EX_UNAVAILABLE = 69; -$EX_BOUNCE = $EX_UNAVAILABLE; -# Please adjust these vals to your needs: -$maxsig = 4; # max. valid signature length -$indent = '>'; # Indent string, regexp to identify a quoted line -$sendmail = '/usr/sbin/sendmail -oi'; # MTA expecting mail on STDIN -$boun = "Blocked by $0: This user does not accept TOFUed email. Please see and for more info. Have a nice day!\n"; -$ofile = '-'; # use STDOUT if nothing is specified +# Please adjust these vals to your needs (they are no constants because +# command line can change them or they are used in rexexp's): +$0 =~ s!^.*/!!; +$maxsig = 4; # max. valid signature length +$indent = '>'; # Indent string, regexp to identify a quoted line +$kminl = 65; # see decomb() for details +$kmaxl = 80; +$kdiff = 20; +$pgpshort = 0; # hide pgp key ids if set +$pgpmove = 0; # move pgp output to bottom if set +$pgpmovevrf = 0; +$sign = 1; # max number of sigs tolerated, undef for no limit +$boun = "Blocked by $0: This user does not accept TOFUed email. Please see and for more info. Have a nice day!\n"; +$ftr_ad = undef; # too hard on performance to be default +$ftr_ml = undef; # too hard on performance to be default +$ofile = '-'; # use STDOUT if nothing is specified +$spass_prefix = 'SPAM: '; +$check_ratio = .75; # 3/4 tofu is enough not to accept the message +$msg_quote = "Blocked by $0: This message has been rejected because of a full quote. Please see http://learn.to/quote/ and http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n"; +$msg_ratio = "Blocked by $0: This message has been rejected because of excessive quoting. Please see http://learn.to/quote/ and http://www.escape.de/users/tolot/mutt/ for more info. Have a nice day!\n"; # end of user adjusted vals +# mutt's locales as in mutt-1.3.28 up to mutt-1.4.2.1 {{{ +my %mutt_attachment = ( + 'bg' => '[-- Ïðèêà÷åí ôàéë: #', + 'ca' => '[-- Fitxer adjunt #', + 'cs' => '[-- Pøíloha #', + 'da' => '[-- Brevdel #', + 'de' => '[-- Anhang #', + 'el' => '[-- ÐñïóÜñôçóç #', + 'eo' => '[-- Parto #', + 'es' => '[-- Archivo adjunto #', + 'et' => '[-- Lisa #', + 'fr' => '[-- Attachement #', + 'gl' => '[-- Adxunto #', + 'hu' => '[-- Melléklet #', + 'id' => '[-- Lampiran #', + 'it' => '[-- Allegato #', + 'ja' => '[-- źÉÕ¥Õ¥¡¥¤¥ë #', + 'ko' => '[-- ÷ºÎ¹° #', + 'lt' => '[-- Priedas #', + 'nl' => '[-- Bijlage #', + 'pl' => '[-- Za³±cznik #', + 'pt_BR' => '[-- Anexo No.', + 'ru' => '[-- ÷ÌÏÖÅÎÉÅ #', + 'sk' => '[-- Príloha #', + 'sv' => '[-- Bilaga #', + 'tr' => '[-- Eklenti #', + 'uk' => '[-- äÏÄÁÔÏË ÎÏÍÅÒ ', + 'zh_CN' => '[-- ¸½¼þ #', + 'zh_TW' => '[-- 附件 #' +); +my %mutt_contenttype = ( + 'bg' => '[-- Òèï: ', + 'ca' => '[-- Tipus: ', + 'cs' => '[-- Typ: ', + 'de' => '[-- Typ: ', + 'el' => '[-- Ôýðïò: ', + 'eo' => '[-- Speco: ', + 'es' => '[-- Tipo: ', + 'et' => '[-- Tüüp: ', + 'fr' => '[-- Type : ', + 'gl' => '[-- Tipo: ', + 'hu' => '[-- Típus: ', + 'id' => '[-- Jenis: ', + 'it' => '[-- Tipo: ', + 'ja' => '[-- ¥¿¥¤¥×: ', + 'ko' => '[-- Á¾·ù: ', + 'lt' => '[-- Tipas: ', + 'pl' => '[-- Typ: ', + 'pt_BR' => '[-- Tipo: ', + 'ru' => '[-- ôÉÐ: ', + 'sk' => '[-- Typ: ', + 'sv' => '[-- Typ: ', + 'tr' => '[-- Tip: ', + 'uk' => '[-- ôÉÐ: ', + 'zh_CN' => '[-- ÐÎ̬: ', + 'zh_TW' => '[-- 種類:' +); +my %mutt_pgpsigned = ( + 'bg' => '[-- Êðàé íà ïîäïèñàíèòå äàííè --]', + 'ca' => '[-- Final de les dades signades. --]', + 'cs' => '', + 'da' => '[-- Slut på underskrevne data --]', + 'de' => '[-- Ende der signierten Daten --]', + 'el' => '[-- ÔÝëïò äåäïìÝíùí õðïãåãñáììÝíùí --]', + 'eo' => '[-- Fino de subskribitaj datenoj --]', + 'es' => '', + 'et' => '[-- Allkirjastatud info lõpp --]', + 'fr' => '[-- Fin des données signées --]', + 'gl' => '', + 'hu' => '', + 'id' => '[-- Akhir data yang ditandatangani --]', + 'it' => '[-- Fine dei dati firmati --]', + 'ja' => '[-- ½ð̾¥Ç¡¼¥¿½ªÎ» --]', + 'ko' => '[-- ¼­¸í ÀÚ·á ³¡ --]', + 'lt' => '', + 'nl' => '', + 'pl' => '[-- Koniec podpisanych danych --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', + 'sk' => '', + 'sv' => '[-- Slut på signerat data --]', + 'tr' => '', + 'uk' => '[-- ë¦ÎÅÃØ Ð¦ÄÐÉÓÁÎÉÈ ÄÁÎÉÈ --]', + 'zh_CN' => '', + 'zh_TW' => '' +); +my %mutt_beginsigned = ( + 'bg' => '[-- Ñëåäíèòå äàííè ñà ïîäïèñàíè --]', + 'ca' => '[-- Les dades següents es troben signades: --]', + 'cs' => '[-- Následují podepsaná data --]', + 'da' => '[-- Følgende data er underskrevet --]', + 'de' => '[-- Die folgenden Daten sind signiert --]', + 'el' => '[-- Ôá åðüìåíá äåäïìÝíá åßíáé õðïãåãñáììÝíá --]', + 'eo' => '[-- La sekvaj datenoj estas subskribitaj --]', + 'es' => '[-- Los siguientes datos están firmados --]', + 'et' => '[-- Järgnev info on allkirjastatud --]', + 'fr' => '[-- Les données suivantes sont signées --]', + 'gl' => '[-- Os datos a continuación están asinados --]', + 'hu' => '[-- A következõ adatok alá vannak írva --]', + 'id' => '[-- Data berikut ini ditandatangani --]', + 'it' => '[-- I seguenti dati sono firmati --]', + 'ja' => '[-- °Ê²¼¤Î¥Ç¡¼¥¿¤Ï½ð̾¤µ¤ì¤Æ¤¤¤ë --]', + 'ko' => '[-- ¾Æ·¡ÀÇ ÀÚ·á´Â ¼­¸í µÇ¾úÀ½ --]', + 'lt' => '[-- Toliau einantys duomenys yra pasiraðyti --]', + 'nl' => '[-- De volgende gegevens zijn PGP/MIME ondertekend --]', + 'pl' => '[-- Poni¿sze dane s± podpisane --]', + 'pt_BR' => '[-- Os dados a seguir estão assinados --]', + 'ru' => '[-- îÁÞÁÌÏ ÐÏÄÐÉÓÁÎÎÙÈ ÄÁÎÎÙÈ --]', + 'sk' => '[-- Nasledujúce dáta sú podpísané s PGP/MIME --]', + 'sv' => '[-- Följande data är signerat --]', + 'tr' => '[-- Bu bilgi imzalanmýþtýr --]', + 'uk' => '[-- îÁÓÔÕÐΦ ÄÁΦ ЦÄÐÉÓÁÎÏ --]', + 'zh_CN' => '[-- ÒÔϵÄ×ÊÁÏÒѱ»Ç©Êð --]', + 'zh_TW' => '[-- 以下的資料已被簽署 --]', +); +my %mutt_pgpencrypted = ( + 'bg' => '[-- Êðàé íà PGP/MIME øèôðîâàíèòå äàííè --]', + 'ca' => '[-- Final de les dades xifrades amb PGP/MIME. --]', + 'cs' => '', + 'da' => '[-- Slut på PGP/MIME-krypteret data --]', + 'de' => '[-- Ende der PGP/MIME-verschlüsselten Daten --]', + 'el' => '[-- ÔÝëïò äåäïìÝíùí êñõðôïãñáöçìÝíùí ìÝóù PGP/MIME --]', + 'eo' => '[-- Fino de PGP/MIME-æifritaj datenoj --]', + 'es' => '', + 'et' => '[-- PGP/MIME krüptitud info lõpp --]', + 'fr' => '[-- Fin des données chiffrées avec PGP/MIME --]', + 'gl' => '', + 'hu' => '', + 'id' => '[-- Akhir data yang dienkripsi dg PGP/MIME --]', + 'it' => '[-- Fine dei dati cifrati con PGP/MIME --]', + 'ja' => '[-- PGP/MIME°Å¹æ²½¥Ç¡¼¥¿½ªÎ» --]', + 'ko' => '[-- PGP/MIME ¾Ïȣȭ ÀÚ·á ³¡ --]', + 'lt' => '', + 'nl' => '', + 'pl' => '[-- Koniec danych zaszyfrowanych PGP/MIME --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÄÁÎÎÙÈ, ÚÁÛÉÆÒÏ×ÁÎÎÙÈ × ÆÏÒÍÁÔÅ PGP/MIME --]', + 'sk' => '', + 'sv' => '[-- Slut på data krypterad enligt PGP/MIME --]', + 'tr' => '', + 'uk' => '[-- ë¦ÎÅÃØ ÄÁÎÉÈ, ÚÁÛÉÆÒÏ×ÁÎÉÈ PGP/MIME --]', + 'zh_CN' => '', + 'zh_TW' => '' +); +my %mutt_pgpclearsigned = ( + 'bg' => '[-- ÊÐÀÉ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', + 'ca' => '[-- TERMINA EL MISSATGE PGP SIGNAT --]', + 'cs' => '', + 'el' => '[-- ÔÅËÏÓ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', + 'eo' => '[-- FINO DE PGP-SUBSKRIBITA MESAØO --]', + 'es' => '', + 'et' => '[-- PGP ALLKIRJASTATUD TEATE LÕPP --]', + 'fr' => '[-- FIN DE MESSAGE SIGNÉ PGP --]', + 'gl' => '', + 'hu' => '', + 'id' => '[-- AKHIR PESAN DG TANDATANGAN PGP --]', + 'it' => '[-- FINE DEL MESSAGGIO FIRMATO CON PGP --]', + 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸½ªÎ» --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ³¡ --]', + 'lt' => '', + 'nl' => '', + 'pl' => '[-- KONIEC LISTU PODPISANEGO PGP --]', + 'pt_BR' => '', + 'ru' => '[-- ëÏÎÅà ÓÏÏÂÝÅÎÉÑ, ÐÏÄÐÉÓÁÎÎÏÇÏ PGP --]', + 'sk' => '', + 'sv' => '[-- SLUT PÅ MEDDELANDE SIGNERAT MED PGP --]', + 'tr' => '', + 'uk' => '[-- ë¦ÎÅÃØ ÐÏצÄÏÍÌÅÎÎÑ Ú PGP ЦÄÐÉÓÏÍ --]', + 'zh_CN' => '', + 'zh_TW' => '' +); +my %mutt_pgpclearsigstart = ( + 'bg' => '[-- ÍÀ×ÀËÎ ÍÀ PGP-ÏÎÄÏÈÑÀÍÎÒÎ ÏÈÑÌÎ --]', + 'ca' => '[-- COMENÇA EL MISSATGE PGP SIGNAT --]', + 'cs' => '[-- ZAÈÁTEK PODEPSANÉ PGP ZPRÁVY --]', + 'el' => '[-- ÅÍÁÑÎÇ ÕÐÏÃÅÃÑÁÌÌÅÍÏÕ PGP ÌÇÍÕÌÁÔÏÓ --]', + 'eo' => '[-- KOMENCO DE PGP-SUBSKRIBITA MESAØO --]', + 'es' => '[-- PRINCIPIO DEL MENSAJE FIRMADO CON PGP --]', + 'et' => '[-- PGP ALLKIRJASTATUD TEATE ALGUS --]', + 'fr' => '[-- DÉBUT DE MESSAGE SIGNÉ PGP --]', + 'gl' => '[-- COMEZA A MESAXE FIRMADA CON PGP --]', + 'hu' => '[-- PGP ALÁÍRT LEVÉL KEZDÕDIK --]', + 'id' => '[-- AWAL SURAT DG TANDATANGAN PGP --]', + 'it' => '[-- INIZIO DEL MESSAGGIO FIRMATO CON PGP --]', + 'ja' => '[-- PGP½ð̾¥á¥Ã¥»¡¼¥¸³«»Ï --]', + 'ko' => '[-- PGP ¼­¸í ¸ÞÀÏ ½ÃÀÛ --]', + 'lt' => '[-- PGP PASIRAÐYTO LAIÐKO PRADÞIA --]', + 'nl' => '[-- BEGIN PGP ONDERTEKEND BERICHT --]', + 'pl' => '[-- POCZ¡TEK LISTU PODPISANEGO PGP --]', + 'pt_BR' => '[-- INÍCIO DE MENSAGEM ASSINADA POR PGP --]', + 'ru' => '[-- îÁÞÁÌÏ ÓÏÏÂÝÅÎÉÑ, ÐÏÄÐÉÓÁÎÎÏÇÏ PGP --]', + 'sk' => '[-- ZAÈIATOK SPRÁVY PODPÍSANEJ S PGP --]', + 'sv' => '[-- MEDDELANDE SIGNERAT MED PGP BÖRJAR --]', + 'tr' => '[-- PGP IMZALANMIÞ ILETI BAÞI --]', + 'uk' => '[-- ðÏÞÁÔÏË ÐÏצÄÏÍÌÅÎÎÑ Ú PGP ЦÄÐÉÓÏÍ --]', + 'zh_CN' => '[-- PGP Ç©ÃûµÄÐżþ¿ªÊ¼ --]', + 'zh_TW' => '[-- PGP 簽名的信件開始 --]' +); +my %mutt_pgpoutstart = ( + 'bg' => '[-- ñëåäâà ðåçóëòàòà îò PGP (òåêóùî âåìå: ', + 'ca' => '[-- Aquesta és l\'eixida de PGP (data actual: ', + 'cs' => '[-- následuje výstup PGP (aktuální èas: ', + 'da' => '[-- PGP-uddata følger (aktuelt tidspunkt: ', + 'de' => '[-- PGP-Ausgabe folgt (aktuelle Zeit: ', + 'el' => '[-- Áêïëïõèåß Ýîïäïò ôïõ PGP (ôñÝ÷ïõóá þñá: ', + 'eo' => '[-- Eligo de PGP sekvas (nuna horo: ', + 'es' => '[-- Salida de PGP a continuación (tiempo actual: ', + 'et' => '[-- järgneb PGP väljund (praegune aeg: ', + 'fr' => '[-- La sortie PGP suit (heure courante : ', + 'gl' => '[-- Saída PGP a continuación (hora actual: ', + 'hu' => '[-- PGP kimenet következik (idõ: ', + 'id' => '[-- Keluaran dari PGP (waktu skrg: ', + 'it' => '[-- Segue l\'output di PGP (ora attuale: ', + 'ja' => '[-- PGP ½ÐÎϤϰʲ¼¤ÎÄ̤ê (¸½ºß»þ¹ï: ', + 'ko' => '[-- PGP Ãâ·Â (ÇöÀç ½Ã°£: ', + 'lt' => '[-- Toliau PGP iðvestis (esamas laikas: ', + 'nl' => '[-- PGP uitvoer volgt (Huidige tijd: ', + 'pl' => '[-- Wynik dzia³ania PGP (bie¿±ca data i czas: ', + 'pt_BR' => '[-- Saída do PGP a seguir (hora atual: ', + 'ru' => '[-- òÅÚÕÌØÔÁÔ ÒÁÂÏÔÙ ÐÒÏÇÒÁÍÍÙ PGP (ÔÅËÕÝÅÅ ×ÒÅÍÑ: ', + 'sk' => '[-- Nasleduje výstup PGP (aktuálny èas: ', + 'sv' => '[-- Utdata från PGP följer (aktuell tid: ', + 'tr' => '[-- PGP geri verisi (geçerli zaman: ', + 'uk' => '[-- ÔÅËÓÔ ÎÁ ×ÉÈÏĦ PGP (ÞÁÓ: ', + 'zh_CN' => '[-- ÒÔÏÂΪ PGP Êä³öµÄ×ÊÁÏ£¨ÏÖÔÚʱ¼ä£º ', + 'zh_TW' => '[-- 以下為 PGP 輸出的資料(現在時間:' +); +my %mutt_pgpoutend = ( + 'bg' => '[-- Êðàé íà PGP-ðåçóëòàòà --]', + 'ca' => '[-- Final de l\'eixida de PGP. --]', + 'cs' => '[-- Konec výstupu PGP --]', + 'da' => '[-- Slut på PGP-uddata --]', + 'de' => '[-- Ende der PGP-Ausgabe --]', + 'el' => '[-- ÔÝëïò ôçò åîüäïõ PGP --]', + 'eo' => '[-- Fino de PGP-eligo --]', + 'es' => '[-- Fin de salida PGP --]', + 'et' => '[-- PGP väljundi lõpp --]', + 'fr' => '[-- Fin de sortie PGP --]', + 'gl' => '[-- Fin da saída PGP --]', + 'hu' => '[-- PGP kimenet vége --]', + 'id' => '[-- Akhir keluaran PGP --]', + 'it' => '[-- Fine dell\'output di PGP --]', + 'ja' => '[-- PGP½ÐÎϽªÎ» --]', + 'ko' => '[-- PGP Ãâ·Â ³¡ --]', + 'lt' => '[-- PGP iðvesties pabaiga --]', + 'nl' => '[-- Einde van PGP uitvoer --]', + 'pl' => '[-- Koniec komunikatów PGP --]', + 'pt_BR' => '[-- Fim da saída do PGP --]', + 'ru' => '[-- ëÏÎÅà ×Ù×ÏÄÁ ÐÒÏÇÒÁÍÍÙ PGP --]', + 'sk' => '[-- Koniec výstupu PGP --]', + 'sv' => '[-- Slut på utdata från PGP --]', + 'tr' => '[-- PGP geri verisi sonu --]', + 'uk' => '[-- ë¦ÎÅÃØ ÔÅËÓÔÕ ÎÁ ×ÉÈÏĦ PGP --]', + 'zh_CN' => '[-- PGP Êä³ö²¿·Ý½áÊø --]', + 'zh_TW' => '[-- PGP 輸出部份結束 --]' +); +# }}} +# set the defaults to the C locale +$mutt_attachment = '[-- Attachment #'; +$mutt_contenttype = '[-- Type: '; +$mutt_pgpsigned = '[-- End of signed data --]'; +$mutt_beginsigned = '[-- The following data is signed --]'; +$mutt_pgpclearsigstart = '[-- BEGIN PGP SIGNED MESSAGE --]'; +$mutt_pgpclearsigned = '[-- END PGP SIGNED MESSAGE --]'; +$mutt_pgpencrypted = '[-- End of PGP/MIME encrypted data --]'; +$mutt_pgpoutstart = '[-- PGP output follows (current time:'; +$mutt_pgpoutend = '[-- End of PGP output --]'; + +# gpg's locales as in gpg-1.4.0 {{{ +my %gpg_WARNING = ( + 'be' => '', + 'ca' => 'AV�S: ', + 'cs' => 'VAROVÁNÍ: ', + 'da' => 'ADVARSEL: ', + 'de' => 'WARNUNG: ', + 'el' => 'ÐÑÏÅÉÄÏÐÏÉÇÓÇ: ', + 'eo' => 'AVERTO: ', + 'es' => 'ATENCIÓN: ', + 'et' => 'HOIATUS: ', + 'fi' => 'VAROITUS: ', + 'fr' => 'ATTENTION: ', + 'gl' => 'AVISO: ', + 'hu' => 'FIGYELEM: ', + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'AVISO: ', + 'pt_BR' => 'AVISO: ', + 'ro' => 'AVERTISMENT: ', + 'ru' => 'ВНИМАНИЕ: ', + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', + 'zh_CN' => '警告:我们不信任这把密钥!', + 'zh_TW' => 'ĵ§i¡G§Ú­Ì *¤£* «H¥ô³o§âª÷Æ_¡I' +); +my %gpg_Warning = ( + 'be' => '', + 'ca' => 'AV�S: ', + 'cs' => 'VAROVÁNÍ: ', + 'da' => '', + 'de' => 'Warnung: ', + 'el' => 'ÐÑÏÅÉÄÏÐÏÉÇÓÇ: ', + 'eo' => 'AVERTO: ', + 'es' => 'ATENCIÓN: ', + 'et' => 'HOIATUS: ', + 'fi' => 'VAROITUS: ', + 'fr' => 'AVERTISSEMENT: ', + 'gl' => 'AVISO: ', + 'hu' => 'FIGYELEM: ', + 'id' => 'PERINGATAN: ', + 'it' => 'ATTENZIONE: ', + 'ja' => '·Ù¹ð: ', + 'pl' => 'OSTRZE¯ENIE: ', + 'pt' => 'CUIDADO: ', + 'pt_BR' => 'CUIDADO: ', + 'ro' => 'AVERTISMENT: ', + 'ru' => 'ВНИМАНИЕ: ', + 'sk' => 'VAROVANIE: ', + 'sv' => 'VARNING: ', + 'tr' => 'UYARI: ', + 'zh_CN' => '警告:加密过的报文已经变造!', + 'zh_TW' => 'ĵ§i¡G¥[±K¹Lªº°T®§¤w¸g³QÅܳy¤F¡I' +); +my %gpg_Cantcheck = ( + 'be' => '', + 'ca' => 'No sha pogut comprovar la signatura: ', + 'cs' => 'Nemohu ovìøit podpis: ', + 'da' => 'Kan ikke tjekke signatur: ', + 'de' => 'Unterschrift kann nicht geprüft werden: ', + 'el' => 'Áäõíáìßá åëÝã÷ïõ ôçò õðïãñáöÞò: ', + 'eo' => 'Ne povas kontroli subskribon: ', + 'es' => 'Imposible comprobar la firma: ', + 'et' => 'Allkirja ei saa kontrollida: ', + 'fi' => 'Allekirjoitusta ei voi tarkistaa: ', + 'fr' => 'Impossible de vérifier la signature: ', + 'gl' => 'Non foi posible verifica-la sinatura: ', + 'hu' => 'Nem tudom ellenõrizni az aláírást: ', + 'id' => 'Tidak dapat memeriksa signature: ', + 'it' => 'Impossibile controllare la firma: ', + 'ja' => '½ð̾¤ò¸¡ºº¤Ç¤­¤Þ¤»¤ó: ', + 'pl' => 'Nie mo¿na sprawdziæ podpisu: ', + 'pt' => 'Impossível verificar assinatura: ', + 'pt_BR' => 'Impossível verificar assinatura: ', + 'ro' => 'Nu pot verifica semnãtura: ', + 'ru' => 'Не могу проверить подпись: ', + 'sk' => 'Nemô¾em overi» podpis: ', + 'sv' => 'Kan inte verifiera signaturen: ', + 'tr' => 'Ä°mza kontrol edilemedi: ', + 'zh_CN' => '无法检查签字:', + 'zh_TW' => 'µLªkÀˬdñ³¹¡G ' +); +my %gpg_aka = ( + 'be' => '', + 'ca' => ' alias ', + 'cs' => ' alias ', + 'da' => ' alias ', + 'de' => ' alias ', + 'el' => ' ãíùóôü óáí ', + 'eo' => ' alinome ', + 'es' => ' alias ', + 'et' => ' ka ', + 'fr' => ' alias « ', + 'gl' => ' alias ', + 'hu' => ' azaz ', + 'id' => ' alias ', + 'it' => ' alias ', + 'ja' => ' ÊÌ̾¡È', + 'pl' => ' alias ', + 'pt' => ' ou ', + 'pt_BR' => ' ou ', + 'sk' => ' alias ', + 'sv' => ' även känd som ', + 'tr' => ' den ', + 'zh_CN' => ' 亦即“', + 'zh_TW' => ' ¥ç§Y ' +); +my %gpg_bad = ( + 'be' => 'нерэчаісны хэш-альгарытм ', + 'ca' => 'Signatura INCORRECTA de ', + 'cs' => '©PATNÝ podpis od ', + 'da' => 'DÅRLIG signatur fra ', + 'de' => 'FALSCHE Unterschrift von ', + 'el' => 'ÊÁÊÇ õðïãñáöÞ áðü ', + 'eo' => 'MALBONA subskribo de ', + 'es' => 'Firma INCORRECTA de ', + 'et' => 'HALB allkiri kasutajalt ', + 'fi' => 'VÄÄRÄ allekirjoitus lähettäjältä ', + 'fr' => 'MAUVAISE signature de « ', + 'gl' => 'Sinatura INCORRECTA de', + 'hu' => 'ROSSZ aláírás a következõtõl: ', + 'id' => 'signature BURUK dari ', + 'it' => 'Firma NON corretta da ', + 'ja' => '¡È', + 'pl' => 'NIEPOPRAWNY podpis z³o¿ony przez ', + 'pt' => 'Assinatura INCORRECTA de ', + 'pt_BR' => 'Assinatura INCORRETA de ', + 'ro' => 'Semnãturã INCORECTà din ', + 'ru' => 'ПЛОХАЯ подпись от ', + 'sk' => 'ZLÝ podpis od ', + 'sv' => 'FELAKTIG signatur frÃ¥n ', + 'tr' => 'KÖTÜ imza: ', + 'zh_CN' => '已损坏的签字,来自于“', + 'zh_TW' => '*·lÃa* ªºÃ±³¹¨Ó¦Û©ó ' +); +my %gpg_expired = ( + 'be' => '', + 'ca' => 'Nota: La clau ha caducat!', + 'cs' => 'Poznámka: Skonèila platnost tohoto klíèe!', + 'da' => 'Bemærk: Denne nøgle er forældet!', + 'de' => 'Hinweis: Dieser Schlüssel ist verfallen!', + 'el' => 'Óçìåßùóç: Áõôü ôï êëåéäß Ý÷åé ëÞîåé!', + 'eo' => 'Noto: Æi tiu þlosilo eksvalidiøis!', + 'es' => 'Nota: ¡Esta clave ha caducado!', + 'et' => 'Märkus: See võti on aegunud!', + 'fi' => 'Huom: Tämä avain on vanhentunut!', + 'fr' => 'Note: Cette clé a expiré !', + 'gl' => 'Nota: ¡Esta chave xa caducou!', + 'hu' => 'Megjegyzés: Ez a kulcs lejárt!', + 'id' => 'Catatan: Kunci ini telah berakhir!', + 'it' => 'Nota: questa chiave è scaduta!', + 'ja' => 'Ãí°Õ: ¤³¤Î¸°¤ÏËþλ¤Ç¤¹!', + 'pl' => 'Uwaga: Data wa¿no¶ci tego klucza up³ynê³a!', + 'pt' => 'Nota: Esta chave expirou!', + 'pt_BR' => 'Nota: Esta chave expirou!', + 'ro' => 'Notã: Aceastã cheie a expirat!', + 'ru' => 'ПРЕДУПРЕЖДАЮ: Данный ключ просрочен!', + 'sk' => 'Poznámka: Skonèila platnos» tohto kµúèa!', + 'sv' => 'Obs: Giltighetstiden för denna nyckel har gÃ¥tt ut!', + 'tr' => 'Bilgi: Bu anahtarın kullanım süresi dolmuştu!', + 'zh_CN' => '注意:这把密钥已经过期了!', + 'zh_TW' => '½Ðª`·N¡G³o§âª÷Æ_¤w¸g¹L´Á¤F¡I' +); +my %gpg_good = ( + 'be' => 'нерэчаісны хэш-альгарытм ', + 'ca' => 'Signatura correcta de ', + 'cs' => 'Dobrý podpis od ', + 'da' => 'God signatur fra ', + 'de' => 'Korrekte Unterschrift von ', + 'el' => 'ÊáëÞ õðïãñáöÞ áðü ', + 'eo' => 'Bona subskribo de ', + 'es' => 'Firma correcta de ', + 'et' => 'Korrektne allkiri kasutajalt ', + 'fi' => 'Allekirjoitus täsmää lähettäjään ', + 'fr' => 'Bonne signature de « ', + 'gl' => 'Sinatura correcta de ', + 'hu' => 'Jó aláírás a következõtõl: ', + 'id' => 'Signature baik dari ', + 'it' => 'Firma valida da ', + 'ja' => '¡È', + 'pl' => 'Poprawny podpis z³o¿ony przez ', + 'pt' => 'Assinatura correcta de ', + 'pt_BR' => 'Assinatura correta de ', + 'ro' => 'Semnãturã bunã din ', + 'ru' => 'Действительная подпись от ', + 'sk' => 'Dobrý podpis od ', + 'sv' => 'Korrekt signatur frÃ¥n ', + 'tr' => 'Kullanıcı kimliği: ', + 'zh_CN' => '完好的签字,来自于“', + 'zh_TW' => '§¹¦nªºÃ±³¹¨Ó¦Û©ó ' +); +my %gpg_bug = ( + 'be' => '', + 'ca' => '... a�� �s un bug (', + 'cs' => '... toto je chyba v programu (', + 'da' => '... dette er en fejl (', + 'de' => '... dies ist ein Bug (Programmfehler) (', + 'el' => '... áõôü åßíáé bug (', + 'eo' => '... æi tio estas cimo (', + 'es' => '... esto es un bug (', + 'et' => '... see on viga (', + 'fi' => '...tämä on ohjelmistovika (', + 'fr' => '... cest un bug (', + 'gl' => '... isto é un erro (', + 'hu' => 'Ez egy programhiba... (', + 'id' => '... kesalahan (', + 'it' => '... questo è un bug (', + 'ja' => '... ¥Ð¥°¤Ç¤¹ (', + 'pl' => '... to jest b³±d programu (', + 'pt' => '... isto é um bug (', + 'pt_BR' => '... isto é um bug (', + 'ro' => '... acesta este un bug (', + 'ru' => ' ... это ошибка (', + 'sk' => '... toto je chyba v programe (', + 'sv' => '... detta är ett fel i programmet (', + 'tr' => '... bu bir yazılım hatası (', + 'zh_CN' => '……这是个程序缺陷(', + 'zh_TW' => '... ³o¬O­Ó·å²« (' +); +# }}} +# set the defaults to the C locale +$gpg_WARNING = 'WARNING: '; +# (yes, the translations in gnupg's po files *are* braindamaged): +$gpg_Warning = 'WARNING: '; +$gpg_Cantcheck = 'Can\'t check signature: '; +$gpg_aka = ' aka '; +$gpg_bad = 'BAD signature from '; +$gpg_expired = 'Note: This key has expired!'; +$gpg_good = 'Good signature from'; +# (actually, this bugs me quite often since upgrading gpg from v1.0.7): +$gpg_bug = '... this is a bug ('; + # help(): print help text and exit with appropriate exit code sub help { print "Usage: $0 [options] -a remove ad footers; requires -A -A=DIRECTORY ad footer directory, treat ad footers as signature + --bigq[=n[,x]] remove all but x lines of quotes with more than n + lines; default is n=30 and x=10 -c merge multiple blank lines + --check[=FLAGS] check various criteria, print error message and quit; + see man page for details -d, --debug print notice to syslog when bouncing; requires -p --diff tolerate diffs appended *after* the signature -e force ellipsis for excessive punctuation + --ftr-ad enable aggressive ad footer matching; requires -A + --ftr-ml enable aggressive mailing list footer matching; req. -L -h, --help show this short help and exit -i=INFILE file to be read; '-' for STDIN (default) + -k try to fix \"Kammquotes\" + --kminl=n min. line length for wrapped line; requires -k + --kmaxl=n max. line length for wrapped line; requires -k + --kdiff=n max. length difference between wrapped lines; req. -k -L=DIRECTORY mailling list footer directory, treat mailing list footers as signature -l delete mailing list footer; requires -L + --lax-security use unsafe writing method; USE ON YOUR OWN RISK! + --locale=LOCALE internationalization; currently only used with -Mmutt -M, --mua=MUA turn on special treatment for some mail user agents -m delete MS style TOFU; careful: might be too agressive - -o=OUTFILE file to be written to; '-' for STDOUT (default) + --ms-smart try to be smart with MS style TOFU; req. -Mmutt and -m + -o=OUTFILE file to be written to; '-' for STDOUT (default), 'NONE' + for no output at all -P=MESSAGE user defined bounce message; requires -p - -p=ADDRESS redirect to ADDRESS if no TOFU was found + -p[=ADDRESS] redirect to ADDRESS if no TOFU was found + --pgp-move move pgp verification output to bottom; requires -Mmutt + --pgp-move-vrf move pgp output if verified and good; requires -Mmutt + --pgp-short hide non-relevant pgp key uids; requires -Mmutt -r delete mail header lines -S[=n] supress signatures with more than n lines; default is $maxsig if n not specified -s delete signature + --sigsmax[=n] max number of sigs tolerated, no value for unlimited + --spass enable SpamAssassin workaround -t delete traditional style TOFU -v, --version show version string and exit -w delete trailing whitespaces\n"; - exit($EX_USAGE); + exit(EX_USAGE); } # version(): print version info and exit with appropriate exit code sub version { - print "$0 v$VER$REV ($REL), Jochen Striepe + print "$0 v".VER.REV." (Rev. ".REL."), Jochen Striepe Get the latest version at \n"; - exit($EX_OK); + exit(EX_OK); +} + +# sigint_handler(): what to do if we receive a single SIGINT +sub sigint_handler { + $sigint = 1; } +# esc(): escapes a scalar reference for use in perl regexp +sub esc { ${$_[0]} =~ s/([\[\]\(\)\*\.\-\^\$\@])/\\$1/go; } + # remove_footers(): remove any trailing appearance of footers contained # in the given directory. sub remove_footers { - my $L = shift; # array of message lines - my $S = shift; # array to store removed lines in - my $F = shift; # footers dir name - my $O = shift; # remove only one footer? - - if ($F && scalar(@$L)) { - opendir(DIR, $F) || die "Could not open $F: $!"; - my @feet = grep { /^[^.]/ && -f "$F/$_" } readdir DIR; - closedir DIR; - - foreach my $f (@feet) { - open(IN, "$F/$f") || die "Could not open $F/$f: $!"; - my @l = ; - close IN; - - while (scalar(@l)<=scalar(@$L)) { - my $y = 0; - for(my $x=1; $x<=scalar(@l); $x++) { - chomp($l[scalar(@l)-$x]); - if (index($$L[scalar(@$L)-$x], $l[scalar(@l)-$x])!=0) { - $y = 1; - } - } - if (!$y) { - unshift(@$S, @$L[$#$L-$#l..$#$L]); - splice(@$L, $#$L-$#l); - while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) { - unshift(@$S, pop(@$L)); - } - if ($O) { last; } - } - else { last; } - } - } - } + my $L = shift; # array of message lines + my $S = shift; # array to store removed lines in + my $F = shift; # footers dir name + my $O = shift; # remove only one footer? + my $V = shift; # allow footers match before end of message + my $off; + + if (!defined $V) { + for ($off = 0; $#$L>=$off && $$L[$#$L-$off] =~ /^\s*$/; $off++) {;}; + } + + if ($F && scalar(@$L)) { + if (!opendir(DIR, $F)) { print STDERR "Could not open $F: $!\n"; exit(EX_IOERR); } + my @feet = grep { /^[^.]/ && -f "$F/$_" } readdir DIR; + closedir DIR; + + foreach my $f (@feet) { + if (!open(IN, "$F/$f")) { print STDERR "Could not open $F/$f: $!\n"; exit(EX_IOERR); } + my @l = ; + close IN; + + if (!scalar(@l)) { next; } + for (my $z=0; $z<=$#l; $z++) { chomp($l[$z]); } + + if (defined $V) { + WIPE: for (my $z=scalar(@$L)-scalar(@l); $z>=0; $z--) + { + if (scalar(@l)+$z<=scalar(@$L)) { + my $y = 0; + for(my $x=1; $x<=scalar(@l); $x++) { + if (index($$L[scalar(@$L)-$x-$z], $l[scalar(@l)-$x])!=0) { + $y = 1; + } + } + if (!$y) { + unshift(@$S, @$L[$#$L-$#l-$z..$#$L]); + splice(@$L, $#$L-$#l-$z); + while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) { + unshift(@$S, pop(@$L)); + } + if ($O) { last; } else { goto WIPE; } + } + } + } + } + else { + while (scalar(@l)<=scalar(@$L)) { + for(my $x=1; $x<=scalar(@l); $x++) { + if (index($$L[scalar(@$L)-$x-$off], $l[scalar(@l)-$x])!=0) { + goto FINISH; + } + } + unshift(@$S, @$L[$#$L-$off-$#l..$#$L]); + splice(@$L, $#$L-$off-$#l); + while (scalar(@$L) && $$L[$#$L] =~ /^\s*$/) { + unshift(@$S, pop(@$L)); + } + if ($O) { last; } + } + FINISH: + } + } + } +} + +# decomb(): Try to detect and fix zig-zag shaped quoting (a.k.a. German +# "Kammquoting"). +sub decomb { + my $L = shift; # array of message lines + my $V = shift; # array with verbatim list + my $max = 0; # plausible wraparound pos + + # We scan the whole message first for a plausible common maximum line + # length where longer lines would be wrapped. + for (my $x=0; $x<$#$L; $x++) { + if ($$V[$x]!=1 && $max$max || + (index($$L[$x+1], ' ')<0 && length($$L[$x])+length($$L[$x+1])>$max)) && + (length($$L[$x])+length($$L[$x+1])<$kmaxl) && + (length($$L[$x])+length($$L[$x+1])>$kminl) && + (length($$L[$x])-length($$L[$x+1])>$kdiff) && + ($$L[$x+2] !~ /^\s*$/)) + { + $$L[$x] =~ s/\s*$/' ' . $$L[$x+1]/e; + splice(@$L, $x+1, 1); + splice(@$V, $x+1, 1); + } + } +} + +# debigq(): Finds big quotes (more than $n lines quoted) and deletes all +# but $x lines of them. +sub debigq { + my $L = shift; # array of message lines + my $V = shift; # array with verbatim list + my $k = 0; + + for (my $i=0; $i<=$#$L; $i++) { + + if ($$V[$i]) { + $k = 0; + next; + } + + if (index($$L[$i], $indent)==0) { $k++; } else { + if ($k>$bigqn) { + my $x = $k-$bigqx; + $i -= $k; + + $$L[$i] = "[---=| Quote block shrinked by $0: " . + "$x lines snipped |=---]\n"; + $i++; + splice(@$L, $i, $x-1); + splice(@$V, $i, $x-1); + + $i++; + } + $k = 0; + } + } +} + +# pgp(): treat mutt(1)'s pgp/gpg output contained in signed or encrypted +# messages +sub pgp { + + sub verified { + my $L = shift; # message body + my $X = shift; # start line + my $Z = shift; # end line + + my $ok = 0; + + while ($X<$Z) { + if ($$L[$X] =~ /^gpg:\s(?:$gpg_WARNING|$gpg_Warning|$gpg_bad|$gpg_Cantcheck|$gpg_expired)/o) + { return 0; } + if ($$L[$X] =~ /^gpg:\s$gpg_bug/o) + { return 0; } + if ($$L[$X] =~ /^gpg:\s$gpg_good/o) + { $ok = 1; } + $X++; + } + + return $ok; + } + + my $L = shift; # message body + my $V = shift; # verbatim list + my $H = shift; # headers + + my @tmp = (); + my $tmp = 0; + + for (my $x=0; $x1 && + $$L[$i] =~ /^gpg:\s$gpg_aka/o && $$L[$i] !~ /$from/) + { + splice(@$L, $i, 1); + splice(@$V, $i, 1); + $i--; + } + elsif ($$L[$i]=~/^(?:\e.+?\a)?(?:$mutt_pgpoutend)/o) + { + if ($pgpmove || + ($pgpmovevrf && (!$sigint) && verified($L, $x+1, $i))) + { + push(@{$tmp[++$tmp]}, "\n", @$L[$x..($i+1)]); + splice(@$L, $x, $i-$x+2); + splice(@$V, $x, $i-$x+2); + $i -= $#{$tmp[$tmp]}-2; + } + $x = $i; + last; + } + } + } + elsif ($tmp && + $$L[$x]=~/^(?:\e.+?\a)?(?:$mutt_pgpencrypted|$mutt_pgpclearsigned|$mutt_pgpsigned)/o) + { + splice(@$L, $x+1, 0, @{$tmp[$tmp]}); + for (my $i=$x; $i0) { + push(@$L, @{$tmp[$tmp--]}); + pop(@tmp); + for (my $i=$#$V; $i<$#$L; $i++) { push(@$V, 0); } + } } # write_msg(): output sub write_msg { - my $O = shift; - my $l; - - open(OUT, $O) || die "Could not open $O: $!"; - while (scalar(@_)) { - $l = shift; - if (defined $l) { - $^W = 0; - print OUT @$l; - $^W = 1; - } - } - close OUT; + my $O = shift; + my $l; + + if ((!$lax) && ($O =~ /^>(.*)/) && ($1 ne '-')) { + if (!sysopen(OUT, $1, O_EXCL|O_CREAT|O_WRONLY)) { + print STDERR "Could not open $1: $!\n"; exit(EX_IOERR); + } + } + elsif (!open(OUT, $O)) { + print STDERR "Could not open $O: $!\n"; exit(EX_IOERR); + } + while (scalar(@_)) { + $l = shift; + if (defined $l) { + $^W = 0; + print OUT @$l; + $^W = 1; + } + } + close OUT; } # process_msg(): This one proc does *everything* what has to be done with # the lines of the message sub process_msg { - my $lines = shift; - - my ($j, $x, $verb) = (0, 0, 0); - my (@ads, @hdr, @bo1, @bo2, @ftr, @sig, @vrb, @att) = - ((), (), (), (), (), (), (), (), ()); - - # First, remove and store lines we might need later... - # Remove headers: - for ($x=0; $x<$#$lines; $x++) { if (@$lines[$x] =~ /^$/) { last; }; } - @hdr = @$lines[0..$x]; - splice(@$lines, 0, $x+1); - - # See if we have a multipart content type. If yes, see if it is already - # ripped (e.g. by mutt(1)), otherwise only leave the first part if it - # is plain text (if not, we are done - non-text messages are not our - # business). - if (lc($mua) ne 'mutt') { - for ($x=0; $x=scalar(@$lines)) { exit($EX_DATAERR); } - - if ($bar =~ /^text\/plain/i) { - my $z; - for ($z=1; $x+$z<@$lines; $z++) { - if (index($$lines[$x+$z], '--'.$foo)==0) { - last; - } - } - if ($x+$z>=scalar(@$lines)) { exit($EX_DATAERR); } - - @bo2 = @$lines[$x+$z..$#$lines]; - splice(@$lines, $x+$z); - if ($$lines[$#$lines] =~ /^\s*$/) { - unshift(@bo2, pop @$lines); - } - @bo1 = @$lines[0..$x]; - splice(@$lines, 0, $x+1); - last; - } - else { - write_msg(($mda?"|$sendmail $mda":">$ofile"), - ($hdrs?undef:\@hdr), $lines); - exit; - } - } - } - } - last; - } - } - } - - - # Protect verbatims: - $verb = 0; - for ($x=0; $x[]*\[-- Attachment #(\d+)(: .*)? --\]\s*$/ && - (($1 ne '1') || - ($x[]*\[-- Type: text\/plain/))) || - ($$lines[$x] =~ /^[^>[]*\[-- End of .* data --\]\s*$/)) - { - @att = @$lines[$x..$#$lines]; - splice(@$lines, $x); - if (scalar(@$lines) && $$lines[$#$lines] =~ /^\s*$/) { - unshift(@att, pop(@$lines)); - } - last; - } - } - - # Pipe message/rfc822 parts to another instance of process_msg() - # for further processing. - # Please note that we cannot see what a hierarchy the original - # message had -- if there were message/rfc822 parts within other - # message/rfc822 parts constellations can occur which we cannot - # resolve. Therefore we simply do not even try to be smart. This - # should work for most situations: - if (scalar(@att)) { - for ($x=0; $x<$#att; $x++) { - if ($vrb[scalar(@$lines)+$x]) { next; } - # The following regexp is quite ugly because for most - # users the line is coloured using termcap... (bah!) - if ($att[$x]=~/^[^>[]*\[-- Attachment #\d+(: .*)? --\]\s*$/ && - $att[$x+1] =~ /^[^>[]*\[-- Type: message\/rfc822/) - { - $x += 2; - while ($att[$x] !~ /^\s*$/) { $x++; } - $x++; - - my @tmp = @att[$x..$#att]; - process_msg(\@tmp); - splice(@att, $x, scalar(@att)-$x, @tmp); - } - } - } - } - - # Remove ML footers: - remove_footers($lines, \@ftr, $footers, undef); - - # Remove ad footers: - remove_footers($lines, \@ads, $ads, undef); - - # Remove signature: - if (scalar(@$lines)) { - for ($x=0; $x$lsig))) { - if ($lsig && !$sig) { - push(@sig, "[---=| Overlong signature removed by $0: " . - (scalar(@$lines)-$x) . " lines snipped |=---]\n"); - } - splice(@$lines, $x); - } - elsif ($#$lines-$x<=($lsig?$lsig:$maxsig)) { - @sig = @$lines[$x..$#$lines]; - splice(@$lines, $x); - } - last; - } - } - } - - # Now care about TOFU. - # One common mispractice is M$ style TOFU: - if ($ms) { - # bloat this array if you want more internationalization: - my @tofu = ('Original Message', - 'Ursprüngliche Nachricht', - 'Ursprungliche Nachricht', - 'Mensagem original'); - - DONE: for ($x=0; $x=0; $x--) { - if ((!$vrb[$x]) && $$lines[$x] =~ /^\s*$/) { - if ($t<2) { $t++; } else { splice(@$lines, $x, 1); } - } - else { $t = 0; } - } - } - - # Everything changing the body is done now. Time to fix the line count - # header so naive clients do not get confused. Just to be sure, append - # the old line count to X-headers. - my $l = scalar(@bo1) + scalar(@$lines) + scalar(@att) + scalar(@bo2) + - (!$sig?scalar(@sig):0) + (!$ml?scalar(@ftr):0) + - (!$ad?scalar(@ads):0); - for ($x=0; $x=scalar(@$lines)) { exit(EX_DATAERR); } + + if ($bar =~ /^text\/plain/i) { + my $z; + for ($z=1; $x+$z<@$lines; $z++) { + if (index($$lines[$x+$z], '--'.$foo)==0) { + last; + } + } + if ($x+$z>=scalar(@$lines)) { exit(EX_DATAERR); } + + @bo2 = @$lines[$x+$z..$#$lines]; + splice(@$lines, $x+$z); + if ($$lines[$#$lines] =~ /^\s*$/) { + unshift(@bo2, pop @$lines); + } + @bo1 = @$lines[0..$x]; + splice(@$lines, 0, $x+1); + last; + } + else { + write_msg(($mda?'|'.SENDMAIL." $mda":">$ofile"), + ($hdrs?undef:\@hdr), $lines); + exit; + } + } + } + } + last; + } + } + } + + + # Protect verbatims: + $verb = 0; + for ($x=0; $x=$check_ratio) { + print $msg_ratio; + exit EX_UNAVAILABLE; + } + } + + # Remove ML footers: + remove_footers($lines, \@ftr, $footers, undef, $ftr_ml); + + # Remove ad footers: + remove_footers($lines, \@ads, $ads, undef, $ftr_ad); + + if ($mua eq 'mutt') { + # See if we find pgp output generated by mutt before we scramble + # the thing. If yes, see if we can beautify it. + if ($pgpshort || $pgpmove || $pgpmovevrf) { pgp($lines, \@vrb, \@hdr); } + + # Remove all but the first attachment (if this is text/plain) + # mutt did introduce (bah!). Remember, all this ugliness could + # be replaced with a proper and clean edit_filter patch in + # mutt(1) itself... + for ($x=$#$lines; $x>=0; $x--) { + if ($vrb[$x]) { next; } + # The following regexp's are quite ugly because for most users + # these lines are coloured using termcap... (bah!) + if (($$lines[$x] =~ /^(?:\e.+?\a)?$mutt_attachment(\d+)(?::.*)? \-\-\]/o && + (($1 ne '1') || + ($x<$#$lines && + $$lines[$x+1] !~ /^(?:\e.+?\a)?(?:$mutt_contenttype)(?:text\/plain|application\/pgp)/io))) || + ($$lines[$x] =~ /^(?:\e.+?\a)?(?:$mutt_pgpsigned|$mutt_pgpclearsigned|$mutt_pgpencrypted)/o)) + { + # Strip attachments to prepare further processing + unshift(@att, @$lines[$x..$#$lines]); + splice(@$lines, $x); + # Try to fix trailing empty lines + while (scalar(@$lines) && $$lines[$#$lines] =~ /^(?:\e.+?\a)?\s*$/) { + unshift(@att, pop(@$lines)); + } + + # Remove ML and ad footers within attachments: + my @tmp; + if ($ml) { remove_footers($lines, \@tmp, $footers, undef); } + if ($ad) { remove_footers($lines, \@tmp, $ads, undef); } + $x = scalar(@$lines); + } + } + + # care about the rest + if (scalar(@att)) { + for ($x=0; $x<$#att; $x++) { + if ($vrb[scalar(@$lines)+$x]) { next; } + + # Pipe message/rfc822 parts to another instance of + # process_msg() for further processing. + # Please note that we cannot see what a hierarchy the + # original message had -- if there were message/rfc822 + # parts within other message/rfc822 parts constellations + # can occur which we cannot resolve. Therefore we simply + # do not even try to be smart. This should work for most + # situations. + # The following regexp is quite ugly because for most + # users the line is coloured using termcap... (bah!) + if ($att[$x]=~/^(?:\e.+?\a)?$mutt_attachment\d+.* --\]/o && + $att[$x+1] =~ /^(?:\e.+?\a)?(?:$mutt_contenttype)message\/rfc822/o) + { + $x += 2; + while ($att[$x] !~ /^\s*$/) { $x++; } + $x++; + + my @tmp = @att[$x..$#att]; + process_msg(\@tmp); + splice(@att, $x, scalar(@att)-$x, @tmp); + $x += scalar(@tmp); + } + } + } + } + + # Remove signature: + if (scalar(@$lines)) { + my $sn = 0; + for ($x = $#$lines; $x>=0; $x--) { + if ((!$vrb[$x]) && $$lines[$x] =~ /^-- $/) { + if ($diff) { + for (my $i=1; $x+$i+1$lsig))) { + if ($lsig && !$sig) { + unshift(@sig, "[---=| Overlong signature removed by $0: " . + (scalar(@$lines)-$x) . " lines snipped |=---]\n"); + } + splice(@$lines, $x); + } + else { + unshift(@sig, @$lines[$x..$#$lines]); + splice(@$lines, $x); + } + if (defined($sign) && ++$sn==$sign) { last; } else { next; } + } + } + } + + # See if there is some Kammquoting to fix: + if ($kamm) { decomb($lines, \@vrb); } + + # Now care about TOFU. + # One common mispractice is M$ style TOFU: + if ($ms) { + # bloat this array if you want more internationalization: + my @tofu = ('Original Message', + 'Ursprüngliche Nachricht', + 'Ursprungliche Nachricht', + 'Mensagem original', + 'Ursprungligt meddelande', + 'Oorspronkelijk bericht', + 'Message d\'origine', + 'Forwarded message', + 'Weitergeleitete Nachricht / Forwarded Message'); + my $k = 0; # any text above? + my $tmp = 0; # flagged if inside PGP output + + DONE: for ($x=0; $x=0; $i--) { + if ($$lines[$i] =~ /^$indent/o) { + $j++; + $k = $i; + } + elsif ($$lines[$i] !~ /^\s*$/) { last; } + } + + if ($j) { + # if there is no text above, we will assume the message is meant + # as forwarding and therefore OK + for (my $i=$k-1; $i>=0; $i--) { + if ($$lines[$i] !~ /^\s*$/o) { + $x = 0; + last; + } + } + if ($x) { + $j = 0; + } else { + splice(@$lines, $k); + } + } + } + + # OK, if we found TOFU, we will leave a message that we were here... + if ($j) { + # make sendmail bounce if we shall be picky + # and indeed found something: + if ($mda) { + if ($mda ne '1') { + print STDERR $boun; + + if ($sysl) { + eval { require Sys::Syslog; }; + if ($@) { warn $@; } else { + Sys::Syslog::setlogsock('unix'); + Sys::Syslog::openlog("$0[$$]", 'pid', 'mail'); + Sys::Syslog::syslog('debug', 'bounced message %s', $hdr[0]); + Sys::Syslog::closelog(); + } + } + } + + exit EX_BOUNCE; + } + + # if we were invoked just for checking and indeed found something, + # print out the error message and quit: + if ($check) { + print $msg_quote; + exit EX_UNAVAILABLE; + } + + push(@$lines, "[---=| TOFU protection by $0: " . + "$j lines snipped |=---]\n"); + } + elsif ($mda eq '1') { exit EX_OK; } + + # Care for huge blocks of quoted original message: + if ($bigqn) { debigq($lines, \@vrb); } + + # Care for trailing whitespaces: + if ($trsp) { + for ($x=0; $x=0; $x--) { + if ((!$vrb[$x]) && $$lines[$x] =~ /^\s*$/) { + if ($t<2) { $t++; } else { splice(@$lines, $x, 1); } + } + else { $t = 0; } + } + } + + # Everything changing the body is done now. Time to fix the line count + # header so naive clients do not get confused. Just to be sure, append + # the old line count to X-headers. + my $l = scalar(@bo1) + scalar(@$lines) + scalar(@att) + scalar(@bo2) + + (!$sig?scalar(@sig):0) + (!$ml?scalar(@ftr):0) + + (!$ad?scalar(@ads):0); + if ($linecount-$l!=0) { + for ($x=0; $xd diff help>h mua>M version>v'); +Getopt::Mixed::init('a A=s c d e h i=s k L=s l m M=s o=s P=s p:s r S:i'. + ' s t v w bigq:s check:s debug>d diff ftr-ad ftr-ml help>h kminl=i'. + ' kmaxl=i kdiff=i lax-security locale=s ms-smart mua>M pgp-short'. + ' pgp-move pgp-move-vrf sigsmax:i spass version>v'); while (my ($opt, $val, $pretty) = nextOption()) { - if ($opt eq 'a') { $ad = 1; } - elsif ($opt eq 'A') { $ads = $val; } - elsif ($opt eq 'c') { $cr = 1; } - elsif ($opt eq 'd') { $sysl = 1; } - elsif ($opt eq 'diff') { $diff = 1; } - elsif ($opt eq 'e') { $elli = 1; } - elsif ($opt eq 'i') { $ifile = $val; } - elsif ($opt eq 'L') { $footers = $val; } - elsif ($opt eq 'l') { $ml = 1; } - elsif ($opt eq 'm') { $ms = 1; } - elsif ($opt eq 'M') { $mua = $val; } - elsif ($opt eq 'o') { $ofile = $val; } - elsif ($opt eq 'P') { $boun = $val; } - elsif ($opt eq 'p') { $mda = $val; } - elsif ($opt eq 'r') { $hdrs = 1; } - elsif ($opt eq 'S') { $lsig = $val ? $val : $maxsig; } - elsif ($opt eq 's') { $sig = 1; } - elsif ($opt eq 't') { $trad = 1; } - elsif ($opt eq 'v') { version(); } - elsif ($opt eq 'w') { $trsp = 1; } - else { help(); } + if ($opt eq 'a') { $ad = 1; } + elsif ($opt eq 'A') { $ads = $val; } + elsif ($opt eq 'bigq') { + if ($val !~ /^(?:(\d+)(?:,(\d+))?)?$/) { help(); } + $bigqn = $1?$1:30; + $bigqx = $2?$2:10; + if ($bigqn<=0 || $bigqx<=0 || $bigqn<=$bigqx) { help(); } + } + elsif ($opt eq 'c') { $cr = 1; } + elsif ($opt eq 'check') { + $check = 1; + while ($val && $val =~ s/^([^,\s]+)(?:,(\S+))?$/$2/) { + my $foo = $1; + + if ($foo =~ /^ratio=(0?\.\d+)$/) { + $check_ratio = $1?$1:1; + } + } + } + elsif ($opt eq 'd') { $sysl = 1; } + elsif ($opt eq 'diff') { $diff = 1; } + elsif ($opt eq 'e') { $elli = 1; } + elsif ($opt eq 'ftr-ad') { $ftr_ad = 1; $ad = 1; } + elsif ($opt eq 'ftr-ml') { $ftr_ml = 1; $ml = 1; } + elsif ($opt eq 'i') { $ifile = $val; } + elsif ($opt eq 'k') { $kamm = 1; } + elsif ($opt eq 'kminl') { $kminl = $val; $kamm = 1; } + elsif ($opt eq 'kmaxl') { $kmaxl = $val; $kamm = 1; } + elsif ($opt eq 'kdiff') { $kdiff = $val; $kamm = 1; } + elsif ($opt eq 'L') { $footers = $val; } + elsif ($opt eq 'l') { $ml = 1; } + elsif ($opt eq 'lax-security') { $lax = 1; } + elsif ($opt eq 'locale') { $locale = $val; } + elsif ($opt eq 'm') { $ms = 1; } + elsif ($opt eq 'ms-smart') { $ms_smart = 1; $ms = 1; } + elsif ($opt eq 'M') { + $mua = lc($val); + + if ($mua eq 'mutt') { + # mutt still displays the message when ^C'ing pgp verification: + $SIG{'INT'} = 'sigint_handler'; + } + } + elsif ($opt eq 'o') { $ofile = $val; } + elsif ($opt eq 'P') { $boun = $val; } + elsif ($opt eq 'p') { $mda = $val ? $val : '1'; } + elsif ($opt eq 'pgp-short') { $pgpshort = 1; } + elsif ($opt eq 'pgp-move') { $pgpmove = 1; } + elsif ($opt eq 'pgp-move-vrf') { $pgpmovevrf = 1; } + elsif ($opt eq 'r') { $hdrs = 1; } + elsif ($opt eq 'S') { $lsig = $val ? $val : $maxsig; } + elsif ($opt eq 's') { $sig = 1; } + elsif ($opt eq 'sigsmax') { $sign = $val ? $val : undef; } + elsif ($opt eq 'spass') { $spass = 1; } + elsif ($opt eq 't') { $trad = 1; } + elsif ($opt eq 'v') { version(); } + elsif ($opt eq 'w') { $trsp = 1; } + else { help(); } } Getopt::Mixed::cleanup(); -if (($ml && $footers eq '')||($ad && $ads eq '')) { help(); } +if (($ml && $footers eq '')|| # no -l without -L + ($ad && $ads eq '')|| # no -a without -A + ($ifile eq '')|| # no empty -i + ($ofile eq '')) # no empty -o +{ help(); } + + +if ($mua eq 'mutt') { + if (defined $locale && $locale ne '' && $locale ne 'C' && $locale ne 'POSIX') { + foreach my $key (keys %mutt_attachment) { + if ($locale =~ /^$key/) { + if ($mutt_attachment{$key}) + { $mutt_attachment = $mutt_attachment{$key}; } + if ($mutt_contenttype{$key}) + { $mutt_contenttype = $mutt_contenttype{$key}; } + if ($mutt_pgpsigned{$key}) + { $mutt_pgpsigned = $mutt_pgpsigned{$key}; } + if ($mutt_beginsigned{$key}) + { $mutt_beginsigned = $mutt_beginsigned{$key}; } + if ($mutt_pgpclearsigned{$key}) + { $mutt_pgpclearsigned = $mutt_pgpclearsigned{$key}; } + if ($mutt_pgpclearsigstart{$key}) + { $mutt_pgpclearsigstart = $mutt_pgpclearsigstart{$key}; } + if ($mutt_pgpencrypted{$key}) + { $mutt_pgpencrypted = $mutt_pgpencrypted{$key}; } + if ($mutt_pgpoutstart{$key}) + { $mutt_pgpoutstart = $mutt_pgpoutstart{$key}; } + if ($mutt_pgpoutend{$key}) + { $mutt_pgpoutend = $mutt_pgpoutend{$key}; } + last; + } + } + foreach my $key (keys %gpg_WARNING) { + if ($locale =~ /^$key/) { + if ($gpg_WARNING{$key}) + { $gpg_WARNING = $gpg_WARNING{$key}; } + if ($gpg_Warning{$key}) + { $gpg_Warning = $gpg_Warning{$key}; } + if ($gpg_Cantcheck{$key}) + { $gpg_Cantcheck = $gpg_Cantcheck{$key}; } + if ($gpg_aka{$key}) + { $gpg_aka = $gpg_aka{$key}; } + if ($gpg_bad{$key}) + { $gpg_bad = $gpg_bad{$key}; } + if ($gpg_expired{$key}) + { $gpg_expired = $gpg_expired{$key}; } + if ($gpg_good{$key}) + { $gpg_good = $gpg_good{$key}; } + last; + } + } + } + + esc(\$mutt_attachment); + esc(\$mutt_contenttype); + esc(\$mutt_pgpsigned); + esc(\$mutt_beginsigned); + esc(\$mutt_pgpclearsigned); + esc(\$mutt_pgpclearsigstart); + esc(\$mutt_pgpencrypted); + esc(\$mutt_pgpoutstart); + esc(\$mutt_pgpoutend); + + esc(\$gpg_WARNING); + esc(\$gpg_Warning); + esc(\$gpg_Cantcheck); + esc(\$gpg_aka); + esc(\$gpg_bad); + esc(\$gpg_expired); + esc(\$gpg_good); + esc(\$gpg_bug); +} +else { + if ($ms_smart || $pgpshort || $pgpmove || $pgpmovevrf) { help(); } +} + +esc(\$spass_prefix); # Read message: -open(IN, $ifile) || die "Could not open $ifile: $!"; +if (!open(IN, $ifile)) { print STDERR "Could not open $ifile: $!\n"; exit(EX_IOERR); } my @message = ; close IN; @@ -465,6 +1487,9 @@ close IN; process_msg(\@message); # Finally, print clean lines: -write_msg(($mda?"|$sendmail $mda":">$ofile"), \@message); +if ($ofile ne 'NONE') { + write_msg(($mda?'|'.SENDMAIL." $mda":">$ofile"), \@message); +} +# vim600:set foldmethod=marker: # eof diff --git a/t-prot.1 b/t-prot.1 index ce462b4..a8e4b53 100644 --- a/t-prot.1 +++ b/t-prot.1 @@ -1,11 +1,11 @@ -.\" Copyright Jochen Striepe , 2001-2002. +.\" Copyright Jochen Striepe , 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 if any TOFU is detected +inside the message, and deliver it to 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 . .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 , -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). +