CSUF LogoCSUF Site Navigation

F12 General Utilities Alpine (Pine)

Department of Electrical and Computer Engineering
Associate Professor Gregory R. Kriehn
F12 Alpine (Pine)

Pine, which stands for a Program for Internet News & Email, was the first e-mail client that I ever used (way back in 1993 at Rose-Hulman Institute of Technology when I was incoming Freshman). Call me nostalgic, but I still love the program. Now days, I use Evolution for e-mail, but when I am away from the office, I find it easiest to still login to my server via ssh and run pine to take a quick look at incoming e-mail (especially if I am half way around the world). It has served me extremely well over the years, which is why I still like installing it. Over the years pine has had some licensing issues, so it was removed from Fedora a while back and put into Livna. Recently the licensing issues have been worked out with the release of Alpine, the new successor to pine. Located in the Fedora repository, we can use yum to install it:
~> sudo yum install alpine
Press 'y' when prompted to install the programs and any additional dependencies. After it is installed, source your ~/.bashrc file:
~> source ~/.bashrc
You are now ready to launch pine:
~> alpine &
Before you do so, however, you may want to change a few things first, such as the permissions for /var/spool/mail to 1777:
~> sudo chmod 1777 /var/spool/mail
This needs to be done to set the sticky bit on the directory so that files within it may be unlinked or renamed only by root or their owner. Without the sticky bit, anyone that is able to write to the directory can delete or rename files. (The sticky bit is commonly found on directories, such as /tmp, that are world-writable.) If the sticky bit is not set, pine will complain every time you launch the program. Basically, unless all of your pine users are in the mail group (this would be bad, because then anyone can read/delete another's mail), or pine is sgid mail (again, hopefully not), the pine users will not be able to write to /var/spool/mail with the current configuration. This poses a problem for pine, because it cannot write a lock file to that directory, meaning that other processes may update the user's mail file at the same time pine does, usually a recipe for corruption or disappearing mail of some sort. pine will run without being able to acquire a lock on the mail spool directory, but just be aware of the possibilities for damage. But again, it complains a lot about it when doing so.

With a chmod 1777 /var/spool/mail, pine will be able to write the required lock file so that only one process is updating the mailbox at a time. The 777 is so everyone can write files, but the leading 1 is so only the owner of the file in the directory can remove the file, even though everyone can write to the directory. 1777, therefore, is what we want.

After the permissions on /var/spool/mail are set, I have some very specific configuration preferences, which are listed below:

Configuration Preferences in pine

User Domain             = [domain].[name]
[X]  Compose Cancel Confirm Uses Yes
[X]  Do Not Save to Deadletter on Cancel
[X]  Spell Check Before Sending
[X]  Enable Reply Indent String Editing
[X]  Include Attachments in Reply
[X]  Include Header in Reply
[X]  Include Text in Reply
[X]  Reply Always Uses Reply-To
[X]  Warn if Blank Subject
[X]  Enable Mouse in Xterm
Customized Headers       = From: [Name] <[e-mail name]@[domain].[name]>
Use Only Domain Name     = Yes
Once the above changes are implemented (type S-C to enter into configuration options after launching the program), pine is now ready for use!