Hany's Home Page


PinePgp 0.18.0 (stable release)

[Author] [Contributors] [Description] [Copying] [Requirements] [Download] [Installation] [Usage] [Contribute] [Changelog] [Other Resources] [Todo]


Peter Soos <sp (at) osb.hu>
Peter Hanecak <hanecak (at) megaloman.sk>
Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>

Current maintainer is Peter Hanecak <hanecak (at) megaloman.sk>.


Jon Wilson <jon (at) netsw.co.uk>
Scott C. Wood <woody (at) netsw.co.uk>
phuzzie <phuzzie (at) phuzzielogik.cx>
Magnus B{ckstr|m <b (at) etek.chalmers.se>
Tim Bishop <T.D.Bishop (at) ukc.ac.uk>
Rolando Abarca <rabarca (at) ing.uchile.cl>
Matt Brubeck <mbrubeck (at) hmc.edu>
Ryan W. Maple <ryan (at) guardiandigital.com>
Dale Bewley <dale (at) bewley.net>

Thank you.


PinePgp is set of display and sending filters which enables pine to send and receive signed and/or encrypted e-mails.

Supported are PGP (version 2.6.x, 5.x and 6.5.x) and GnuPG (version 1.0.0 and later).


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

See the COPYING file or GNU General Public License page for license information.



Mktemp (if installed) is used to handle temp file used to store gpg/pgp output when checking/decrypting incomming message so proper footer can be created. If you do not want to install this utility, you can still use PinePGP, but use '--without-mktemp' when running 'configure'.

For more information about mktemp see http://www.openbsd.org. Sources can be downloaded from ftp://ftp.openbsd.org/pub/OpenBSD/src/usr.bin/mktemp/ or from mirrors http://www.openbsd.org/ftp.html. RPM package of mktemp can be found for example at http://rufus.w3.org/linux/RPM/mktemp.html.


You can find sources at:

  1. http://www.megaloman.com/~hany/_data/pinepgp/
  2. http://terminus.sk/~hany/_data/pinepgp/
  3. http://www.mirrors.wiretapped.net/security/cryptography/apps/mail/pinepgp/

Also you can download RPM packages from:

  1. http://www.megaloman.com/~hany/RPM/pinepgp.html
  2. http://www.megaloman.com/~hany/RPM/pinepgp26x.html
  3. http://www.megaloman.com/~hany/RPM/pinepgp5x.html
  4. http://www.megaloman.com/~hany/RPM/pinepgp65x.html
  5. http://www.megaloman.com/~hany/RPM/pinegpg.html

To verify files, use my public key from http://www.megaloman.com/~hany/gnupg-hany-public-key.txt, http://terminus.sk/~hany/gnupg-hany-public-key.txt or from public keyservers (for example wwwkeys.eu.pgp.net):

pub  1024D/01F72129 2001-08-03 Peter Hanecak (Hany) <hany (at) megaloman.sk>
     Key fingerprint = 432F 1A38 8126 9B52 8AAE  8681 705B 82EF 01F7 2129
uid                            Peter Hanecak (Hany) <hany (at) terminus.sk>
uid                            Peter Hanecak (Hany) <hanecak (at) megaloman.sk>
sub  2048g/FAF03B1C 2001-08-03 [expires: 2003-08-03]

Releases 0.16.0 and earlier are signed with my older and now expired key:

pub  1024D/1664445A 1999-09-08 Peter Hanecak (Hany) <hany (at) terminus.sk>
     Key fingerprint = 84F1 078F B502 3C80 2B6E  23E6 F536 2F64 1664 445A
uid                            Peter Hanecak (Hany) <hanecak (at) megaloman.sk>
uid                            Peter Hanecak (Hany) <hany (at) megaloman.sk>
sub  2048g/1BC5CE1A 1999-09-08 [expires: 2001-09-07]



First, you need some UNIX system which have 'sed' and 'awk' alredy installed. Also 'mktemp' utility is recomended (pinepgp version from 0.12.90 to 0.17.1 requires it, for version 0.17.2 and later it is optional but recomended).

After you have sucessfuly downloaded and unpacked source tarball, do the following in source directory:

$ ./configure
$ make
$ make install

Before building you can manualy enable support for particular encryption utility and also specify path to utility with '--with-<utility>[=<path>]'. For example you can enable GnuPG support (and let configure found path to binary) and enable generic PGP 2.6.x support with /usr/bin/pgp using following:

$ ./configure --with-gpg --with-pgp=/usr/bin/pgp

You can also disable support for particular encryption utility with '--without-<utility>'. Example (disabling GnuPG support):

$ ./configure --without-pgp

If you have mktemp installed but do not want PinePGP to use it, you can use '--without-mktemp' configure parameter:

$ ./configure --without-mktemp

If you want to disable partial fix for Naive Sign & Encrypt (more information can be found at http://world.std.com/~dtd/sign_encrypt/sign_encrypt7.html), use '--without-nsefix':

$ ./configure --without-nsefix

For more information on './configure' arguments run:

$ ./configure --help


After "Administrator" part is completed, users on your system can run either 'pinegpg-install', 'pinepgp5x-install', 'pinepgp65x-install' or 'pinepgp26x-install' to add particular filters into theire own pine configuration file (~/.pinerc). Example (install GnuPG filters):

$ pinegpg-install

To enable "encrypt to yourself" feature, specify your e-mail adress as argument when running install script. Example (install GnuPG filters, replace joe@earth.org with your own e-mail address):

$ pinegpg-install joe@earth.org


Viewing signed and/or encrypted messages

To view signed and/or encrypted message just selects it from index.

Signed and/or ecrypted parts are displayed following way:

XX                                     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX   signed and/or encrypted message   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XX                                     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
YY encryption backend and/or PinePGP messages YYYYYYYYYYYYYYYYYYYYYYY



this is signed message from me.

gpg: Signature made Fri 28 Sep 2001 03:00:00 PM CEST using DSA key ID 01F72129
gpg: Good signature from "Peter Hanecak (Hany) <hany@terminus.sk>"
Sending signed and/or encrypted messages

To send signed and/or encrypted message just compose it as ussual. Then press <Ctrl+X> (send message) and select particular filter:

"encrypt to yourself" feature

With this feature enabled, outgoing encrypted messages are encypted also with you as recipient (using e-mail adress you supplied in configuration or when running install script) so when you are viewing your outgoing encrypted messages you are able to actualy decrypt them.

Pine filters manual configuration

If you want to add filters manualy into pine configuration file, than you have to add following lines (or change current filter definitions) into it (example will add GnuPG filters):

# This variable takes a list of programs that message text is piped into
# after MIME decoding, prior to display.
display-filters=_LEADING("-----BEGIN PGP MESSAGE-----")_ /usr/bin/gpg-check,\
_LEADING("-----BEGIN PGP SIGNED MESSAGE-----")_ /usr/bin/gpg-check,

# This defines a program that message text is piped into before MIME
# encoding, prior to sending
sending-filters=/usr/bin/gpg-sign,/usr/bin/gpg-encrypt _RECIPIENTS_,\
/usr/bin/gpg-sign+encrypt _RECIPIENTS_,

If you want to use filters with "encrypt to yourself" feature, use following (replace joe@earth.org with your own e-mail adress):

# This variable takes a list of programs that message text is piped into
# after MIME decoding, prior to display.
display-filters=_LEADING("-----BEGIN PGP MESSAGE-----")_ /usr/bin/gpg-check,\
_LEADING("-----BEGIN PGP SIGNED MESSAGE-----")_ /usr/bin/gpg-check,

# This defines a program that message text is piped into before MIME
# encoding, prior to sending
sending-filters=/usr/bin/gpg-sign,/usr/bin/gpg-encrypt _RECIPIENTS_ joe@earth.org,\
/usr/bin/gpg-sign+encrypt _RECIPIENTS_ joe@earth.org,

Your own pine configuration file is ussualy ~/.pinerc . System wide configuration file should be in /etc/pine.conf but that depends on type of your system.

Pine's compose-send-offers-first-filter

Setting this feature will cause the first filter in the sending-filters list (in case of default PinePGP install it is 'sign' filter) to be offered as the default instead of unfiltered, the usual default.

For aditional information on cryptography consult GnuPG and/or PGP documentation.

Pine filters temp directory

PinePGP filters are using ~/.pinpgp directory for placing temporary files. Install script automaticaly creates this directory for you if it does not exists (with 0700 access permissions).

How to contribute

If you would like to submit a patch, send it to me <hanecak (at) megaloman.sk> or to any other author. Please be sure to include a textual explanation of what your patch does.

The preferred format for changes is 'diff -u' output. You might generate it like this:

$ diff -urN pinepgp-orig pinepgp-work > mydiffs.patch


0.18.0-1 2002/05/03 Peter Hanecak <hanecak (at) megaloman.sk>
  • enought testing - stable release; more than 7 months after 0.16.1-1
  • README: small tweaks
0.17.3-1 2002/02/08 Peter Hanecak <hanecak (at) megaloman.sk>
  • Makefile.in:
    • fixed typos which caused incorrect builds of pinepgp5x and pinepgp65x filters (thanks to Dale Bewley <dale (at) bewley.net> for reporting)
    • configure.in included in tarball
  • README: fixed Requirements information
0.17.2-1 2001/11/27 Peter Hanecak <hanecak (at) megaloman.sk>
  • Makefile.in, configure.in, pinegpgp.in:
0.17.1-1 2001/10/11 Peter Hanecak <hanecak (at) megaloman.sk>
  • Makefile.in: script making slightly reworked
  • README: added contributors
  • configure.in:
    • check for bash added - it is REQUIRED
    • other checks for REQUIRED items, if they fail, will cause configure to fail too (we can't continue if necessary stuff is not available)
  • pinegpgp.in, pinepgpgpg-install.in: path to bash detected by configure used
  • pinepgp.spec: summary and description updates
0.17.0-1 2001/09/28 Peter Hanecak <hanecak (at) megaloman.sk>
  • C preprocessor used to "build" scripts
  • pinegpgp.in:
    • begin, middle and end horizontal rules used to make it more clear what's signed/encrypted and what's not
    • don't confuse Pine with errors produced by encryption backend while checking message (for example when messages is signed with key which is not present in keyring) - error is just reported to user
  • Matt's patches removed from contrib while they were incorporated
    Matt Brubeck <mbrubeck (at) hmc.edu>
  • pinegpgp.in, pinepgpgpg-install.in: '#!/bin/sh' -> '#!/bin/bash' to make them work on Solaris too
  • pinepgpgpg-install.in: changed '_LEADING("string")_' to '"_LEADING(string)_"' so also Pine on Solaris can use new pinerc
0.16.1-1 2001/09/28 Peter Hanecak <hanecak (at) megaloman.sk>
  • pinepgpgpg-install.in: added pinepgp-0.15.3-pineconf-parse-cleanup.patch from RedHat's pine RPM package to fix a potential issue with pinegpg-install (Tim Waugh)
  • README: added information about my new key
  • added Solaris patches to contrib directory
  • added gnupg-hany-public-key.txt to package
0.16.0-1 2001/07/10 Peter Hanecak <hanecak (at) megaloman.sk>
  • stable release
    • added info about my public key
    • added section "Other Resources"
    • TODO items for next devel version added
    • minor fixes and updates
0.15.4-1 2001/06/08 Peter Hanecak <hanecak (at) megaloman.sk>
  • Makefile.in: reworked install process so only required items are installed; thus no errors will be produced when installing filters which were not required
  • pinegpgp.in: removed "recode" sed command - looks like it is not necessery anymore
0.15.4-0 2001/01/26 Peter Hanecak <hanecak (at) megaloman.sk>
  • Makefile.in: fixed missing exec_prefix
  • README: additions to 'TODO' section regarding S/MIME x.509
0.15.3-1 2001/01/12 Peter Hanecak <hanecak (at) megaloman.sk>
  • pinegpgp.in: fixed "recode" sed command - it was dropping "r"s from decrypted and/or checked messages when using GnuPG support (try to drop it in the future - looks like it is not necessery anymore); thanks to phuzzie <phuzzie (at) phuzzielogik.cx> for reporting it
  • documentation: updates and fixes
0.15.2-1 2001/01/11 Peter Hanecak <hanecak (at) megaloman.sk>
  • added support for encrypting to multiple recipients (Jon Wilson <jon (at) netsw.co.uk>)
  • added encrypting to yourself to previous (Scott C. Wood <woody (at) netsw.co.uk>)
  • filter configuration in .pinerc changed so users which are upgrading HAVE TO run particular install script again
  • pinegpg: use 'sed' instead of 'awk'
  • changed temp directory: ~/.pinepgp; it is created by install scripts if it does not exists
  • README: updated and slightl;y restructured (Install and Usage part)
0.15.1-1 2001/01/11 Peter Hanecak <hanecak (at) megaloman.sk>
  • unify filters into one source: pinegpgp.in
0.15.0-1 2000/10/05 Peter Hanecak <hanecak (at) megaloman.sk>
  • autoconf used
0.14.0-1 2000/10/03 Peter Hanecak <hanecak (at) megaloman.sk>
  • stable release
  • spec: %{_prefix} and Prefix: used
0.13.2-1 2000/09/11 Peter Hanecak <hanecak (at) megaloman.sk>
  • do not produce footer when there is no output from pgp/gpg to stderr when checking incoming message (i.e. decrypting and/or checking signature)
0.13.1-1 2000/02/24 Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>
Peter Hanecak <hanecak (at) megaloman.sk>
  • README: mktem RPM package URL added
  • README: information about change of bin directory rewritten (prefix or bindir used)
  • Makefile: default prefix changed back to '/usr/local'
  • scripts: /bin/bash -> /bin/sh
  • README: info about pine's compose-send-offers-first-filter
0.13.0-1 2000/03/23 Peter Hanecak <hanecak (at) megaloman.sk>
  • ducumentation regarding mktemp extended
  • release clean-up
0.12.93-1 2000/03/22 Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>
  • change back _BEGINNING to _LEADING in Pine display filters. I have realized that the -----BEGIN PGP [SIGNED] MESSAGE-- must be very first line in the signed and/or encrypted message, otherwise Pine call PGP/GnuPG to verify all messages containing this line, which is bad e.g. for replies containing this line somewhere in the middle of the message body. PGP/GnuPG displays only verified/decrypted part of the message, not whole, and it complains that the signature is bad. Surely.
0.12.92-1 2000/03/21 Peter Hanecak <hanecak (at) megaloman.sk>
0.12.91-1 2000/03/21 Peter Hanecak <hanecak (at) megaloman.sk>
  • added documentation
  • changed prefix from /usr/local to /usr
  • 'make tarball', 'make rebuild' and 'make clean'
  • pinepgp50 renamed to pinepgp5x so it is more "obvious" that even PGP 5.5 works (Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>)
  • 'make install-pgp26x', 'make install-pgp5x' and 'make install-gpg'
0.12.90-1 2000/03/17 Peter Hanecak <hanecak (at) megaloman.sk>
  • statistics information of *-check appended at the end of e-mail (no need to hit return once more in order to view signed/encrypted messages) - PGP part not tested!
0.12-2 2000/03/17 Peter Hanecak <hanecak (at) megaloman.sk>
  • package summary info corrections
  • spec: %make -> %build
0.12-1 2000/03/17 Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>
  • everything
  • scripts and links to them
  • is packed in tar.gz archive so it's transportable to other systems, not only for those with RPM
  • change of this spec file to reflect new format
0.11-3 2000/03/16 Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>
  • change of _LEADING to _BEGINNING in the Pine display filter definitions, it should work with mails where -----BEGIN PGP ... is not the first whitespace line (see Pine help for details)
  • fix of pinepgp{26x,50}-install script
  • sed expression was enclosed in quotes (') and thus shell variabled were not evaluated. Not it is enclosed in double qoutes (") and it's ok; $PGPVER variable was not set sometime, there was problem with 'case' evaluation, '*' at the beginning of program names was missing and the line was matched only when $0 was exactly the same as the program name
0.11-2 2000/03/16 Martin Edas Edlman <edlman (at) dzungle.ms.mff.cuni.cz>
  • fix of this spec file - after adding GPG, pgp50-sign+encrypt was badly linked
  • fix of pinepgp50 and pinepgp26x scripts. In 'case' structures there were wrong filenames to determine how the script was called
  • links are done after install on final filesystem (hardlinks instead of symlinks)
0.11-1 1999/09/11 Peter Hanecak <hanecak (at) megaloman.sk>
  • added support for GPG
  • install scripts use full path to scripts (pine, according to tech-notes.txt, requires it)
0.10 1999/07/04 and earlier Peter Soos <sp (at) osb.hu>
  • Added pgp 5.0 support
  • Corrected the file and directory attributes to rebuild the package under RedHat Linux 6.0
  • Corrected the file and directory attributes
  • Using %attr to build the package as an ordinary user
  • Recompiled under RedHat Linux 5.0
  • Now we use BuildRoot

Other Resources

About PinePGP
Other e-mail encryption tools