Software I like: Alpine

Alpine logo Pine logo

The Pine e-mail client was developed by the University of Washington. In 2006 Pine was superseded by Alpine. In 2008 UW released Alpine 2.0 and stopped development. In 2009 the re-alpine project was started as a continuation of Alpine; as of 2018 Sep 29 the latest version is dated 2012 Dec 21. In 2013 Eduardo Chappa released Alpine 2.1.

As of 2020 May 17, Chappa’s latest version is 2.22 dated 2020 Apr 5. The source and the MS Windows binary can be downloaded from GitHub or repo.or.cz. The latest fully patched version for MS Windows can be downloaded from http://alpine.x10host.com/alpine/info/windows.html.

See also Nancy McGough’s All about Pine (last modified 2007 Sep 27).

Things I didn’t know I could do

Saving multiple attachments at one time

When a message contains multiple attachments and you want to save them all at once: use E to export the message then use ^P to activate AllParts. The text of the message will be save in the directory that you specify with the file name that you specify, and the attachments will be saved in a specially created subdirectory.

Typed accented characters

Type ^\ followed by a character for the accent (e.g., ') and the character to be accented (e.g., e for é) (details).

Search backward

After typing W to search, type ^W to toggle between forward and backward searching (new in version 2.22).

Delete to end of text

Type ^W^X (details).

Avoid message-size error messages

When you save a message, Alpine checks the message size against the size specified by the IMAP server and complains if they don't match. This is very annoying with Windows servers which often report the wrong size. To suppress the error message, set the ignore-size-changes option in Main ▶ Setup ▶ Config.

Marking multiple messages as Read

Use ; to select the desired messages, then do A (Apply), * (Flag), ! (Not) and N (New).

Opening attachments

To specify, for example, that PDF files are to be opened using Evince, create a file ~/.mailcap with a line like the following:
application/pdf; evince '%s'; test=test -n "$DISPLAY" ; nametemplate=%s.pdf
The text test=test -n "$DISPLAY" tests whether the string length of the value of $DISPLAY is nonzero.

Sometimes certain kinds of attachments aren't opened successfully because after creating a temporary file Alpine deletes it before the invoked application gets around to opening it. I experienced this for .doc and .docx files, and sometimes .odt files, that were to be opened by LibreOffice. A kluge is to add a sleep command to the mailcap line for that attachment type. For example, I rather crudely added
Application/MSWORD; libreoffice '%s' \; sleep 5; test=test -n "$DISPLAY"
Application/VND.OPENXMLFORMATS-OFFICEDOCUMENT.WORDPROCESSINGML.DOCUMENT; \
libreoffice '%s' \; sleep 5; test=test -n "$DISPLAY"
Application/VND.OASIS.OPENDOCUMENT.TEXT; \
libreoffice '%s' \; sleep 5; test=test -n "$DISPLAY"

to my ~/.mailcap file. (refs 1, 2, 3, 4)

Configuration

Most of the following was written for Pine; some has been updated for Alpine.

When run the first time without any configuration file specified, Alpine will prompt for a user-id (e.g., Linux username), personal-name (e.g., James Kirk), user-domain (e.g., mcgill.ca) and smtp-server (e.g., mailhost.mcgill.ca or smtp.mcgill.ca/submit/user=first.last@mcgill.ca) and inbox-path (e.g., {exchange.mcgill.ca/ssl/user=first.last@mcgill.ca}inbox). (The /submit option sets the port to 587, equivalent to hostname:587, rather than the SMTP port, which is 25 (ref). Using the server on port 25 is much faster than using the more secure server on port 587 but is only permitted if connected to the VPN.) It will record these in pinerc in the same directory as pine.exe; I haven't figured out how to make it put the file into $HOME\pine\ but it can be moved there later. Things to be set up (if desired) include

A remote configuration file can be used by specifying it in a shortcut used to invoke Pine, e.g.,
"C:\Program Files\Pine444\pine.exe" -p {funsan.biomed.mcgill.ca/user=username}remote_pinerc
If the official Pine installer is used, Pine will use the Windows Registry to specify where to find the resource file, and also to specify the window size and position; e.g.,

Local exceptions to the settings in remote_pinerc can be specified in pinercex. The location of this file can be specified on the command line with, for example, -x c:\users\username\alpine\pinercex. If no -x is specified, Alpine is supposed to look in ${HOME}\ALPINE but this didn't work for me (see my posting, which was never answered).

Note slightly different syntax for invoking a remote configuration file:


R. Funnell
Last modified: 2020-09-27 08:29:18