Pine, pine set-up & pinegpg

From Wiki

Jump to: navigation, search

Contents

Pine Mail Reader

edit: Dont know if Pine can be got via apt-get because of licencing
Download a deb file for pine & install
Useful hits on installing & uninstalling a deb file
http://www.washington.edu/pine/getpine/linux.html#deb-howto

apt-get install alpine

Add-In for Pine for Gnupg -- Pinepgp

Main page on installing Pinepgp and downloading it and building it.
http://www.megaloman.com/%7Ehany/software/pinepgp/

Manual gpg and Pine

vi /$HOME/.pinerc
##include/replace with the lines below.
display-filters=_LEADING("-----BEGIN PGP MESSAGE-----")_ /usr/bin/gpg --decrypt,
               _LEADING("-----BEGIN PGP SIGNED MESSAGE-----")_ /usr/bin/gpg --decrypt
sending-filters=/usr/bin/gpg --clearsign

When sending an email it will ask you for a "filter". Hit CTRL + N to select gpg sign. Additonal sending-filters can be added for encrypt etc. as on: http://computing.ee.ethz.ch/.doc/pgp/index.html#howtosetuppineforuseiwthgpg

Automatic Login for Pine

Pine can automatically login to a imap server on *nix. Pine can use ssh keys to login to the mail server and initiate a imapd command in order to access email(imap) folders.

Because Pine uses ssh keys - it does not work over ssl (2 different security methods) - and therefore pine must access port 143 on the mailserver (as opposed to 993 for imaps).

  1. Setup ssh keys - so you can login to the mailserver (*nix) directly. See the tutorial on this website for Sshkeys
  2. Test the above with "ssh mail.server.com /usr/bin/imapd" and it should login for you with PREAUTH.
  3. Configure pine, either in the global file in /etc/pine.conf or per user in $HOME/.pinerc with the following lines:
smtp-server=mail.server.com/novalidate-cert 
inbox-path={mail.server.com/novalidate-cert}INBOX 
folder-collections={mail.server.com/novalidate-cert}INBOX.[]
ssh-path=/usr/bin/ssh
ssh-command="%s %s -l %s exec /etc/r%sd"    // %s = imap, so its running the command /etc/rimapd on the mailserver.

What is happenning - is that pine is ssh'ing into the mailserver and running this command [ssh-command="%s %s -l %s exec /etc/r%sd"] to run imapd for the user.

This works fine for mbox. If Maildir is on the mailserver - a special script must be put in place before running imapd by the user.

Instead of:

ln -s /usr/bin/imapd /etc/rimapd

Do the following:

vi /etc/rimapd  //make sure its not in place already!
 
#!/bin/sh
exec /usr/bin/imapd $HOME/Maildir 2>/dev/null

chmod 755 /etc/rimapd  //to make it executable!

That should work fine. The reason for /dev/null is so that *any* stdout or stderr is not sent to the commandline, but rather sent to /dev/null.

Also note that Pine is now accessing our server over 143 (via ssh) and as such the port needs to be open! More Info on Maildir + pine + autologin at:
http://www.tkrat.org/pipermail/tkrat/2002q4.txt
http://people.cs.uct.ac.za/~bmerry/software.html
http://www.mail-archive.com/courier-users@lists.sourceforge.net/msg06351.html

Spell Checker for Pine

CTRL+T calls the spell checker when composing an email in pine. The necessary bash spell packages must be installed firstly however.

apt-get install spell aspell aspell-en aspell-bin

That should provide all the necessary packages for pine to do spell checking. I dont think it spell checks the "Subject :" entry however.

Pine with SSL

The following is a mailaccount which has ssl support. To test this:

telnet mailserver.com 993

Because this second mailaccount has a lot of folders and its own inbox I wanted to keep it seperate from my main .pinerc. So I made a .pinerc_email2:

vi /home/$user/.pinerc_email2
inbox-path={mailserver.com/user=sburke/ssl/novalidate-cert}
folder-collections={mailserver.com/user=sburke/ssl/novalidate-cert}[]
#its nice how the user can be specified :)

pine -p .pinerc_email2
#open pine with a custom .pinerc

I then use screen to switch around between mail accounts. Its quicker than going in and out of mailfolders as if I had put all the mailservers in one .pinerc.

http://www.madboa.com/geek/pine-ssl/

Personal tools