Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


Setting up Alpine with Maildir and PGP
Setting up Alpine with Maildir
Fetch and build Alpine with the Maildir patch,
wget ""
wget ""
#wget ""
gunzip maildir.patch.gz
tar xzf alpine.tar.gz
cd alpine-2.00/
patch -p1 < ../maildir.patch
#patch -p1 < ../fancy.patch
./configure --without-tcl
make install
and create a wrapper if you are an old-timer,
cd /usr/local/bin/
ln -s alpine pine
Create a default configuration by launching Alpine as the mail user (which has ~/Maildir/) and backup it,
cp .pinerc .pinerc.dist
fix your From field either by using the simple entries,
Personal Name
User Domain
#personal-name=YOUR NAME
or customized headers (needed if your username doesn't match the email address),
vi .pinerc
customized-hdrs=From: YOUR NAME <EMAIL@EXAMPLE.NET>
tweak it as you wish e.g.,
[ Composer Preferences ] [X] Compose Cancel Confirm Uses Yes
[ Sending Preferences ] [X] Enable 8bit ESMTP Negotiation
[ Folder Preferences ] [X] Single Column Folder List
Pruning Rule =  (*) don't rename, ask about deleting
and if you've also applied the fancy patch, enable reverse thread (no need to change thread-sort-key=),
[ Message Index Preferences ] [X] Enhanced Fancy Thread Support
Sort Key = (*) Reverse tHread
Force the use of Maildir folder for all users (as root),
cd /usr/local/lib/
cat > pine.conf <<EOF9
folder-collections=Mail #mc/Maildir/[]
Note. Using #mc instead of #md if using a dotted folder structure. Otherwise you would have to add :LAYOUT=fs to your Dovecot mail_location= configuration.
Setting up PGP
Install GnuPG (FreeBSD v8),
pkg_add -r gnupg1 (version 1!) 
Note. Using GnuPG version 1 as pinentry does not work with Alpine in text mode (only the GTK pop-up would work).
Generate a key pair and export the public one to a file,
cd ~/
gpg --list-keys
gpg --gen-key
gpg --armor --export ID_EIGHT_NUM > USERNAME.2014.asc
gpg --armor --export-secret-keys ID_EIGHT_NUM > /some/safe/place/or/backup/device/USERNAME.2014.private.and.random.text.asc;-)
Note. Eventually chmod 000 or 400 the private key and isolate it on a backup device, for example.
Note. without argument works too, at least for a single managed key pair.
Configure Alpine so the display and sending PGP filters become available,
vi .pinerc
display-filters=_LEADING("-----BEGIN PGP SIGNED ")_ /usr/local/libexec/ppf_verify _TMPFILE_,
_LEADING("-----BEGIN PGP MESSAGE")_ /usr/local/libexec/ppf_decrypt _TMPFILE_
sending-filters=/usr/local/libexec/ppf_sign _INCLUDEALLHDRS_,
/usr/local/libexec/ppf_encrypt _INCLUDEALLHDRS_ _RECIPIENTS_
Note. TAB on new lines.
Also add this recommended setting,
feature-list=... + enable-8bit-esmtp-negotiation
Note. TAB on new feature lines.
Fetch and install Pine PGP filters,
wget --no-check-certificate ""
cd pine-pgp-filters-1.8/
make install
Note. It recognizes the GnuPG version at configure time.
Ready to go
Note. As the result you should see those changes in your .pinerc,
Note. TAB on new feature lines.
If you get this error message while generating PGP keys,
can't connect to the PIN entry module: IPC connect call failed
it is because gnupg2 requires the pinentry package. And you should use GnuPG version 2 unless you are using GTK for the pop-up, as Alpine does not work with pinentry in text mode (pinentry-curses).
If you get this error message while sending a signed or encrypted message,
no LC_CTYPE known - assuming UTF-8
make sure you use GnuPG version 1. See explanation above in the guide.
If you get this warning,
gpg: WARNING: using insecure memory!
it doesn't really matter.
Alpine Messaging System:
Maildir patch for Alpine:
Support for Courier/Cyrus/Dovecot file systems in the Maildir patch for Alpine:
Pine PGP Filters:

(obsolete, see the new doc)