--- /dev/null
+% $Id: t-prot.sl,v 1.17 2006/05/16 11:33:32 jochen Exp $
+% Copyright (c) 2003-2005 Jochen Striepe <t-prot@tolot.escape.de>
+%
+% 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'). If "mimedecode" is
+% installed on your system you might want to use
+% variable t_prot_qp = "mimedecode";
+% You can get mimedecode at
+% http://packages.debian.org/stable/mail/mimedecode.html
+%
+% 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 "\e6"
+% setkey article unregister_t_prot "\e7"
+% to your ~/.slrnrc -- press ESC-6 to activate t-prot filtering, and
+% ESC-7 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 (and will definitely fail with S-Lang v2.x).
+% 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"; % you better make sure it exists
+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 = ""; }
+
+ f = popen (qp+"t-prot "+t_prot_params+" >"+fname, "w");
+ if (f == NULL) {
+ message ("Unable to filter article to "+fname);
+ return;
+ }
+ () = fputs (article_as_string(), f);
+ () = pclose (f);
+
+
+ f = fopen (fname, "r");
+ if (f == NULL) {
+ message (fname+" could not be opened.");
+ return;
+ }
+ while (-1 != fgets (&line, f)) {
+ art = art + line;
+ }
+ fclose (f);
+
+ if (0 != remove(fname)) message ("Unable to remove "+fname);
+
+ replace_article (art);
+}
+
+define register_t_prot () {
+ if (1 == register_hook("read_article_hook", "t_prot")) {
+ message ("t-prot filtering activated");
+ }
+ else {
+ message ("t-prot filtering NOT activated");
+ }
+}
+
+define unregister_t_prot () {
+ if (1 == unregister_hook("read_article_hook", "t_prot")) {
+ message ("t-prot filtering deactivated");
+ }
+ else {
+ message ("t-prot filtering NOT deactivated");
+ }
+}
+
+% filtering is enabled by default:
+register_hook("read_article_hook", "t_prot");
macro pager \e1 ":set display_filter='t-prot -cemktS --bigq --pgp-move-vrf -Mmutt -L/usr/share/doc/t-prot/examples/footers'; exec exit\n:exec display-message\n" "Turn TOFU protection on"
# highlight TOFU protection:
-color body brightmagenta black "^\\[---.*"
-color body green black "^#v[-+]"
+color body brightmagenta default "^\\[---.*"
+color body green default "^#v[-+]"
+t-prot (2.1-1) unstable; urgency=low
+
+ * New upstream release, which fixes:
+ - wrong logic when checking for mutt_ssloutstart in MS TOFU
+ (closes: #368162)
+ * Change background for highlighting to default (closes: #339898)
+ * Applied slang2 contrib patch (closes: #344479)
+ * Added debconf handling for enabling t-prot in mutt through /etc/Muttrc.d/.
+ * Bumped standards version to 3.7.2, no changes needed.
+
+ -- Gerfried Fuchs <alfie@debian.org> Sun, 18 Jun 2006 16:49:11 -0500
+
t-prot (2.0.2-1) unstable; urgency=low
* New upstream release: No changes to debian version 2.0.1-2, only the
--- /dev/null
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+# make the /etc/Muttrc.d/ symlink?
+db_input medium t-prot/muttrc.d || true
+db_go
+
+exit 0
Section: mail
Priority: optional
Maintainer: Gerfried Fuchs <alfie@debian.org>
-Build-Depends-Indep: patch
-Standards-Version: 3.6.2
+Build-Depends-Indep: po-debconf, patch
+Standards-Version: 3.7.2
Package: t-prot
Architecture: all
-Depends: perl (>= 5.6.0-16), libgetopt-mixed-perl, liblocale-gettext-perl
+Depends: debconf (>= 0.5) | debconf-2.0, perl (>= 5.6.0-16), libgetopt-mixed-perl, liblocale-gettext-perl
Recommends: mutt (>= 1.5.5.1)
Enhances: mutt, slrn, inn2
Suggests: mail-transport-agent
--- /dev/null
+[type: gettext/rfc822deb] templates
--- /dev/null
+# debconf template file for the t-prot package.
+# Copyright (C) 2006 Gerfried Fuchs <alfie@debian.org>
+# This file is distributed under the same license as the t-prot package.
+# Gerfried Fuchs <alfie@debian.org>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: t-prot 2.0.2\n"
+"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
+"POT-Creation-Date: 2006-03-27 12:44+0200\n"
+"PO-Revision-Date: 2006-03-27 12:45+0200\n"
+"Last-Translator: Gerfried Fuchs <alfie@debian.org>\n"
+"Language-Team: German <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Do you want to enable t-prot system wide for mutt?"
+msgstr "Wollen Sie t-prot Systemweit in mutt aktivieren?"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
+"script from mutt you have to enable it. You can do this either by creating "
+"a symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done "
+"automatically for you), or let the users decide to add a \"source\" line for "
+"it in their ~/.muttrc or ~/.mutt/muttrc. If you acknowledge this question "
+"the systemwide usage will be enabled."
+msgstr ""
+"Das t-prot-Paket bietet eine Konfigurationdatei /etc/Muttrc.t-prot an -- um "
+"das Skript in mutt zu verwenden, muss es aktiviert werden. Dies kann "
+"entweder durch das Erstellen eines symbolischen Links in /etc/Muttrc.d/ "
+"passieren (bzw. kann dies automatisch für Sie durchgeführt werden), oder man "
+"lässt die Benutzer entscheiden, sich eine »source«-Zeile in ihre ~/.muttrc "
+"bzw. ~/.mutt/muttrc hinzuzufügen. Wenn Sie dieser Frage zustimmen, wird die "
+"systemweite Verwendung aktiviert."
--- /dev/null
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: t-prot@packages.debian.org\n"
+"POT-Creation-Date: 2006-03-27 12:44+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid "Do you want to enable t-prot system wide for mutt?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4
+msgid ""
+"The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the "
+"script from mutt you have to enable it. You can do this either by creating "
+"a symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done "
+"automatically for you), or let the users decide to add a \"source\" line for "
+"it in their ~/.muttrc or ~/.mutt/muttrc. If you acknowledge this question "
+"the systemwide usage will be enabled."
+msgstr ""
#!/bin/sh -e
# postinst for t-prot
-if [ "$1" = 'configure' ] && [ -e /usr/share/debconf/confmodule ]; then
- if dpkg --compare-versions "$2" lt "1.47-2" ; then
- . /usr/share/debconf/confmodule
- db_purge
- db_stop
- fi
+# Source debconf library.
+if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+if [ "$1" != 'configure' ]; then
+ exit 0
+fi
+
+symlink=true
+if [ -e /usr/share/debconf/confmodule ]; then
+ db_get t-prot/muttrc.d
+ symlink="$RET"
+fi
+
+if [ "$symlink" = "true" ]; then
+ mkdir /etc/Muttrc.d || true
+ cd /etc/Muttrc.d && ln -s ../Muttrc.t-prot t-prot.rc || true
fi
--- /dev/null
+#!/bin/sh -e
+# postrm for t-prot
+
+if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_purge
+fi
#!/usr/bin/make -f
# debian/rules for t-prot package
-PACKAGE = t-prot
-TMP = $(CURDIR)/debian/$(PACKAGE)
+PKG = t-prot
+TMP = $(CURDIR)/debian/$(PKG)
INSTALL = install
INSTALL_FILE = $(INSTALL) -p -oroot -groot -m644
-rm -rf $(TMP)
$(INSTALL_DIR) $(TMP)
cd $(TMP) && $(INSTALL_DIR) etc usr/bin usr/share/man/man1 \
- usr/share/slrn/macros usr/share/doc/$(PACKAGE)/examples
- # usr/share/doc/$(PACKAGE)/contrib
+ usr/share/slrn/macros usr/share/doc/$(PKG)/examples
+ # usr/share/doc/$(PKG)/contrib
$(INSTALL_SCRIPT) t-prot $(TMP)/usr/bin
- cd $(TMP)/usr/bin/ && patch t-prot \
- $(TMP)/../../contrib/t-prot-r*-mutt157.diff
+ patch $(TMP)/usr/bin/t-prot \
+ contrib/t-prot-r*-mutt157.diff
-rm -f $(TMP)/usr/bin/t-prot.orig
$(INSTALL_FILE) t-prot.1 $(TMP)/usr/share/man/man1
$(INSTALL_FILE) debian/Muttrc.t-prot $(TMP)/etc
$(INSTALL_FILE) contrib/t-prot.sl $(TMP)/usr/share/slrn/macros
+ patch $(TMP)/usr/share/slrn/macros/t-prot.sl \
+ contrib/t-prot.sl-slang2.diff
+ -rm -f $(TMP)/usr/share/slrn/macros/t-prot.sl.orig
- $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PACKAGE)
+ $(INSTALL_FILE) TODO README $(TMP)/usr/share/doc/$(PKG)
#$(INSTALL_FILE) contrib/README.patches contrib/t-prot-r*-gol.diff \
# contrib/t-prot-r*-indentms.diff \
- # $(TMP)/usr/share/doc/$(PACKAGE)/contrib
+ # $(TMP)/usr/share/doc/$(PKG)/contrib
cp -pR contrib/muttrc.t-prot contrib/filter_innd.pl \
contrib/README.examples debian/footers debian/README.footers \
- $(TMP)/usr/share/doc/$(PACKAGE)/examples
+ $(TMP)/usr/share/doc/$(PKG)/examples
$(INSTALL_FILE) ChangeLog \
- $(TMP)/usr/share/doc/$(PACKAGE)/changelog
- cd $(TMP)/usr/share && gzip -9 doc/$(PACKAGE)/changelog \
+ $(TMP)/usr/share/doc/$(PKG)/changelog
+ cd $(TMP)/usr/share && gzip -9 doc/$(PKG)/changelog \
man/man1/t-prot.1
find $(TMP) -print0 2>/dev/null | xargs -0r \
chown --no-dereference 0.0
$(checkroot)
$(INSTALL_DIR) $(TMP)/DEBIAN
$(INSTALL_FILE) debian/copyright debian/README.Debian \
- debian/NEWS.Debian $(TMP)/usr/share/doc/$(PACKAGE)
+ debian/NEWS.Debian $(TMP)/usr/share/doc/$(PKG)
$(INSTALL_FILE) debian/changelog \
- $(TMP)/usr/share/doc/$(PACKAGE)/changelog.Debian
- cd $(TMP)/usr/share/doc/$(PACKAGE) && gzip -9 \
+ $(TMP)/usr/share/doc/$(PKG)/changelog.Debian
+ cd $(TMP)/usr/share/doc/$(PKG) && gzip -9 \
changelog.Debian NEWS.Debian
- $(INSTALL_SCRIPT) debian/postinst \
+ $(INSTALL_SCRIPT) debian/postinst debian/postrm debian/config \
$(TMP)/DEBIAN
+ po2debconf debian/templates > $(TMP)/DEBIAN/templates
$(INSTALL_FILE) debian/conffiles \
$(TMP)/DEBIAN
- dpkg-gencontrol -ldebian/changelog -isp -p$(PACKAGE) -P$(TMP)
+ dpkg-gencontrol -ldebian/changelog -isp -p$(PKG) -P$(TMP)
cd $(TMP) && find * -type f ! -regex '^DEBIAN/.*' -print0 | \
xargs -r0 md5sum > DEBIAN/md5sums
dpkg --build $(TMP) ..
--- /dev/null
+Template: t-prot/muttrc.d
+Type: boolean
+Default: true
+_Description: Do you want to enable t-prot system wide for mutt?
+ The t-prot package provides a config file /etc/Muttrc.t-prot -- to use the
+ script from mutt you have to enable it. You can do this either by creating a
+ symlink in /etc/Muttrc.d/ for systemwide usage (rather, this can be done
+ automatically for you), or let the users decide to add a "source" line for it
+ in their ~/.muttrc or ~/.mutt/muttrc. If you acknowledge this question the
+ systemwide usage will be enabled.