User Tools

Site Tools



Pine Mail Reader

edit: Dont know if Pine can be got via apt-get because of licencing<br> Download a deb file for pine & install <br>Useful hits on installing & uninstalling a deb file <br>

 apt-get install alpine

Pine User Config

vi /home/user/.pinerc
customized-hdrs=From: Firstname Surname <>

With the above, you should be able to login to imaps and send emails.

Add-In for Pine for Gnupg -- Pinepgp

Main page on installing Pinepgp and downloading it and building it.<br>

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:

GPG Password Cache

In Debian bullseye when reading a gpg email, it will prompt for password and then spawn: /usr/bin/gpg-agent –supervised Note this caches your GPG password. To prevent gpg password caching:

vi /home/user/.gnupg/gpg-agent.conf
#add the following
default-cache-ttl 0

Test. You can also kill the gpg-agent process, but setting cache to 0 is easier.

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).

  - Setup ssh keys - so you can login to the mailserver (*nix) directly. See the tutorial on this website for [[Sshkeys]]
  - Test the above with "ssh /usr/bin/imapd" and it should login for you with PREAUTH.
  - Configure pine, either in the global file in /etc/pine.conf or per user in $HOME/.pinerc with the following lines: 
 ssh-command="%s %s -l %s exec /etc/r%sd"    <nowiki>//</nowiki> %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!
 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: <br />

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 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
 #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.

pine_pine_set-up_pinegpg.txt · Last modified: 2022/10/21 23:51 by admin