---
name: "pgp4pine"
section: "1"
platform: "linux"
package: "pgp4pine"
version: "1.76-3"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/pgp4pine"
---

# pgp4pine(1)

a PGP/GnuPG wrapper for Pine and general use

## NAME

pgp4pine - a PGP/GnuPG wrapper for Pine and general use

## SYNOPSIS

**pgp4pine** (**-d** \| **-e**) **-i** *fileName* **\[-o** *fileName***\] \[options\]**

## DESCRIPTION

**pgp4pine** **is designed to "wrap" around PGP so that users of Pine 3.95 or newer can send/receive mail with Pine and PGP 2, PGP 5, PGP 6, or GPG.** **It is also useable as a general PGP/GnuPG wrapper.**

## HOWTO SETUP PINE

- **0.**

  **Open your ~/.pgp4pinerc (if you don't have one, copy it from** **/usr/share/doc/pgp4pine/pgp4pinerc.example) and rename it to .pgp4pinerc and edit it.**

- **1.**

  **In pine, go into Setup, then Configuration.**

- **2.**

  **If you want pgp4pine to automatically catch and decrypt/verify PGP-signed/encrypted messages, set display-filters (near the bottom) to**

        **\_BEGINNING("-----BEGIN PGP MESSAGE")\_** \
         **/usr/bin/pgp4pine -d -i \_TMPFILE\_**

     **(one line & literally. Five '-' and \_TMPFILE\_.)**\
      **If you want to run pgp4pine only when you tell it to, don't fill this in, and do this instead: In a message, export it somewhere, then, in a shell/xterm, type "pgp4pine -d -i (filename)"**

- **3.**

  **Set sending-filters to (one line):**

       **/usr/bin/pgp4pine -e -i \_TMPFILE\_** \
        **-r \_RECIPIENTS\_**

- **4.**

  **If you want Pine to offer pgp4pine for sending mail by default, go to Setup -\> Configuration, and turn on 'compose-send-offers-first-filter'. Otherwise, you have to use Ctrl-N / Ctrl-P to access the filter.**

## COMMAND-LINE OPTIONS

**\[-e \| --encrypt\]**

**Specifies to encrypt file, used when sending messages.**

**\[-d \| --decrypt\]**

**Specifies to decrypt/view file, used when receiving messages.**

**\[-i \| --infile\]** *file*

**Specifies incoming file.**

**\[-o \| --outfile\]** *file*

**Specifies file to output to. Not required, and by default the incoming file is used.**

**\[-r \| --recipients\]** *recipients*

**Recipient list of addresses to encrypt to. Must be the last option. If not giving this option, you will be prompted to enter them.**

**\[-q \| --quiet\]**

**Tells pgp4pine to skip the welcome screen and go straight to the interactive sequence.**

**\[--debug\]**

**Will save a ~/pgp4pine.debug file for use with debugging.**

**\[-t \| --tempfile\]** *file*

**Overrides the tempfile setting of .pgp4pinerc**

**-k**

**Tells pgp4pine to keep the temp file, if used.**

**--noclear**

**Doesn't clear screen when run. Pine doesn't clear the screen properly when it runs a sub-command for filtering, so I put this in.**

## OUTGOING-ONLY OPTIONS

**-sf / -sf+ / -sf-**

**Specifies whether or not to sign file. Overrides preferences, and does not** **ask.**

**-ef / -ef+ / -ef-**

**Specifies whether or not to encrypt file. Overrides preferences, and does** **not ask.**

**-af / -af+ / -af-**

**Specifies whether or not to ASCII-armor (RADIX-64) files. Overrides** **preferences, and does not ask.**

**-uf / -uf+ / -uf-**

**Specifies whether or not to canonicalize the text format. Overrides** **preferences, and does not ask.**

**-ds / -ds+ / -ds-**

**Specifies whether or not to make a detached signature. Overrides preferences** **and does not ask.**

## EXAMPLES

```
	pgp4pine -e -i ~/out.msg
	pgp4pine -d -i ~/in.msg -o ~/in.txt
	pgp4pine -e -i ~/out.msg -sf+ -ef- -ds-
	pgp4pine -e -i ~/out.msg -r he@here.com she@there.org
```

## PGP4PINERC

**The .pgp4pinerc consists of two parts, the global options and the profile options.**

## GLOBAL OPTIONS

- **add\_comment**

  ```
  =0: Add nothing.
  =1: Add a comment that says
      "Comment: Made with pgp4pine x.xx"
  ```

- **extra\_enter\_at\_end**

  ```
  =1: Wait for two <RETURN> instead of one. Use if
      somehow pgp4pine returns without asking you.
  =0: Just one enter at end.
  ```

- **external\_pager**

  **Set this to a pager (e.g.** **less** **) to view the text with when in piping mode.**

- **cache\_keyrings**

  **Cache keyrings to speed things up a bit. If you add keys without pgp4pine's** **knowledge, it will of course be outdated.**

  **Value: Time to store. Units are min(utes), hour(s), day(s). Example:**  **1 day**

- **cache\_decrypted**

  **This enables caching of decoded messages. They will be stored in ~/.pgp4pine.cache. Note that it will be readable by root!**

  ```
  =0: Don't do that, I want top-security! (default)
  ```

  **\>0: Time to store.**

  **pgp4pine will check the cache and delete old messages with every invocation.** **Since v1.75, the keyrings will be cached there as well (it always takes ages** **to obtain them from PGP), that behaviour is unaffected by this setting.**

- **keyserver\_on\_sig**

  **If checking signatures, fetch unknown keys from keyserver. (Without a key, signature check is not possible.)**

  ```
  =-1: no
  =0: ask
  =1: yes (if you have permanent Internet connection)
  ```

- **profile-list**

  **A colon-separated list of the profiles you want to setup. The names are arbitrary.**

  ```
  Example:
  profile-list=pgp5:gpg
  ```

## PER-PROFILE OPTIONS

**Per-Profile options have the format "profile\_\<name\>\_\<option\>".** **"\<name\>" is the name you used in the**  **profile-list**

- **profile\_\*\_version**

  **=1: GPG, 2: PGP 2, 5: PGP 5, 6: PGP 6** **This sets the default name of the PGP programs, and the parameters they** **are called with, and what output is expected.**

- **profile\_\*\_folder**

  **If the PGP commands are not in your standard path, set the path here.**

- **profile\_\*\_extra\_options**

  **Additional command-line parameters. Used only for encryption.**

- **profile\_\*\_autosign**

  - **profile\_\*\_autoencrypt**

  ```
  Default actions when sending mail:
  =-1: never sign / encrypt, =0: ask, =1: always
  ```

- **profile\_\*\_encrypt\_to\_self**

  ```
  =0: Nothing
  =1: Always add yourself to the recipient list. Useful
      to decipher your own sent-mail folder.
  ```

  **Alternatively configure PGP to do this itself.**

- **profile\_\*\_my\_address**

  **Your own name, either hex format or Email address. Used to select your** **secret key and for the** **encrypt\_to\_self** **option.**

- **profile\_\*\_ascii\_armor**

  ```
  Use ascii-armored output instead of binary.
  Always use this for mails.
  =-1: Never, =0: Ask, =1: Always
  ```

- **profile\_\*\_universal\_text**

  ```
  Convert text to a platform-independent form.
  Recommended.
  =-1: Never, =0: Ask, =1: Always
  ```

- **profile\_\*\_pgpk**

  - **profile\_\*\_pgpe**

  - **profile\_\*\_pgps**

  - **profile\_\*\_pgpv**

  **Set the command name for program files if non-standard (PGP5).**

- **profile\_\*\_pgp2bin**

  **The same for PGP2**

- **profile\_\*\_pgp6bin**

  **The same for PGP6**

- **profile\_\*\_gpgbin**

  **The same for GPG.**

## LICENSE

**This program is released under the GNU License v2.**

## BUGS

**Keys having special characters like 'äöü' and '\\' do not work with** **PGP 5. This is a bug in PGP, a patch is available of the homepage at** *http://pgp4pine.flatline.de/***.**

**If you find more bugs, email** *holger@flatline.de*

## AUTHORS

**Holger Lamm \<holger@flatline.de\>**
