Deflexion.com
blog >>
Join the conversation >>
|
POWER PINE®
|
PC-Pine is Unix Pine that the University of Washington Pine team ported to Microsoft's platforms. Versions 4.0 and later the latest version is 4.64 are 32-bit and run on Windows 95 and later (98, Me, NT, 2000, XP, etc). Versions 3.96 and earlier are 16-bit and run on all versions of Microsoft Windows and on DOS. In addition to supporting the Unix keyboard shortcuts, PC-Pine has a menu bar with drop-down menus, dialog boxes, clickable buttons, clickable key-menu commands, clickable messages in the Message Index, clickable URLs & web-hostnames, clickable attachments, right-click pop-up menus, scroll bars, and supports cutting, copying, & pasting using the Windows clipboard.
In addition to the many reasons to use Pine that I list on the Infinite Ink main Pine page, MS Windows users have the additional reason that there is no other Windows mail client that I know of that is as powerful and customizable as PC-Pine is. The area that Pine really shines compared to other MS Windows mail clients is:
| Security and Privacy |
Unlike Unix mail clients, most MS Windows mail clients do not give users a lot of control over how message headers, message bodies (plain, enriched, or HTML), and attachments are displayed. This lack of control makes you vulnerable to attachments containing viruses and bugged HTML messages. I discuss these in Security and Privacy Features on the Infinite Ink main Pine page.
Some ways to secure Pine and your system are described in the Privacy and Security section below. I describe some areas where I think Pine needs to be improved in the Pine Security-Enhancement Wishes section of my main Pine page.
Many people have an account on a Unix system and happily use Pine by SSH'ing from their Windows machine to a Unix machine and running Unix Pine in an SSH window. If your machine is running Windows 95 or higher, there are many reasons you might want to use PC-Pine rather than Unix Pine in an SSH window.
With PC-Pine you can:
Disadvantages of using PC-Pine rather than using Unix Pine in a telnet/ssh window include the following.
In the next section, I describe how you can get many of the advantages of PC-Pine and not have the first two disadvantages that I list above.
With Pine running on one of the Unix-on-Windows
packages, such as Cygwin, you can run Pine on your PC and not have
disadvantage #2 above, i.e., you can view and patch the Pine source
code. The disadvantages of Pine on Unix on Windows are that 1) you need
to install a
| Note | According to this 2004-Dec-10 comp.mail.pine message by Mark Crispin, “No mailbox format except for [c-client] mbx works in Cygwin.” |
This article describes how to set up PC-Pine 4.64 on a system running Microsoft Windows 95 or higher. These instructions do not work for earlier versions of PC-Pine and need to be modified for Windows NT, 2000, and XP (this is noted below).
Pine was designed to be an IMAP client so if your mail is not delivered to an IMAP server, you probably do not want to use PC-Pine as your primary mail client.
| Tip | If you are looking for an ISP that supports IMAP, see my IMAP Service Providers page, which includes lots of IMAP tips, a growing lists of reasonably-priced & free IMAP service providers, and instructions for setting up Pine to access the INBOX and mailstore at each of these providers. |
In order to set up PC-Pine you need the following information:
If you will use Pine as an NNTP client, you also need to know:
And finally it is useful to know:
/); MS Windows/NT usually uses backslash
(\); Courier IMAP, Cyrus IMAP, and NNTP use dot (.).If you can not find the answer to these questions on your ISP's web pages, ask in an appropriate local discussion group, i.e., a discussion group that is for discussion among users of your ISP. If you can't find the answers in your ISP's web pages or in their local discussion groups, send these questions to your ISP's technical support. Be forewarned that some ISPs do not (yet) understand IMAP and do not know that PC-Pine exists.
I use a fixed-width font for text that is displayed on
your computer, text that is meant to be typed, and names of files.
Variables and names that depends on your settings are formatted in
italics.
Most Pine commands are not case sensitive so if I say To go to the Main Menu, type M, you can type either M or m. Some non-alphabetic characters work without holding down the SHIFT key. For example, if I say To go to the parent screen, type < you can type either < (less than) or ,(comma). Some non-alphabetic characters do require the SHIFT key. For example, to use the flag command you need to type * (SHIFT-8). Just typing 8 will not invoke the flag command.
Some Pine commands are issued by pressing the CTRL key and while holding it down, typing a character. For example, to get Pine context-sensitive help, type CTRL-G. CTRL-G is abbreviated ^G and in general CTRL-X is abbreviated ^X. Usually you do not need to hold down all three keys (the CTRL key, the SHIFT key, and the character); just the CTRL key and the unshifted character will do. For example, to set a mark in Pico you can type either CTRL-6 or CTRL-^ (control caret). And to get Pine context-sensitive help you can type either CTRL-G or CTRL-g. An exception is CTRL-_ (control underscore), which launches an alternate editor. For this command you need to press CTRL-SHIFT-_.
Often there are many ways to issue a Pine command. I usually give only one way but you can sometimes find another equivalent command by looking at the key menu at the bottom of the Pine screen or by consulting Pine's context-sensitive Help by typing ^G.
If I am writing about the Microsoft Windows world, I use %HOME% to mean whatever is specified by the HOME environment variable. If I am writing about the Unix world or about many worlds (e.g., Unix and MS Windows), I use $HOME to mean whatever is specified by the HOME environment variable.
I use the word directory for a place on a computer disk where files and possibly other directories, called subdirectories, are stored. I use mailbox, folder, or message folder for a place on a computer disk where Pine stores messages. I hope the following paragraph illustrates the use of these terms.
PC-Pine was created back in the days when the name of a DOS or MS-Windows file was limited to eight characters followed by a period and a three-character extension. Because of this, the PC-Pine default folder names contain eight characters or fewer. For example, the PC-Pine default is to put a message that you postpone into a folder named postpond. The default location for this folder and all PC-Pine default folders is your
%HOME%\mail directory.
A special folder name is INBOX. You might not have a folder that is actually named INBOX. INBOX is an abbreviation for whatever you or your system administrator has specified as your primary incoming folder on the IMAP server. When the name INBOX is used in an IMAP client, it is case-insensitive so it is fine to write INBOX, inbox, Inbox, or any other combination of lower and upper case.
For more about these and other email-related terms, see:
The easiest way to set up PC-Pine is to unzip pmxxxw32.zip
into a directory, double click on pine.exe, and leave all
Pine-related files and directories in their default locations. The defaults,
which are discussed in the Pine
man page and Support
Files, Environment Variables, and Registry Settings: PC-Pine, are
as follows.
| File | Default Location |
all local mailboxes (aka folders)sentmail mailboxsavemail mailboxpostpond mailboxintruptd mailbox |
the primary folder collection, which defaults to
(if |
| remote IMAP-accessible mailboxes | not set; to specify this, see Setting IMAP, NNTP, and Local Collections below |
|
|
pine.exe directory |
dict.u |
spell32.dll directory |
|
|
pinerc directory |
deadletr (if it already exists in this directory) |
%HOME% |
newsrc.old |
newsrc directory |
mailbox.lock files |
mailbox directory |
C!!MyHome!Msgs!mailbox (lock file for C:\MyHome\Msgs\mailbox) |
%WINDIR%\Temp
(4.31 and later) %WINDIR% (4.30) %TEMP% (4.21 and earlier) |
mapi_debug.txt (needs to be created by user; new
in 4.30) |
%TEMP% |
|
|
%TMP% |
aeN.txt (alternate editor
temp files) |
%TMPDIR% |
After a lot of experiments, I have decided that I like to keep the Pine program files and my Pine user-specific files in separate directories; and I like my user files to go in a subdirectory of my home directory. In the next five sections I discuss Pine configuration files and explain why I set things up the way I do.
| Trivium | The rc in pinerc and newsrc is a Unix naming convention that stands for either runtime configuration, runlevel change, or run commands (take your pick!). Thanks to Richard Smith, the maintainer of geekrave.org, for telling me he thinks of rc as runtime configuration; Elmar Hinz for telling me he thinks of it as runlevel change; and Imperial College for FOLDOC, the Free On-Line Dictionary Of Computing, and its definition and history of rc. |
As you can see in the table above, most Pine user files reside in the directory that the pinerc file is in. PC-Pine finds the pinerc file by looking at:
The first one in this list that exists is what Pine uses as the pinerc file. All user files listed in the fifth (green) row of the table above are read from and written to the directory that the pinerc file is in. More details about where PC-Pine looks for user files is at:
I prefer to use Pine configuration method #3 (%HOME%\Pine\pinerc) and in the next few sections I discuss why. In Setting Environment Variables below, I walk you through setting up a HOME environment variable & directory, and a Pine subdirectory.
Separating program files and user files is generally a good idea because it makes it easy to
Separating these files is an example of modular architecture.
Another key feature of my PC-Pine configuration is that I put my Pine user files in a subdirectory named Pine in my home directory. Using a home directory is useful because:
-passfile
(discussed below) and -aux command-line
arguments. I go into a lot of detail about local and remote Pine configurations
in Compartmentalizing
and Sharing Your Pine Configuration.
If you are going to use the Pine configuration that I use, you can name your Pine program files directory, messages directory, and Home directory anything you like. However, your Pine user-files directory must be named Pine and must reside in your Home directory. Here are some suggestions for naming these directories.
| Directory Contents | Name Suggestions |
| Pine Program Files | C:\Program Files\Pine or C:\Proggies\Pine or C:\Proggies\PC-Pine or wherever you like |
| Home | C:\Nancy (but use your name instead of mine!) or C:\MyHome or D:\MyHome or C:\Home or C:\Data or wherever you like |
| Pine User Files | %HOME%\Pine (if you want to use Pine configuration method 3, this directory must be named Pine and must reside in your %HOME directory) |
| Local Messages | %HOME%\Msgs or %HOME%\Mail or %HOME%\Messages or wherever you like (the Pine default is %HOME%\mail) |
For security reasons, you might want to use bizarre and completely non-standard file and directory names. I discuss this in the Privacy and Security section below.
The next two sections discuss my personal naming strategies. The section Step by Step Through Downloading and Setting Up PC-Pine walks you through creating the directories and setting the HOME environment variable.
This is where the user-specific files of Pine and many programs that originated in the Unix world go. The Microsoft default is to put user-created documents in C:\My Documents. I like my personal files, including documents and configuration files, to be located together so I use a modified Microsoft naming style and name my download directory C:\MyDownloads, my web sites directory C:\MyWebs, my backup directory C:\MyBackups, and my home directory C:\MyHome. And I set up all my programs to save their configuration files in C:\MyHome. This way when I need to find or backup files I've created or updatedor my programs have created or updatedI can go to Windows Explorer and sort by name and all My directories are alphabetized together. On a machine that has only one disk drive, I use C:\MyHome. On a machine that has more than one drive, I like to keep user files somewhere other than C; for example, in D:\MyHome.
Both Unix Pine and PC-Pine use a directory named mail in your home directory as the default for where folders are stored. Since Pine is both a mail and news client, you can use Pine to save both mail and news messages in your folders. To me it seems incorrect to call this directory mail, so I call it Msgs. I capitalize the letter M because my personal naming convention is to name directories using an initial capital letter. You can, of course, name the directory where your folders reside anything you like!
The procedure I describe in this section is one of many ways to set up PC-Pine. I discuss why I like this configuration and give a link to information about alternate configurations in Configuration Overview above. These instructions were originally written for someone using Windows 95 or 98. If you are using another operating system, it should be fairly straightforward to adapt these instructions to your system.
If you have used Pine before on this computer, make a backup of all Pine-related files, especially your pinerc file(s), address book(s), and PASSFILE.
If PC-Pine is currently installed on this computer, clear the Pine-related registry settings before you run a new version. To display the Pine-related registry settings, click on the Windows Start button, choose Run, and type:
\full\path\to\pine.exe -registry dump
To clear these settings, run this:
\full\path\to\pine.exe -registry clear
The next time you run PC-Pine, it will reset the registry with the correct
settings for the PC-Pine that you are currently using. To find out more,
see Support
Files, Environment Variables, and Registry Settings: PC-Pine and Pine
Comand-Line Arguments, especially the section on the -registry
command-line argument, at the UW PIC.
| Tip |
openssl and that you are checking the correct
pine.tar.gz, specify the absolute path to each of these./usr/local/bin and on my PC, I use
C:\Program Files\Pine,sudo
command to be able to manage files and directories in the /usr
directory. pine-bin.osx-10.4.Z
on Mac OS X Tiger or, to build Pine yourself, see Using
a PASSFILE with Unix and Mac Pine below.dict.app dict.d dict.i dict.s install.txt ldap32.dll mailcap.sam mimetype.sam pico.exe pine.exe pine.hlp pine.ndx pinerc.adv spell32.dll
| MS- Windows Tip |
If you do not see all these files or their file extensions
in Windows Explorer (or in My Computer), you need to change
your Folder Options. To do this, click the Windows Start button,
choose Settings > Folder Options, and then choose the tab
labeled View. Make sure that the following is not
checked
[ ] Hide file extensions for known file types
and the following, which is in the Hidden Files section, is checked
[X] Show all files
These settings are needed by the set-up procedure below and are also useful for detecting trojans and viruses, which often take advantage of the fact that the default MS Windows configuration hides a lot from users. Here is what the Folder Options window looks like in MS Windows 2000. ![]()
|
Many programs that originated in the Unix world use environment variables for settings that are used by more than one program. An advantage of using environment variables is that if something changes, such as your timezone or the path to your default text editor, you can make the change once in the environment variable and the change will be reflected in all the programs that use the environment variable. Another advantage of using environment variables is that a configuration file, such as the pinerc file, can be transferred to another system without needing to be edited because the variables will be set by the local environment variable settings. This section walks you through setting up the environment variables that Pine (and some other programs) use.
| Note |
|
REM The next 3 environment variables are used by PC-Pine SET TZ=EST+05EDT SET HOME=C:\MyHome SET USER_DICTIONARY=%HOME%\Pine\myDic.txtPine uses the
TZ (time zone) environment variable to
construct the Date header in messages that you send. Set this to
the appropriate time
zone setting for your location. For example, since I live in
London, I set TZ to GMT00BST. For more
info, see F. Pollastri's Time
Zones, especially the links in the Other Information section
at the bottom of his page.dict.u and stored in the directory
that spell32.dll is in (and thus not be backed up when you back
up your home directory.) SET EDITOR=C:\Progra~1\Vim\Runtime\gvim.exe -for if your editor, gvim.exe in this example, is on your path, you do not need to specify the absolute path and can use the following instead
SET EDITOR=gvim.exe -fThe second setting is more easily portable to
autoexec.bats
on other MS-Windows machines.pinercEx,
if it exists, and pinerc to read runtime
configuration settings. (These are named .pinercex
and .pinerc in Unix Pine.) If you want PC-Pine to automatically
use a third file, include a line like the following in your autoexec.bat
SET PINECONF=%HOME%\Pine\pinercConf%PINECONF% is used to store generic Pine settings that can be used by any Pine user on the system. It can be named anything you like. I suggest the name
pinercConf so that when
you sort your Pine user files, it will be sorted next to pinerc
and pinercEx.| Tip |
To get a quick start customizing Pine, copy and paste my sample pinerc-generic (or a fragment of it) into the file you've specified as %PINECONF%. You can append to or override these settings in your pinerc and pinercex files using MSC and MSXC. I discuss |
\full\path\to\programprogram; instead you can
just type program followed by any arguments you
want to use.
To avoid typing a password when you use Pine to access a password-protected POP, IMAP, NNTP, or ESMTP server, you need to be using either
In this section, I discuss option #1. If you are interested in using
option #2, which involves setting the ssh-command
& the ssh-path in your pinerc, and setting up an SSH
private-public key pair, see Scott Leibrand's 1999-Dec-13 message Re:
Pine config of news server/login/groups (this
message is also available at Archive.org).
All versions of PC-Pine have the ability to store passwords, but non-PC versions of Pine need to be built with this option (details about building Pine with a PASSFILE are below).
In order for Pine to use a PASSFILE, the PASSFILE must exist. In non-PC Pine, the name of the PASSFILE and its location is chosen by the person who built Pine. To create the PASSFILE on a Unix-like system, use commands like this:
touch /path/to/my/secret/passfile chmod 600 /path/to/my/secret/passfile
For example, if you use the pine from rpm.livna.org, use these commands:
touch ~/.pine.pwd chmod 600 ~/.pine.pwd
For another example, see how to create a PASSFILE for Pine running on a DreamHost shell account.
In PC-Pine, the default PASSFILE is named pine.pwd and is
located in the directory where your PINERC is (
in these instructions). To create the pine.pwd file,
use Windows Explorer to open the
directory and then right click on
the blank space in the right panel where files (if there are any) are
listed. In the pop-up menu choose New > Text Document. Change
the name of the file from New Text Document.txt
to pine.pwd.
You can override the name and location of the PASSFILE using Pine's -passfile
command-line argument, which is discussed in the next section.
| Important |
|
-passfile and -nowrite_passfile
Command-Line ArgumentsStarting with version 4.43 for PC-Pine and version 4.55 for Unix and
non-PC versions of Pine, you can specify a non-default location for the
PASSFILE by launching Pine with the -passfile command-line
argument. For example:
pine -passfile /absolute/path/to/your/passfile
If you are on a shared Unix system and you launch Pine with the -passfile
argument, I recommend that you create a shell
script (maybe called mypine or even better something
that will be a mystery to spies) that launches pine with this and possibly
other arguments. Do not name your script pine and do not
use a Unix alias because these are more vulnerable to spies (for example,
if the spy runs the ps, who or w command).
The -nowrite_passfile argument tells Pine to "Read from
a passfile if there is one, but never offer to write a password to the
passfile." This command-line argument was introduced in Pine 4.60.
| Tips |
|
If you are using a non-PC version of Pine, for example Unix Pine or Mac Pine, and if it was built using the default build files, it probably does not support a PASSFILE. To check, run
pine -h
If the -passfile argument is listed, it supports a PASSFILE.
If the -passfile argument is not listed and if it is Pine
4.55 or later, it does not support a PASSFILE. To find out how to build
Pine so that it can optionally store passwords, see:
| Build Tips |
To specify the PASSFILE as an argument to the build
command, run a shell script like the following from your Pine build
directory:
#!/bin/sh ./build clean ./build 'EXTRACFLAGS=-DPASSFILE=\".pine.pwd\"' osx # ^^^ # platform
Important:
To avoid problems with quotation marks and other characters that
might be interpreted as metacharacters by your shell, run this as
a Bourne shell script (that's what To check that your newly built Pine supports a PASSFILE, run Note that PASSFILE, which is
Reference: I found this Pine build syntax in this 2005-March-23 message in the YellowDog-extras mailing list. |
As I discuss in the Privacy and Security section below,
I suggest that you name PASSFILE something non-standard and bizarre to
make it harder for spies to find. Also make sure that you chmod
600
See Also: Pine's Help on the disable-password-caching feature, which is tangentially related to using a PASSFILE.
inbox-path and Other Essential Variables If all your environment variables are set correctly, you are ready to run
Pine for the first time.
| Tip | In Pine you can get context-sensitive help by typing either ?
or ^G (Get help).
|
pine.exe
and double click it. Alternatively, you can use the Windows Find command
to locate and launch pine.exe (Start > Find > Files
and Folders).Use configuration
file stored on an IMAP server or Use local
configuration file. For now, I recommend that you use the default
local configuration file and check the box labeled Use this
as the default PC-Pine configuration. If you are interested in
using a remote configuration, see the Infinite Ink page about Compartmentalizing
and Sharing Your Pine Configuration.E.
You will get a prompt that saysNo inbox! Folder to open as inbox:If your ISP uses IMAP, type
{your.imap.server/user=LoginName}INBOX
If your server supports secure IMAP connections, then include /tls
(available in 4.40 and later), /ssl, or /secure
inside the curly braces. With some servers you need to use the /novalidate-cert
(which is unsafe)
or the /notls qualifier. For details about these and other
qualifiers that can be used in a Pine server specification, see Do
Not Send Your Password in Plaintext below and Server
Name Syntax at the UW Pine Information Center. If you are using
Unix Pine and if you do not want to use rsh or ssh to connect to your
IMAP server, you can either explicitly specify the IMAP port number
using, for example
{your.imap.server:143/user=LoginName}INBOX
^^^
port
or include /norsh inside the curly braces. The /norsh
qualifier is not relevant to PC-Pine users and is available only in
Unix Pine 4.41 or higher. [Can't connect to your.server,143: Unknown error (10051)]it means that port 143, which is the default IMAP port, is not accessible.
{your.pop.server/user=LoginName/pop3}INBOX
^^^^^
Note
Near the bottom of this page, there is more information about using Pine to access POP INBOXes.
Preserve folder as "inbox-path" in PINERC?To answer yes, type Y.
HOST: your.imap.server USER: LoginName ENTER PASSWORD:Type your password and press RETURN.
Preserve password on DISK for next login?To answer yes, type Y.
PINE 4.64 SETUP CONFIGURATION
personal-name = <No Value Set: using "">
user-id = <No Value Set: using "">
user-domain = <No Value Set>
smtp-server = <No Value Set>
nntp-server = <No Value Set>
inbox-path = {your.imap.server/tls/user=LoginName}INBOX
To change any of these, move the cursor to the relevant line and type
C for Change. Details about the inbox-path, which specifies
your Pine primary INBOX, are in Step
5D above.From: personal-name <user-id@user-domain>If you are using Unix, Mac, or any non-PC Pine, your Pine user-id is your login name and you do not have the option to change it within Pine. You can, however, change your From header either by using a role or by setting some of Pine's
*-hdr variables.
I discuss these and other options in detail in Changing
Your From Header in Pine.smtp-server and instead you should
leave it as it is (even if it says <No Value Set>).
Pine will then use the default outgoing SMTP server for that system. For
example, this
is the case at Dreamhost.com. If you are not able to send email from
Pine running on a remote Unix system, ask the system administrator of that
system how you should configure Pine's smtp-server when Pine is running
on their system.smtp-server to something like this:
your.smtp.server/user=UserNameNote that if your SMTP server requires a fully qualified user name, it will look something like this:
your.smtp.server/user=UserName@domain.nameIf your SMTP server supports SMTP AUTH over SSL or TLS, append the
/ssl
or /tls qualifier so that you have something like this:
your.smtp.server/user=UserName/tlsIf you need to use an SMTP server port other than port 25, for example port 26, use something like this:
your.smtp.server:26
your.smtp.server/submitIf your SMTP server uses all of the above (alternate port, SMTP AUTH, and TLS), use something like this:
your.smtp.server:26/tls/user=UserName
your.smtp.server/submit/user=UserName
^^^^^^^
Works in Pine 4.64+ with a Submit server (usually port 587)
Submit servers automatically use TLS so you do not need /tls
your.nntp.server/user=UserNameOnNNTPServerNote that usually you will not need to specify a user name for the NNTP server of your IAP (Internet access provider).
inbox-path should already be filled in with the information
that you gave in Step 5D above.
To use the bare-bones Pine, these are the only Pine settings you need.
| SMTP & NNTP Tips |
|
If you have the time and energy, page through the rest of the Pine SETUP CONFIGURATION screen, read Pine's context-sensitive help by typing ? or ^G, and experiment with your settings.
| Tip |
If you use some or all of my
generic pine settings, many settings in this section will already
be set. In PC-Pine, you can set the PINECONF environment variable
and then plug in system-wide generic Pine settings.
I discuss setting this environment variable in step
2E above. For more ways to plug & play with Pine settings and details about how it works in both PC and Unix Pine, see Compartmentalizing and Sharing Your Pine Configuration. |
sentmail (in PC-Pine) or sent-mail
(in non PC-Pine). If you would like these Fcc'd messages to be accessible
to
default-fcc to something like this:
default-fcc = {imap.server.of.your.webmail.provider}INBOX.Sent Items
^^^^^^
path & delimiter depend on IMAP server
To find out the imap.server.of.your.webmail.provider and
the “Sent” folder on that system, consult your webmail provider's
documentation. Details for some providers are in The
Table on the IMAP Service Providers page. default-fcc
depends on the variable fcc-name-rule
and on a number of feature-list settings (search for the
string fcc on the SETUP CONFIGURATION screen). It also
depends on whether the recipient of the message is in your address book with an Fcc setting and whether
a role with an Fcc setting was used to construct the message.Fcc in your
Pine default-composer-hdrs
list. This also makes it easy to change the Fcc during message composition.
This is one of the settings that I suggest in the Sample
Settings section of Compartmentalizing and Sharing Your Pine
Configuration.default-fcc
to be the same as your saved-msg
folder. Doing this makes it easy to review entire conversations
(rather than only one side of a conversation).Fcc to “deliver”
a newly composed message directly to an IMAP mailbox to which you have
write access. This is an easy way to “send” yourself, or
anyone who can read the Fcc'd mailbox, a message without using SMTP.
This is one way to use IMAP for blogging (which might
more appropriately be called plogging, i.e., IMAP logging
as opposed to web logging). If you do this regularly,
you might want to set the feature fcc-only-without-confirm.default-fcc folder.feature-list settings that I find especially
useful. If you set your EDITOR environment variable (step
2D above) and if you want the option to use it to compose a message,
make sure that you set enable-alternate-editor-cmd (the first feature
that I list below). An easy way to put these settings in your pinerc
is to copy & paste them from the
feature-list in the generic pinerc on the Compartmentalizing
and Sharing Your Pine Configuration page.
PINE 4.64 SETUP CONFIGURATION
:
Set Feature Name
--- ----------------------
[ Composer Preferences ]
:
[X] enable-alternate-editor-cmd
:
[ Reply Preferences ]
:
[ ] reply-always-uses-reply-to (unset this so Pine will give you the option to not use the Reply-To header)
:
[ Sending Preferences ]
[X] disable-sender (available in 4.51+)
:
[ ] send-without-confirm (unset this so you can use sending-filters, which are useful for greenlisting, & use ^V to control flowed text)
[ ] use-sender-not-x-sender (unsetting this may prevent spammers from getting your private - as opposed to public - email address)
[X] warn-if-blank-to-and-cc-and-newsgroups (available in 4.55+)
[X] warn-if-blank-subject (available in 4.55+)
[ Folder Preferences ]
:
[X] separate-folder-and-directory-entries (useful if you access Cyrus or other servers that support dual-use names; discussed below)
:
[ Viewer Preferences ]
:
[X] enable-msg-view-urls (available in 4.00+; discussed below)
[X] enable-msg-view-web-hostnames (available in 4.00+; discussed below)
:
[X] quell-charset-warning (available in 4.60+)
[ News Preferences ]
:
[X] enable-multiple-newsrcs (useful even if you use only one NNTP server; discussed below; available in 4.56+)
[X] hide-nntp-path (available in 4.60+)
:
[X] news-post-without-validation
:
[ ] quell-extra-post-prompt (because of this problem, I recommend unsetting this; available in 4.30+)
[ Advanced Command Preferences ]
[X] enable-aggregate-command-set (aggregate operations are discussed below)
[X] enable-arrow-navigation (makes Pine menu navigation easier)
:
[X] enable-bounce-cmd ("bounce forward" can be used to update a greenlist, train Spambayes, use SMTP to transfer msgs)
[X] enable-exit-via-lessthan-command (makes Pine menu navigation easier)
[X] enable-flag-cmd (enables manual setting and clearing of status flags and keywords (labels))
:
[X] enable-flag-screen-keyword-shortcut (available in 4.62+)
:
[X] enable-full-header-cmd (also consider enable-full-header-and-text)
:
[X] enable-unix-pipe-cmd (available in PC-Pine 4.60+; available in non-PC-Pine for 10+ years)
[ Advanced User Preferences ]
:
[X] expose-hidden-config (available in 4.40+)
:
[ ] quell-attachment-extension-warn (available in 4.60+)
[ ] quell-attachment-extra-prompt (unset this so Pine will notify you if you try to launch an attachment; available in 4.50+)
:
:
: (next section is at the bottom of the Config screen & viewable only after setting expose-hidden-config & restarting Pine )
:
--- [ Normally hidden configuration features ] ---
:
[X] allow-changing-from
:
See Also: The section below about Privacy
Configuration Settings, which lists some of the above settings, as
well as some other useful settings.
character-set variable. Alternatively, search for the string
character-set using Pine's Where (^W) command.
Set this to the character coding that you use for most of your correspondence.
For example, if you usually correspond in a Western European language,
such as English, you will might set this to ISO-8859-1
or ISO-8859-15.
For example:
character-set = ISO-8859-1
Starting with Alpine,
the Apache-Licensed Pine, you can specify UTF-8,
i.e.:
character-set = UTF-8
UTF-8 can represent any character in the Unicode
standard and is what I use and recommend. Note:
UTF-8 is available only in Alpine and is not available
in Pine.
![]() Note |
Unfortunately, there are currently many problems using the euro sign in email and I, along with many others, recommend that you Do not use the euro sign in an email or news message. Instead, type the string EUR rather
than the character €. For a discussion
of the problems, including why you may not see the euro sign
that is the last character before the period in the previous
sentence, see Jukka "Yucca" Korpela's the
euro sign in HTML and in some other contexts. If you need
to send the euro sign in an email message, 1] set your Pine
Thanks to Jukka for for the graphic of the euro sign and his wonderful material on international character sets! |
For correct results when viewing a character coding, you must choose
a corresponding font. For example, the vt100.fon font,
which I discuss below in the Setting Fonts section,
can be used for ISO-8859-1
but it cannot be used for the Windows-1252, ISO-8859-15, or UTF-8
full character repertoire because vt100.fon does not
contain the euro sign and some other non-ASCII characters.
When you receive a message that is in a different coding from your
Pine character-set setting, Pine displays a warning:
[ Some characters may be displayed incorrectly. ]You can turn off this warning by setting quell-charset-warning, which is one of the feature settings that I recommend above.
character-set
has the focus on the Pine configuration screen
charset=X-UNKNOWN
If you are having problems with a character and you've checked that both the font and the character-set support the problematic character, try using a different SMTP server. Some broken SMTP servers mangle 8-bit characters. Also, if you are running Pine in a terminal or SSH window, make sure the terminal emulation settings are correct.
[X] downgrade-multipart-to-text (especially useful if you post to text-only NNTP groupsThese tell Pine to try to do 8-bit ESMTP or NNTP negotiation if a message contains a higher ASCII character, such as the £ symbol. If the 8-bit negotiation is successful, the message is not encoded using, for example, quoted-printable encoding.) : [X] enable-8bit-esmtp-negotiation : [X] enable-8bit-nntp-posting
enable-alternate-editor in your feature list
in Step 6B and if you set the EDITOR environment variable in Step
2D, set the Pine editor variable to ${EDITOR}:
editor = ${EDITOR}
Using the EDITOR environment variable here will make it easy to use
this pinerc on other machines. Note that PC-Pine understands both Unix
($EDITOR or ${EDITOR}) and Microsoft (%EDITOR%) environment-variable
notation. If you are on a machine without much memory, you can save
a little of your precious memory by not setting the EDITOR
environment variable (Step 2D) and explicitly specifying your editor
here. For example, here is what I use on an MS-Windows system:
editor = gvim.exeSince
gvim.exe is on my path, I do not need to specify
the path. This makes this pinerc setting portable to other MS-Windows
machines (but it's not portable to Unix machines because Unix gvim does
not use the .exe file extension). | Editor Tips |
|
url-viewers variable set to <No Value Set>,
Pine should use your PC or Mac's default browser when you launch
a URL
that appears in a message. If you would like a launched URL to be opened
in a new window or a new tab in your browser, you can either set this
in your browser's preferences or specify a command-line argument in
your Pine url-viewers setting. Specific settings for some
browsers are discussed in this
2002-February pine-info thread about opening urls./absolute/path/to/the/viewer./bin/echo _URL_ > filename
H command, set these two features:
[X] enable-full-header-and-text [X] enable-full-header-cmd (one of my favorite feature-list settings)Being able to view a raw message is especially useful for investigating HTML messages that might contain phishing or other malicious URLs.
mailto: and news:
URLs in the current instance of Pine. To override this, include something like the following
in your Pine url-viewers setting:
_SCHEME(mailto)_ "/usr/bin/open -a /Applications/SeaMonkey.app _URL_" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use the appropriate command for your systemDetails about the SCHEME token are in Pine's built-in Help about the
url-viewers
variable http: URL). url-viewers variable unset (<No Value
Set>) does not work, set url-viewers"/usr/bin/open _URL_" ^ ^ :....use quotes!....:Make sure you include the surrounding quotation marks and specify the absolute path to the
open command. This
will launch a selected URL in your Mac's default viewer for
that type of URL (e.g., your Mac's default
ftp:,
http:,
imap:,
mailto:, or
nntp:
viewer).index-format variable specifies what is displayed about
a message on the Pine MESSAGE INDEX screen. The default index-format
in Pine is this:
index-format=STATUS MSGNO DATE FROMORTO(33%) SIZE SUBJECT(67%)
index-format in Alpine
is this:
index-format=STATUS MSGNO SMARTDATETIME24 FROMORTO(33%) SIZENARROW SUBJKEY(67%)For details about this syntax, see Tokens for Index and Replying and index-format in the Pine Technical Notes. If you prefer different tokens, different token widths (the numbers inside parentheses), or a different ordering, set this variable. Here is what I use:
index-format=SMARTTIME(3) NEWSANDRECIPS(15%) FROM(17%) IMAPSTATUS MSGNO SUBJKEYINIT(68%) KSIZE
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
the most interesting tokens (to me) are here
I put the least interesting tokens on the edges so that when I view
the MESSAGE INDEX, I can easily focus on the interesting aspects of
the messages. STATUS,
IMAPSTATUS, and FROMORTO, depend
on your email addresses. To specify your email addresses, use the
alt-addresses
variable.SUBJKEY,
KEY, SUBJKEYINIT, or KEYINIT)
in your index-format so that keywords will be displayed in the MESSAGE
INDEX.ARROW, IMAPSTATUS,
and keyword tokens can have custom colors.
I have more suggestions for Pine settings throughout this Power Pine page, especially in Speeding Up Pine below, and on the separate pages Compartmentalizing and Sharing Your Pine Configuration, Changing Your From Header in Pine, and Pine's Feature List and its More than 90 Features.
| Note |
|
Another essential part of your Pine configuration is the location of
mailboxes and newsgroups that you are interested in. If you would
$HOME/mail directory; or nntp-server, which you specified in Step
5I above,then go through the following steps.
Nickname : Mail Server : Path : mail View :Note that the
Server field is blank, which means that this collection resides on the local system (the system on which Pine is running).
Change Path so that it is the name of the directory that
you created in step 3C above (Creating Directories for
Your Pine User Files). For a local collection,
Path is relative to $HOME
so if it is a subdirectory of $HOME, you can simply type the subdirectory's
name. If it is not a subdirectory of $HOME, type the absolute path, including
the drive letter if you are on a PC. I suggest that you change the Nickname
to something more meaningful than Mail so that when you
select a folder collection using G (Go),
S (Save), or ML Nickname : Local Msgs Server : Path : Msgs View :When you save this setting, Pine will automatically detect the appropriate path delimiter (usually either slash (
/), dot (.),
or backslash (\)) and append it to the end of the Path value. Path is case sensitive and on such a system, for example, Mail is not the same as mail.
$HOME/mail or $HOME/Msgs, rather than a relative path, such as mail or Msgs (which are used in the examples above). This way
it will be easy for you to remember where exactly the collection is located on your local system. This is especially useful
if your system
uses an imaprc file to change the default location of your mail's 'home' directory.
Server field must be a fully
qualified server specification. The server
qualifiers depend on what is supported by the server and what is
supported by your version of Pine. Possible server qualifiers include
/imap (which does not need to be specified because it is
the default), /nntp, /ssl, /tls,
/tls-sslv23 (available in Alpine),
/secure, /novalidate-cert, /norsh,
/notls, /loser
(which is sometimes useful with a Courier IMAP server), /readonly,
/anonymous, and /debug. If you are not sure
what to put in the Path field, I suggest that you start
by leaving the Path field blank and filling in only the
Server field, for example, start with something like this:
Nickname : Server : server.name/user=LoginName/qualifier2/qualifier3 Path : View :where
qualifierN is replaced with one of the
server qualifiers described when you view Pine's built-in help (using
^G while your cusor is in the Server field). For example,
I would start with the following for my FastMail.FM account:
Nickname : Server : mail.messagingengine.com/user=iiiiiii@fastmail.fm/ssl Path : View :When you save this setting, Pine will automatically give it a nickname.
/), dot (.),
or backslash (\), and the directory, which is sometimes
either INBOX. or mail/. Type MSL
and update the Path value for the folder collection. For
example, here is what I use for my FastMail.FM account.
* Nickname : FastMail.FM Server : mail.messagingengine.com/user=iiiiiii@fastmail.fm/ssl Path : INBOX. View :The above Path (
INBOX.) is what is usually used to access
the personal mailstore on a Cyrus or Courier IMAP server. On a UW IMAP
server, the Path is often determined by the user and a common choice
is mail/ or Mail/. On some IMAP servers --
including the UW IMAP server on Verio's
Signature accounts, some MS Exchange servers, and the Gmail IMAP server (which is discussed in the next section) -- the Path should
be left blank.
Nickname : {mail.messagingengine.com/user=iiiiiii@fastmail.fm/ssl}INBOX.[]
On 2007 October 24 Google started supporting IMAP access to Gmail (Google Mail). To use Pine to access and manage your Gmail messages, type MSLA (Main> Setup> collectionLists> Add) and add a collection like this:
Nickname : Gmail Server : imap.gmail.com/ssl/user=id@gmail.com Path : View :
where the Nickname is anything you like and id@gmail.com is replaced by your Gmail or Google Apps sign-in ID.
Gmail's IMAP server is different, as is Gmail's POP server, which is discussed in
POPping Gmail is Different below. To successfully use Pine to access and manage your Gmail IMAP collection, I recommend that you do the following.
[Gmail]/All Mail[Gmail]/All Mail[Gmail]/All Mail[Gmail]/All Mail[Gmail]/All Mail[Gmail]/Trash special folder.
[Gmail]/Trash[Gmail]/Spam[Gmail]/All Mail: incoming-archive-folders = <No Value Set> : read-message-folder = <No Value Set> : [ ] auto-move-read-msgs : [X] save-will-not-delete : pruning-rule = (*) don't rename, don't delete :The first three settings and the last (pruning-rule) setting prevent Pine from trying to archive messages in a non-Gmail way (see #2f above for the Gmail way of archiving). The first three settings also work around a Gmail bug that causes Pine to complain about "Message to save shrank!" [subscription to the Alpine-alpha list is required to view this link].
save-will-not-delete, makes it easier to save a message in multiple folders (discussed in #2d above) and makes it less likely that you will misplace a message and need to go hunting for it in the [Gmail]/All Mail
Notes:
[Gmail]/
on some accounts and in
[Google Mail]/[Gmail]/All Mailexpunge-only-manually feature.
See Also:
|
Collection Tips |
|
| Important | After you set up Pine to access your folder collections,
you will be able to use Pine to manage and create mailboxes in your
folder collections. When you are choosing a name for a mailbox, do
not use the string inbox
or mbox or mail.txt
or inbox.mtx or default
or any combination of upper and lower case letters of any of these
strings. For details about the problems with these names, see Notes
About Mailbox Names in the Procmail Quick Start. |
With Pine you can look up addresses in personal address books, global address books, and LDAP directories (as long as Pine was built with LDAP support). The last two are usually set up and maintained by a system administrator and shared by many users. Personal and global address books can be one of the following two types:
| Note |
|
If you are going to use only a local personal address book, you do not need to do anything to set up your address book because this is the Pine default. But if you would like a personal address book to reside on an IMAP server and be usable by WebPine or Pine running on a different system, you will probably want to set up an IMAP-accessible address book.
PINE 4.64 SETUP ADDRESS BOOKS
addrbook
Personal AddressBook in Pine\addrbook
[ Move here to add a Global Address Book ]
The PC-Pine default personal address book resides in the same directory
as your pinerc and is named addrbook.
In Unix Pine, the default personal address book is in $HOME and
is named .addressbook. | Important | We are not adding a global address book so do NOT
put the focus on[ Move here to add a Global Address Book ]Usually only a system administrator creates and updates a shared global address book. |
PINE 4.64 ADD ADDRESS BOOK Server Name : xxx.imap.server/user=LoginName Folder Name : path.to.abook-imap NickName : abook-imap
| Notes |
|
To learn more about IMAP-accessible configuration files & address books, and address books in general, see:
The steps in this section copy the addresses from a Pine local address
book to an IMAP-accessible address book. Before you go through steps 9A-9K,
make sure you have gone through steps 8A-8G in the previous section and
that both the local and IMAP-accessible address book are listed in the
ADDRESS BOOK LIST (which you get to using Main > AddrBook)
for the Pine you are currently using.
| Tips |
|
enable-aggregate-command-set feature.)
Save to which addrbook : abook-imap
^G Help ^P Prev AddrBook
^C Cancel Ret Accept ^N Next AddrBook
Starting with Pine 4.60, which was released 2004 May 10, Pine supports
keywords, which are also known as user-defined labels, user-defined flags,
or user-defined tags. To set up Pine keywords, go to Main >
Setup > Config (MSC) and use the WhereIs
(^W) command to search for keywords. To learn
how keywords are used in Pine, type ? or ^G and
read Pine's
Help about Keywords. To add a keyword and optionally a nickname
for it, type A.
If you want to be able to use the same keywords in lots of different
IMAP clients, including Pine, SeaMonkey Suite,
Thunderbird, Cone, and Mulberry 4.0.1+, include the following
five
$LabelN
common
keywords in your list of Pine keywords.
keywords = Nickname1 $$Label1
Nickname2 $$Label2
Nickname3 $$Label3
Nickname4 $$Label4
Nickname5 $$Label5
where you specify any (case sensitive) string you like for NicknameN and order these however you like.
For example, if you use the keyword $Label4 to mean “To
Do” (which is the SeaMonkey Suite/Thunderbird default meaning of
this keyword) and if you want this keyword listed first on your Pine FLAG
MAINTENANCE screen, you could specify the following on the Pine SETUP
CONFIGURATION screen.
keywords = ToDo $$Label4
nicknameN keywordN
For details about nicknames and keywords, including why two dollar signs
($$) are needed to specify a keyword with only one dollar
sign in its name, e.g. $LabelN, see Pine's
Help about Keywords. In addition to specifying keyword names and their
nicknames, you may also want to do some or all of the following.
"{" "} "
^ ^^
left right
I am currently experimenting with using these keyword-surrounding-chars:
"" "| "I.e., nothing on the left and the pipe character (
|) on the right.addflag command.To configure #1-4, go to Main > Setup > Config (MSC). To configure #5b and #6, go to Main > Setup > Rules (MSR).
Important: Keywords do
not work on NNTP, POP, and some IMAP servers. For example,
the Gmail IMAP server, which is discussed in
Setting Up Your Gmail Collection above,
does not support
IMAP keywords.
| Keyword Tips |
|
For more information about keywords, see:
$Label1, $Label2, $Label3,
$Label4, $Label5), but Thunderbird 2.0+
and SeaMonkey Suite 1.1+ support many (maybe infinitely many?)
IMAP keywords.
Color was introduced in Pine 4.20, which was released on 1999 October 12. To set your Pine colors, go to:
color,
for example, color-style
(not available in PC-Pine; essential in Mac, Unix, and
other non-PC Pines), current-indexline-style,
titlebar-color-style,
and thread-index-shows-important-color.
You may also want to experiment with using the ARROW
token in your index-format (discussed above) because it affects the color
of the current message on the MESSAGE INDEX screen.Since there are so many settings, you may want to use someone else's color settings as a starting point. When I first started experimenting with Pine's colors, I used Starv's settings at dotfiles.com and made a number of changes, including changing normal color to white on blue, and the title and keylabel color to white on black. If you come up with a good set of colors, how about being a good net citizen and contributing them to dotfiles.com/Mail Clients/Pine.
If you edit your pinerc file directly, rather than from
within Pine, you can specify colors using color names or RGB (Red Green Blue) values.
For example:
| Pine Name |
RGB
Value |
Comment | |||||
| black | 000,000,000 | ||||||
| blue | 000,000,255 | ||||||
| green | 000,255,000 | the HTML color keyword for this RGB value is lime or green1 | |||||
| cyan | 000,255,255 | ||||||
| red | 255,000,000 | ||||||
| magenta | 255,000,255 | ||||||
| yellow | 255,255,000 | ||||||
| white | 255,255,255 |
You might be able to use the RGB values of any color that is
supported by your system. For details, see color-style,
Color
Configuration, and patterns-indexcolors
in the UW PIC Configuration and Preferences; and Color
Details in the UW PIC Technical Notes on Configuration and Preferences.
Speed Tip: If you have a slow connection to the Net, for example 56 kilobits/second (kbps) or slower, and if you run Pine on a remote system in an ssh window, you might want to use Pine's default colors. This is discussed in Speed Tip #28 below.
If you use my Reverse Spam Filtering system, you may want your solicited-bulk-email (mailing-list) messages to be colored blue on your Pine MESSAGE INDEX screen. An easy, but not exact, way to do this is to create an INDEX COLOR RULE (by typing MSRIA) with the following conditions.
PINE 4.64 ADD A COLOR RULE
Nickname = SBE
Comment = Solicited Bulk Email
==================== CURRENT FOLDER CONDITIONS BEGIN HERE ====================
Current Folder Type =
Set Choose One
--- --------------------
( ) Any
( ) News
(*) Email
( ) Specific (Enter Incoming Nicknames or use ^T)
Folder List = <No Value Set>
==================== COLORED MESSAGE CONDITIONS BEGIN HERE ====================
To pattern = <No Value Set>
From pattern = <No Value Set>
Sender pattern = <No Value Set>
Cc pattern = <No Value Set>
News pattern = <No Value Set>
Subject pattern = <No Value Set>
Recip pattern = <No Value Set>
Partic pattern = <No Value Set>
Precedence pattern = bulk, list
Add Extra Headers
:
To add an extra header field, such as Precedence, to the
COLORED MESSAGE CONDITIONS, move your cursor to Add Extra
Headersbulk,
list
Not all solicited-bulk-email messages include a Precedence:
bulk Precedence: list
Starting with Pine 4.62, which was released 2005 Jan 18, you can use Pine's aggregate operations (details below) to quickly select messages that satisfy a rule's conditions. For example, to select messages that satisfy the SBE (Solicited Bulk Email) rule above, type:
; R SBE
which means Select > Rule > SBE. You can then use Z to zoom in on or zoom out from the selected messages. To flip the selection, i.e., to select the messages that do not match this rule, type:
; F
To broaden or narrow the selection, use one of the following along with your desired criteria:
; B ; N
Messaging clients, such as Pine 4.62+, that allow users to zoom in on messages that match saved conditions are said to support “saved searches” or “faceted mailboxes” or “virtual mailboxes.” Virtual mailboxes can be used to help you manage MaybeSpam messages, ToDo messages, and other facets of your messaging world.
To change the screen font that PC-Pine uses, drop down the Config menu
(in the MS-Windows-style menu bar) and choose Set Window Font. The Font
list box contains a list of the fixed-width
fonts on your system. Experiment with different fonts until you find
one you like. Some fonts that I kind of like are vt100, Fixedsys,
Lucida Console,
Monaco, ProFont,
and Bitstream Vera Fonts. The
vt100 font (vt100.fon) is shipped with VanDyke
Software's great terminal emulator SecureCRT.
You can get this font by either trying out CRT or SecureCRT or from one
of these places:
In order for a font such as vt100 to be available to PC-Pine, you may need to go to Start > Settings > Control Panel > Fonts > File > Install New Font and install the font on the system.
To learn about the interaction of fonts and character codings, see character-set and the euro sign above and the Microsoft Euro Currency Resource Center.
To learn more about monspaced fonts, see ProgrammerFonts in Keith Devens' Wiki and Monospace/Fixed Width Programmer's Fonts at Lowing.org.
Now you are ready to test your configuration.
enable-full-header-cmd.
Tip: To do a more thorough test of Pine, see the Test Checklist in the Pine Technical Notes.
%HOME%
directory and look at the files and directories that Pine created. Your
configuration information is stored in %HOME%\Pine in a
file named pinerc.
%HOME%\mail, you can delete the
%HOME%\mail directory. Before you delete it, make sure
it does not contain any folders you want to keep. If it does contain
folders you want to keep, move them to your local folder collection
(for me that's %HOME%\Msgs).pmxxxw32.zip file, which is in the directory
you created in step 1B.
In Windows Explorer you can double click on a file and the default action is determined by the file extension. For example, .txt files are opened in your default text editor. For files with no extension, such as pinerc, newsrc, and mailcap, double clicking produces the File Open dialog box, which asks you to pick a program to use to open the file. To set up your system so that double clicking on files with no extension opens them in a text editor, do the following:
Edit or Edit
with Notepad or Edit with Whatever (or
actually anything you like!). C:\Progra~1\Vim\Runtime\gvim.exe "%1""%1"
ensures that files with spaces in their names or path will be opened.
There are lots of ways to start Pine. For Unix and Mac Pine, you can
usually just type pine at a command prompt. For PC-Pine,
you can use Windows Explorer to find pine.exe on your system
and then double click it. Or you can choose Run from the Windows Start
menu and type the absolute path to pine.exe and click OK.
You can even lauch Pine from a DOS prompt by typing the absolute path
to pine.exe at the DOS prompt. Below I discuss some other
ways to launch Pine.
If you use a Unix-like system, for example FreeBSD, Linux, or OS X, and if you always want to use some Pine command-line arguments when you launch Pine, you can create a wrapper script that launches Pine. For example, I use a script similar to the following on my Mac.
#!/bin/sh /usr/local/bin/pine -P "${HOME}/Pine/pinercconf-mac" -p "${HOME}/Pine/pinerc" -x "${HOME}/Pine/pinercex" "$@"
To make this long line easier to read and edit, you can split it over
multiple lines by using a \), immediately followed
by newline,
followed by whitespace (spaces, tabs, and/or newlines). For example, the
above script is equivalent to the following.
#!/bin/sh # The above "shebang" ("#!") means this script is run as a Bourne shell script. # This script runs pine with the arguments listed below PLUS any arguments that # are specified on the command line (that's what the $@ variable means). /usr/local/bin/pine \ -P "${HOME}/Pine/pinercconf-mac" \ -p "${HOME}/Pine/pinerc" \ -x "${HOME}/Pine/pinercex" \ "$@" # Tip: You may want to use ${1:+"$@"} or ${1+"$@"} rather than "$@" in the last line above
You can name your script whatever you like, for example, you might call
it mypine or simply pine. After you create the
script, use a command like this to make it executable:
chmod +x mypine
If the script is in a directory that is not on your PATH,
you need to specify the path
when you run it, i.e., you need to use a command like one of these:
./script relative/path/to/script /absolute/path/to/script
To avoid needing to specify the path to the script, put the script in
a directory that is listed in your PATH environment
variable. For example, if $HOME/bin is on your PATH,
you could put it there.
Important: If you name the script pine, make
sure that the script's directory is listed in your PATH before
the directory where the real pine resides. Otherwise running
pine will launch the pine binary rather than
your pine script.
To learn about Unix-like shells and shell scripts, see:
For another example of a Pine-related shell script, see the Build Tips in Using a PASSFILE with Unix and Mac Pine above.
To learn about the -P, -p, -x
Pine command-line arguments that are used in these scripts, see
man pine and
Compartmentalizing
and Sharing Your Pine Configuration.
"C:\Program Files\Pine\pine.exe" -i
The -i argument tells Pine to start on the message index rather
than the Pine Main Menu.
As I discussed in the Quick Editing of Pinerc, Mailcap, and Other Files with No File Extension above, you can double click on a file in Windows Explorer and the default action is determined by the file extension. The Pine default is to use no file extension for mailboxes but you might want to start doing this because then
Below I give instructions for how to associate a file extension with Pine and how to create a pop-up menu that says Open with Pine.
| Tip |
Do not use .mbx as the extension for mailboxes that
are in .cMBX or .ccm?
Also, using the extension |
The PC-Pine default folder format is c-client MBX format and the Unix
Pine default folder format is Unix mail spool (AKA mbox)
format. Both PC-Pine and Unix Pine understand both these folder formats.
I use the extension .cMBX for folders that I create with
PC-Pine. For folders that are in Unix mbox format, I use either no
extension or .Umbox. In the following steps, I walk you
through associating the .cMBX extension with PC-Pine.
Open with Pine.C:\Progra~1\Pine\pine.exe.
Append -if to this so it now says:
C:\Progra~1\Pine\pine.exe -ifNote: Do not append
"%1" to this because Pine
has quotation marks built in and a second set of quotation marks will
not work.
For files that do not have a file extension, you probably do not want the default MS Windows association to be to open with Pine. On my system, I set the default action for files with no extension to be to edit with my text editor and set things up so that if I right-click on these files, one of the menu items is to Open with Pine. Here's how to set this up.
Most browsers have a built-in mail and news client but if you want to
be able to use your Pine address book, roles, Fcc settings, and more,
you'll probably want to set up your browser to use Pine for mail and news.
This will enable you to click on a mailto or news URL such as
mailto:nm-this-address-is-valid@no.sp.am
or
news:comp.mail.pine
and launch Pine. The sections below describe how to set this up
in Internet Explorer, Navigator, and Opera.
If you are viewing this page in a web browser, you can test how your
browser handles mailto: and news: URLs using these URLs
mailto:nm-this-address-is-valid@no.sp.am
mailto:nm-this-address-is-valid@no.sp.am?subject=Hi Nancy
news://news.gmane.org/gmane.org.infiniteink
Go to Tools > Internet Options > Programs and in the drop-down list box for both E-mail and Newsgroups, choose PC-Pine.
If you are using a stand-alone version of Navigator, follow these Netscape instructions for Using MAPI Mail Clients with Navigator 4.0x . You also need to follow the instructions in the next section to make Pine be your default MAPI client.
If you use Mozilla or Netscape version 6 or 7, see Using the default system email client with Mozilla - Windows and Mac only and Muttzilla.
Go to File > Preferences > Email and select Use external mail application and put the following in the text box:
C:\path\to\pine\pine.exe %
Opera 6 supports mailto: URLs that specify the subject of the mail message, but Opera 5 and earlier do not.
Alternatively, if PC-Pine is your system default mail client, you can select Use system default in the File.Preferences.Email dialog box and then you do not need to specify the command.
Lars Eighner posted a message to comp.mail.pine with the Subject Using pine with mailto urls in lynx (unix) that describes how to do this. More information is on the Lynx site, e.g. in URL Schemes Supported in Lynx.
Search for mailto in the Evolution Knowledge Base. Especially relevant is How do I make Evolution handle mailto: links in my browser? This may give you ideas for how to make Pine handle mailto: links in your browser.
If you want Pine to be the program that is launched when you choose Send To Mail Recipient in either a mail-enabled Windows applications or when you right click on a file in Windows Explorer, do the following.
pmapi32.zip. Make sure
that you are using the corresponding version of PC-Pine so that
all these files are compatible.readmemapi32.txt, which is included in the
zip file.mapi_debug.txt in your %TEMP% directory.
To find out about setting and checking environment variables such
as %TEMP%, see Setting Environment
Variables above.instmapi.exe to make the Pine MAPI
file your default messaging API
(application program interface). | Notes |
|
The following feature-list settings 1) might prevent you from sending a message somewhere you don't want to send it; and 2) might hide information about your local system and the SMTP & NNTP servers that you use. To edit your Pine feature-list and other configuration settings, type MSC (Main > Setup > Config).
Note: To be able to use all the features listed in this section, you need to be using Pine 4.60+ or Alpine.
feature-list =
Set Feature Name
--- ----------------------
:
[ Reply Preferences ]
:
[ ] reply-always-uses-reply-to
:
[ Sending Preferences ]
[X] disable-sender
:
[ ] send-without-confirm
[ ] use-sender-not-x-sender
:
[ News Preferences ]
[ ] compose-sets-newsgroup-without-confirm
:
[X] hide-nntp-path
:
[ ] predict-nntp-server
[ ] quell-extra-post-prompt
:
[ Advanced User Preferences ]
:
[X] quell-timezone-comment-when-sending
:
[X] scramble-message-id
In addition to these feature settings, I also recommend that you unset
the nntp-server variable in any role
that you do not want to use to post to NNTP newsgroups. To unset a variable
in Pine, set it to:
""
For example, in a role, specify this:
Use NNTP Server = ""
^^
Pine will convert this to the string <Empty Value>
Or this (which I prefer):
Use NNTP Server = bogus
Note that this setting will be relevant only if predict-nntp-server
is unset, which is one of the feature-list settings I recommend in this section.
To learn more about why you might want to do this, see The
Problem with Receiving an Email Message that Includes a Newsgroups Header
Line on the All About Pine page.
For more feature-list suggestions, see My 27 Favorite feature-list Settings in Step 6 above.
Tip: Some outgoing SMTP service providers will scrub your email headers to make it hard (or impossible) for your email recipients to determine your email client, your IP address, and more. For example, LuxSci, which is one of my email service providers, offers Additional Privacy with Anonymous SMTP.
See Also: EFF: Privacy and EmailPrivacy.info.
If an intruder or virus gets into your system, you can try to thwart
his/her/its efforts to find your files by using non-standard names
for directories and files. For example, I suggest you name your %HOME%,
Program Files, and mail directories something
weird and non-standard, and name your mailboxes using either no extension
(which is the Pine default) or using an extension other than .mbx.
The Welyah
virus (aka Shoho or I-Worm) harvests email addresses from
*.mbx files so you do not want any *.mbx file on your system to contain
a valid email address!
If you build your own version of Pine to use a password file (PASSFILE),
you should name the default file that stores your passwords something
non-obvious and definitely something other than the default pine.pwd.
Alternatively, you can invoke Pine using
the -passfile command-line argument to specify the name and location
of your Pine PASSFILE.
You can also make files and directories hidden but this will fool only the dumbest of viruses.
To find out if your system is vulnerable to intruders from the Internet, use either Shields Up! at Gibson Research Corporation or one of the many security scanners listed at the Open Directory Project (dmoz.org).
| The best way to deal with viruses is at your incoming mail server. If you have access to Procmail on your mail server, I recommend that you read the section called Snagging Viruses in the Procmail Quick Start. An alternative is to use a mail service provider that runs up-to-date virus scanning software on their server. There are many such providers listed on my IMAP Service Providers page. |
A common way for a virus to spread is through an email attachment that can run a program (I use the word program to include scripts and macros). To avoid this type of virus, do not run a program that you receive in email. Even if it is sent to you by a friend. These programs can be buried in files that you usually think of as just containing data, such as a Word or Excel document. Or even an HTML document. If you are super paranoid, you can turn off scripting in Windows, Word, Excel, your web browsers, and any other program on your system that supports scripting. But if you need to be able to use scripting on your system, you can set up Pine so that you can not easily launch programs from within Pine. The way to do this is to create a mailcap file that Pine will use to determine how to handle MIME attachments that you receive. Pine can also use a mimetype file to determine how to handle MIME attachments that you send.
| Note | PC-Pine uses the Windows registry to associate programs, file extensions, and MIME types. You need to use a mailcap or mimetype file only if you want to override a registry association. |
Before you even think about opening an attachment, you should find out as much as you can about it. To do this, first view the message in the Pine Message Text screen, then type V to view the Attachment Index, use the arrow key to select the attachment you're interested in, and type A to find out about the attachment. The About Attachment screen looks like this.
PINE 4.64 ABOUT ATTACHMENT
Details about Attachment #2 :
Type : Application
Subtype : OCTET-STREAM
Encoding : BASE64
Parameters : NAME = IKissYou.TXT.vbs
Description : "Message from Mahir to you!"
Disposition : ATTACHMENT; FILENAME = IKissYou.TXT.vbs
Approx. Size : 27 bytes
Display Method : "via Windows-specific method"
This is the details of the attachment that is part of the message
with subject PC-Pine,
I Kiss You that I sent to comp.mail.pine after the ILOVEYOU
virus broke out. As you can see, the display method is "via
Windows-specific method", which means that it will be
opened using whatever the Windows registry says to use to open a .vbs
file. The default setting is for Windows to run the Visual Basic script.
To process the message, type E to exit the About Attachment screen and go back to the Attachment Index, then do one of the following:
| Type This | To Do This | |
|
Enter or > or V
|
Open the attachment using the display method that was listed on the About Attachment screen.
|
|
| S | Save the attachment as a file on your hard disk. You can then run a virus scan on the file, open it using whatever program you want, etc. |
If you are using PC-Pine, you can also right click on the attachment and choose View, Save, Delete, or About.
Starting with Pine 4.61, which was released 2004 July 15, you have the option of exporting a message and all its attachments by typing E (Export) followed by ^P (AllParts) from either the MESSAGE INDEX or the MESSAGE TEXT screen.
To avoid viruses like the ILOVEYOU virus, put one of the following lines
in the file
application/*;"" application/*;C:\Progra~1\Vim\Runtime\gvim.exe -R %s application/*;C:\Path\your-favorite-editor.exe %s
where the italicized words (C:\Progra~1\Whatever) are replaced
with the correct path for your system. These lines tell Pine what
to use to open a file whose MIME type is Application and whose MIME
subtype is anything (*) other than what is explicitly
specified elsewhere in your mailcap file. So, for example, an attachment
of type Application/MSWORD will be opened with whatever program you
specify in your mailcap for the type Application/MSWORD (see the next
section for how to view Word documents).
The first line tells Pine to use nothing ("") to open this type of file, i.e., to not open it! When you use this setting and try to open an attachment of type Application/*, Pine displays this message:
[Can't start viewer. Windows error 161.]
Question: Does anyone know of a mailcap setting you can use that will produce a message that does not contain the word error? E.g., something that would produce a message like this:
[Don't know how to display Application/OCTET-STREAM attachments. Try Save.]
The second line tells Pine to open this type of file as a read-only file in the editor gvim (this is what I use). You can use a modified version of the third line to tell Pine to use your favorite editor to open these type of attachments. It's a good idea to open an application in read-only mode so you don't accidentally corrupt it.
With the second mailcap setting for application/*, I see the following on the About Attachment screen for the IKissYou attachment:
PINE 4.64 ABOUT ATTACHMENT
Details about Attachment #2 :
Type : Application
Subtype : OCTET-STREAM
Encoding : BASE64
Parameters : NAME = IKissYou.TXT.vbs
Description : "Message from Mahir to you!"
Disposition : ATTACHMENT; FILENAME = IKissYou.TXT.vbs
Approx. Size : 27 bytes
Display Method : "C:\MyProgs\Vim\Runtime\gvim.exe -R <datafile>"
And I do not have to worry about accidentally running a malicious attachment that is of type Application/whatever, such as a Visual Basic script.
If you want to completely disable Windows Scripting Host on your computer, see How to uninstall Windows Scripting Host at F-Secure.
One of the ways that the Nimda, BadTrans.B, and KLEZ worms propagate is as a MIME attachment that is an executable file but is mislabeled as type audio/x-wave, audio/x-wav or audio/x-midi. I don't know if PC-Pine users are vulnerable to mislabeled attachments, but to be sure that you are not add this to your mailcap file
audio/*;""
This means that the if the MIME type is labeled audio and the
MIME subtype is anything (*), use nothing ("")
to open this type of file, i.e., do not open it. And then make sure you don't
run any attachment that is labeled audio/* by hand!
To learn more about this type of virus, see the Microsoft Security Bulletin (MS01-020): Incorrect MIME Header Can Cause IE to Execute E-mail Attachment.
A common way for a virus to spread is through a macro that is part of a MS Word document. It is a good idea to set up your system so that Word documents you receive via Pine are viewed in Word Viewer, WordPad, or wv rather than Word. WordPad is part of Windows but it can not view Word 97 documents; it can only view documents created by earlier versions of Word. Word Viewer is free from Microsoft and it can view documents created by any version of Word. You can find out more about Word Viewer and download it here or here.
If you are using Pine on a non-PC platform, such as Unix or OS/2, you can use wv to load and parse Word 2000, 97, 95 and 6 file formats. You can find out more about wv and download it at wvWare or SourceForge.
To tell Pine what program to use to view Word documents, put a line like one of the following lines in the file in your mailcap:
application/MSWORD;"C:\Program Files\Accessories\wordpad.exe" %s application/MSWORD;"C:\Program Files\WordView\wordview.exe" %s
where the italicized words (C:\Program Files\Whatever) are replaced with the correct path for your system. Since neither of these programs support macros, a macro virus won't be able to infect your machine if you open a Word document with either of them. However, if you use MS Word to open a Word document that contains a macro, you can become infected.
More information about preventing, detecting, and removing Word macro viruses is at MultiLinker's Word is acting strangely, and wasn't a couple of weeks ago! and Bruce A. Epstein's Avoiding viruses in Word documents and elsewhere.
For option #1, you could use
text/html;C:\Progra~1\Lynx\lynxbat.bat %s
You can download the latest Lynx for Windows from FDISK.COM.
For option #2, you could use
text/*;C:\Progra~1\Vim\Runtime\gvim.exe -R %s
If you have any suggestions for how to deal with potentially dangerous attachments or HTML, please let me know. Also, if you have anything to add to the list of Pine Security-Enhancement Wishes that is on my main Pine page, please let me know that too.
Do Not Send Your Password in Plaintext
The default for most mail and news clients is to send passwords in plaintext. This means that anyone using a packet sniffer, such as ngrep or Sniffit, can find out your password.
If your IMAP server supports TLS/SSL,
CRAM-MD5, Kerberos,
or OTP
you can use one of these protocols to connect to the server without doing
plaintext authentication.
To tell Pine to disable plaintext authentication and to use the most secure
authentication supported by Pine and the server, append /secure
/tls/ssl
{your.imap.server/user=LoginName/tls}
Or
{your.imap.server/user=LoginName/secure}
Or
{your.imap.server/user=LoginName/tls/secure}
If you establish a secure TLS/SSL connection to an IMAP server, there
will be a plus sign (+) in the top right corner of your
Pine window. For TLS/SSL access to some IMAP servers, you need to
include the qualifier /novalidate-cert this
is unsafe
and you should ask your IMAP server's admin to set up the system so
it sends valid certificates.
To ensure you are always using a secure connection, make sure that
you append /tls or /secure (or both) to
every occurrence of your server specification in your pinerc
and that you always see a plus sign (+) in the top right
corner of your Pine window. If your ISP doesn't let you securely connect
to their IMAP server, get
a new IMAP service provider!
For more information, see:
If a server either does not support TLS/SSL, CRAM-MD5, or Kerberos or if a server allows access only from trusted IP addresses (this is common for SMTP and NNTP servers), you can use SSH port forwarding (tunneling) to encrypt passwords and make your server requests appear to be coming from the local system. The following describe SSH port forwarding:
If you are the administrator of your systerm and want to tunnel to
only one IMAP, SMTP, and NNTP server, it is simplest to tunnel through
your local system's default IMAP port (143), SMTP port (25), and NNTP
port (110). After you set up SSH port forwarding, edit your pinerc
so that every occurence of the name of a server that you have tunneled
to is replaced by either localhost or [127.0.0.1].
Your IMAP server specification will look like one of the following:
{localhost/user=LoginName}
{[127.0.0.1]/user=LoginName}
Your SMTP and NNTP server specifications will look either like this:
smtp-server=localhost nntp-server=localhost
Or this:
smtp-server=[127.0.0.1] nntp-server=[127.0.0.1]
If you are not the administrator of your system or if you connect to more than one IMAP server, you need to use a different local port number for each remote IMAP server you connect to. What I do is use port numbers 2143, 3143, ..., 9143 for SSH forwarding to different IMAP servers. And then the IMAP server specifications look like one of the following:
{localhost:9143/user=LoginName}
{[127.0.0.1]:9143/user=LoginName}
| Important |
|
| Tip |
To ensure that you always use ssh port forwarding to connect to
a server, delete the file pine.pwd (or rename it to
something like pine.pwd.OLD). Create a new empty pine.pwd
by following the instructions in step 4
and then when you are prompted for the localhost password,
type the password for the server that localhost is tunneled to.
If you are ever prompted to give the password to something other
than localhost or localhost:port, don't
do it! Instead, quit Pine and go into your pinerc and change all
server names to localhost and make sure you've set
up ssh port forwarding for all servers.
|
To discuss ssh or port forwarding, go to
comp.security.ssh.
More about security is at:
The speed tips in this section are separated into 31 General Speed Tips and 7 NNTP Speed Tips. The general speed tips are relevant when Pine is accessing a POP server, an IMAP server, an NNTP server, an (E)SMTP server, a local file system, or running remotely in an ssh window. The NNTP speed tips are relevant only when Pine is accessing an NNTP server.
rsh-open-timeout=0 ssh-open-timeout=0Since these are hidden variables, you need to either manually put these lines in your pinerc or set the
expose-hidden-configimap.server.name:143 or imap.server.name/ssl
(which usually implies port 993), Pine will not try to use rsh or ssh
to connect to the server. I discuss how to specify and qualify a server
in Running Pine the First Time and Setting inbox-path
and Other Essential Variables above. Starting with Pine 4.41, you
can use the
/ssl
flag, or the /norsh flag are especially useful when specifying
a pinerc
file that is stored on an IMAP server.sort-key=Arrivalor, if you prefer reading messages from newest to oldest, use this
sort-key=Arrival/ReverseWith either of these settings, Pine won't need to sort the mailbox but instead will present the messages in the order that they are sitting in the mailbox. This is especially useful when you are accessing either a mailbox or newsgroup that contains a lot of messages, or a newsgroup that's on a flaky NNTP server (see the first NNTP speed tip below). Another advantage of sorting by Arrival is that a message that was sent from a system with an incorrect date setting will be sorted more correctly than if you have Pine sort by Date.
0
means check only when you start Pine and -1 means never
check. Since the cached copy of my address book is almost always good
enough, I include the following in my pinerc:
remote-abook-validity=0You can force Pine to update your local address book cache by typing ^L from the address book screen.
ATT, which displays the number of attachments
in each message, slows down presentation of the MESSAGE INDEX screen.
When I removed ATT from my index-format specification, I noticed a significant
speed improvement. incoming-folders so you can use TAB
to quickly step through the mailboxes and newsgroups that you read regularly.
Details are in Using the Incoming-Folders Collection
below.incoming-folders list and give it a nickname. For
example, I put my SENT folder in my incoming-folder list
because I frequently need to re-read or forward a message that I sent
and it is easier to open it from my incoming-folders list or to use
its nickname than it is to find and drill down in the appropriate folder
collection. See the next item for a related tip. [X] combined-folder-display : [ ] expanded-view-of-foldersThis will quickly display your incoming-folder list, which is stored locally, and your unexpanded collections and eliminate the often time-consuming Formatting Scroll Text message. Note that you can quickly go to a folder from anywhere in Pine by typing G (for Go To Folder) and then specify the folder by typing the initial letter(s) and using TAB completion.
[MAIL FOLDER "INBOX" CLOSED DUE TO ACCESS ERROR]and if your IMAP server is running on a Unix system, you might be able to alleviate this problem by editing your Pine configuration file (using MSC) so the
mail-check-interval
is set to 60 seconds or less. The edited line in the Pine Setup
Configuration screen will look like this:
mail-check-interval = 60Some details about this bug and its fix are in the groups.google.com archives. If you still get the inbox-closed error message with a setting of 60, try a lower number. To be polite to the IMAP server and its users, you should use the highest number that prevents the inbox-closed error message.
mail-check-interval
to a high number that is less than 1800‡
seconds (30 minutes), for example:
mail-check-interval = 1740
^^^^
29 minutes
This way you will rarely get interrupted by Pine checking your mail
server. Whenever you want to check for new mail you can type ^L
(redraw screen) or X (expunge), or do one of the
things I describe in Checking for Recent Messages
below. [X] quell-mailchecks-composing-except-inbox [X] quell-mailchecks-composing-inboxNote that on some systems, mailchecks are needed to keep IMAP connections alive and if you set these two features, you will sometimes lose your IMAP connections while composing a message. Because of this, I recommend setting these features only if mailchecks during composition are a big irritant.
maildrop-check-minimum
to a fairly high number and definitely higher than or equal to your
regular mail-check-interval,
which I discuss in speed tips #21A and #21B above. For example, I use
at least 3600 seconds (60 minutes) because my maildrop folders receive
only low priority messages. This speeds up Pine because it is “expensive”
to check a maildrop folder. Note that there is no need to keep open
(aka “keep alive”) an NNTP or POP maildrop because in order
to check these for recent messages, Pine needs to close and re-open
the folder. maildrop-check-minimum to zero (0).
disable-shared-namespaces
(which is available in Pine 4.40+) will prevent password-lookup delays
on some systems.enable-background-sending
to make sending appear to be fast. This feature has some potential
problems and is not available on MS Windows, DOS, and some flavors of
Unix. incoming-startup-rule so that when
Pine opens an incoming mailbox, the focus is on the message (or region
of the mailbox) that you are most likely to want to view. My preference
is the following.
incoming-startup-rule =
Set Rule Values
--- ----------------------
( ) first-unseen
(*) first-recent
( ) first-important
( ) first-important-or-unseen
( ) first-important-or-recent
( ) first
( ) last
This way you will usually be able to immediately start reading messages
and you won't need to spend time navigating through the mailbox to find
the messages that you are interested in. For information about the meaning
of the terms Recent and Unseen, see the next speed tip and the Terminology
section below.color-style = Set Rule Values --- ---------------------- (*) no-color ( ) use-termdef ( ) force-ansi-8color ( ) force-ansi-16color ( ) force-xterm-256color (256 colors available only in Alpine)
alias reallyslowpine "pine -assume-slow-link -color-style=no-color"If your connection is medium slow, e.g. between 28 and 56 kilobits/second (kbps), you might want to use this:
alias slowpine "pine -color-style=no-color"Tip: If you like
slowpine, you might like slowfood
and other “Slow”
movements.Waited X seconds for server reply. Still Waiting... MAIL FOLDER "foo" CLOSED DUE TO ACCESS ERRORyou may be able to solve the problem by setting
max-remote-connections
to be less than the default, which is 2, e.g.:
max-remote-connections = 0
^
or 1
Another possible way to solve this problem is to use mailchecks to keep
all your IMAP connections alive. For details, see speed
tip #21, which is about mail-check-interval, and speed tip #22,
which is about the quell-mailchecks-composing-* features,
above. inbox-path), and any stay-open folder (discussed below)
independent of the value of max-remote-connections. For
details, see max-remote-connections
in the Pine Technical Notes. Message is Recent? = Set Choose One --- -------------------- ( ) Don't care, always matches (*) Yes ( ) NoThis is especially useful for speeding up filtering, scoring, and index-coloring in a newsgroup that has tens of thousands of unexpired messages. For examples of such newsgroups, see the list of gmane.linux.debian.* newsgroups, especially gmane.linux.debian.user, which has over 300,000 messages! Note that being able to specify the Recent status in a rule condition was introduced in Pine 4.50, which was released 20 November 2002. For more information about the meaning of the terms Recent, Seen, and Unseen, see the Terminology section below.
Many of the General Speed Tips above are relevant
to both IMAP and NNTP messaging. The last two above, #30 and #31, are
especially useful for news reading. The tips in this section are relevant
only to NNTP messaging.
news-post-without-validation in your feature list
(this is one of my 27 favorite settings that I suggest in step
6B). This will prevent Pine from fetching the (often very large)
ACTIVE file from your NNTP server(s) each time you compose a news message.news-deletes-across-groups can make Pine very
slow when you leave a newsgroup so I recommend not setting this.news-offers-catchup-on-closecontinue-tab-without-confirm, enable-cruise-mode,
tab-visits-next-new-message-only, and news-read-in-newsrc-order.
If you have set news-offers-catchup-on-close (see previous
tip), you can press TAB immediately followed by Y
or N to quickly move beyond Pine's asking you if you want
to delete all undeleted messages in the group. nntp-range variable is ignored
if you access news over IMAP. More NNTP-related tips are in Miscellaneous NNTP Tips & Incoming-Folders Tips below, and in General Speed Tips above.
tab-checks-recent or
the folder-reopen-rule
Since Pine is primarily an IMAP client, it uses the following IMAP terminology: A message is ...
Note: Pine and many other clients use READ
as a synonym for SEEN, but the word “READ” is misleading because
a message body that has been SEEN has not necessarily been read.
With most mail and news clients a user can easily change the status of a message from SEEN back to UNSEEN (aka from READ back to UNREAD). For example in Pine, you can do this using the Flag command (*). However, the only way to change the status of a message from NOT RECENT to RECENT is to move it to another IMAP mailbox and then it will be considered RECENT there.
Beware: The term NEW is not well defined and has different meanings in different mail clients. For example, in SeaMonkey Suite and Thunderbird, the term “New” usually means “Recent & Unseen.” In Mulberry a user can go to Preferences > Mailbox > Advanced and specify whether “New Messages”:
( ) are Unseen ( ) are Recent ( ) are Recent and Unseen
In Pine, the meaning of “New” depends on the
Because of these ambiguities, I try to avoid the term “New” when discussing the status of a message.
![]() |
Tip |
For more about message status, flags, and labels, see:
For more about terminology, see Terminology and Typographic Conventions Used in This Article above.
When a message arrives in . . .
inbox-path and is a “stay-open
mailbox”; orstay-open-folders
variable,. . . a description of the newly arrived message is displayed in the Pine status
line. Also, if you are running Pine in an X terminal or if you are using
PC-Pine, the Pine icon will indicate that a new message has arrived. Pine
checks these mailboxes at least every mail-check-interval
seconds.
If you are eagerly awaiting the delivery of a message to a stay-open mailbox or to the currently open IMAP mailbox and you don't want to wait for Pine to do a mail check, you can force a mail check by doing one of the following:
Note:
The commands in #3 and #4 do not work if the folder index is sorted by one of the Reverse sort keys, for example they do not work if
. Starting with Alpine 0.9999+, you can use UP ARROW on the top message to do a mail check.
| Mail- Check Notes |
|
To be able to check for recent messages in a newsgroup, POP box, read-only box, or unopened IMAP box, set the following on the Pine SETUP CONFIGURATION screen.
To learn how these options work, read the relevant Pine Help files, either at the above two links or by typing ^G on the Pine SETUP CONFIGURATION screen.
An alternate way to check these type of boxes for recent messages is to Use Pine's Built-In Fetch (#move) Ability, which is available in Pine 4.55+.
If you are using a version of Pine that does not have these features (Pine 4.53 or earlier), you can close and re-open a mailbox by using Terry Gray's wacky workaround.
You can use Pine's aggregate operations on a folder collection to select folders that contain RECENT messages. To do this, type ML to go to the FOLDER LIST and move your cursor to the folder collection that you are interested in. If the collection is not expanded, expand it by pressing ENTER. Next type
;Pto select based on Properties. Pine will display this prompt:
Select by which folder property ? ? Help U Unseen msgs C msg Count ^C Cancel N [New msgs]
To select folders that contain RECENT messages, type N. You can then use Z to zoom in on or zoom out from the selected folders.
| Aggregate- Operations Tip |
For more examples of and discussion about Pine's aggregate operations,
see:
|
Another way to check for RECENT messages (and to do a lot more) is to
use Pine's Incoming-Folders collection. This pseudo or virtual collection is a list
of nicknames to POP, IMAP, NNTP, and local folders. You can think of this
collection as your Pine Shortcuts or Aliases
or Pointers
or Bookmarks
or Favorites or Daily Reads
or (Soft) Links.
Do not be fooled by the word
incoming; your Pine incoming-folders list is a collection
of any folders — whether they receive incoming messages or
not — that you want to be easily accessible.
Pine's incoming-folders variable allows you to:
enable-incoming-folders, Pine is able
to access at most one POP or IMAP default INBOX — the one
specified in your Pine inbox-path variable.
To learn more about this aspect of Pine and my suggestions for changing
it, see my Pine
Wish: List the Relevant INBOX in every IMAP FOLDER LIST on the
All About Pine page.
(Note that this has been fixed in Alpine.)
pine -c1 -if nickname-) or underscore (_) so they
will appear near the top of a by-name sort. enable-fast-recent-test feature. For example, since
I access some
IMAP servers that do not work with enable-fast-recent-test,
I unset both of the following features (which is the default for
each of these):
[ ] tab-uses-unseen-for-next-folder : [ ] enable-fast-recent-test
To be able to use incoming folders and the above incoming-folders features, do the following.
[X] enable-incoming-foldersIn order for this setting to take effect, you must quit Pine.
incoming-folders
variable.incoming-folders list variable. Important:
To be able to see the Normally hidden configuration options,
you need to set expose-hidden-config, which is
one of my favorite feature settings. /), dot (.), or backslash (\);
the delimiter on an NNTP server is usually dot (.).
If you are adding the default INBOX on an IMAP or POP
server, type INBOX at the Folder prompt.
(Note that the string INBOX has a special meaning
to an IMAP or POP server and the server will tranlate the string
INBOX to a particular user's default INBOX
on the server.)
To learn more about incoming folders, see:
If you have access to the Pine source code and a compiler, Eduardo Chappa
has created a
patch
that will make Pine
notify you automatically of new mail in incoming folders.
Incoming- |
|
If there is a server specification fragment that you use repeatedly in your
pinerc, you may want to store it in an environment variable.
The advantages of doing this are that:
For example, I put the following in my ~/.tcshrc:
setenv IMAPFO "{mail.freeshell.org/user=UID/ssl}"
setenv IMAPFM "{mail.messagingengine.com/user=UID@fastmail.fm/ssl}INBOX"
setenv NEWSGO "{news.gmane.org/nntp}#news"
setenv NEWSUN "{my.usenet.server/nntp}#news"
And then I reference these in the inbox-path, incoming-folders,
folder-collections, and news-collections
variables in my pinerc. For example, in my incoming-folders
list, I reference these environment variables like this:
incoming-folders=INHERIT, fo-inbox ${IMAPFO}INBOX, nickname2 ${IMAPFO}mail/mailbox/name, fm-inbox ${IMAPFM}, nickname4 ${IMAPFM}.mailbox.name, nickname5 ${NEWSGO}.newsgroup.name, nickname6 ${NEWSUN}.newsgroup.name, etc.
Note that the hierarchy delimiter is forward slash (/) on the
freeshell.org server and dot (.)
on the other servers in this example. Also note that some servers, for example
MS Exchange and IBM Lotus, use backslach (\) as the hierarchy
delimiter.
I chose these environment variables so that they can be used in collection specifications and in incoming-folders (including news-over-IMAP and #move folders) specifications. For example, here is how I reference these environment variables in my folder-collections list:
folder-collections=nickname1 ${IMAPFM}.[],
nickname2 ${IMAPFO}mail/[],
nickname3 ${NEWSGO}.[],
nickname4 ${NEWSUN}.[],
etc.
These environment variables can be used by any tool that uses c-client-style
folder syntax, for example, they can be used by mailutil, which is discussed below. They are also
useful in shell aliases and scripts that launch Pine on a particular folder,
for example, I have the following in my ~/.tcshrc:
alias p2 'pine -if "${IMAPFM}.2do"'
alias pcmp 'pine -if "${NEWSUN}.comp.mail.pine"'
If you create aliases like these, make sure you surround the folder specification
with double quotes (") so that the shell does not try to
interpret the squiggly braces that are in the expansion of the IMAPFM
or NEWSUN environment variables.
For details about using environment variables in Pine, including why
it might seem that I have double curly braces in the above specifications,
see Using
Environment Variables at the UW Pine Information Center.
|
Environment Variable Tips |
|
If you access multiple incoming folders, possibly on multiple IMAP servers, you may want to use a separate mail-checking program to notify you about recent messages.
One possibility is the command-line tool mailutil, which
is part of the Pine package and is discussed in Using mailutil
below.
Another possibility is Mulberry. I often run Mulberry along with Pine, simply for its powerful and customizable monitoring of mailboxes and mailbox-specific alerts.
More possibilities are on the pages that are listed in the next section.
For more about checking for recent messages, see:
If more than one person uses Pine on a PC, the primary user of the machine
can run pine.exe and use the pinerc and other
user files it finds when it walks through steps 2, 3, and 4 listed in
How Pine Finds User Files above. A second
(non-primary) user can put her user files in her own Pine directory and
then start Pine using the -p command-line argument. For example,
when I share a machine with someone I keep my Pine user files in C:\Nancy\Pine
and I start Pine by running
C:\Progra~1\Pine\pine.exe -p C:\Nancy\Pine\pinerc
or by running a shortcut to this command. In
order for password(s) used in this invocation of Pine to be stored in
this directory, you need to create a blank text document named pine.pwd
in this directory (for details about creating this file see step
4 above). Most of your other user files will also be stored in this
directory. An exception is the user dictionary, which is stored either
in the directory that pine.exe is in or, if the USER_DICTIONARY
environment variable (which is discussed above)
is defined, it is stored there. The built-in and user dictionaries are
shared by all PC-Pine users on the machine.
| Tip | Pine settings that are common to all users on the system can be
put in a system-wide configuration file. This can be specified using
the MS-Windows PINECONF environment variable, which I discuss in step
2E above, or by using the -P command-line argument.
For lots of information about this, see Compartmentalizing
and Sharing Your Pine Configuration. |
| Note |
If you are the only user of Pine on your PC, you probably do not
need to maintain multiple pinerc files. Instead you can:
If you use more than one Internet Access Provider to connect to the Net, you can follow the instructions in the next section to change your SMTP and NNTP servers for your connections. |
News
|
Pine uses your smtp-server to send email messages and your
nntp-server to send news messages. Most people set these
to the servers provided by their Internet access provider. If you want
to either
the sections below will give you ideas for how to do this.
In the old days, people set their Pine nntp-server variable to be their Internet Access Provider's NNTP server and used this to read and post to Usenet newsgroups, e.g. comp.mail.pine, and the providers newsgroups, e.g., best.general. If you want to read newsgroups on more than one NNTP server, you need to specify all of them in Pines' news-collections list variable. For example, here are some NNTP servers that contain newsgroups that I read:
news-collections={primary.isp.com/nntp}#news.[],
{alternate.isp.com/nntp}#news.[],
{news.gmane.org/nntp}#news.[],
{freenews.genecast.com/nntp}#news.[],
{forums.macromedia.com/nntp}#news.[],
{msnews.microsoft.com/nntp}#news.[],
{news.mozilla.org/nntp}#news.[],
{oldnews.mozilla.org/nntp}#news.[],
{secnews.netscape.com/nntp/ssl/novalidate-cert}#news.[]
If you want to post to a group, you need to also follow the instructions in one of the following sections.
Tip 1: After you specify a news server in your news-collections list, you need to subscribe to the newsgroups that you want to read on that server. How to do this is discussed in Miscellaneous NNTP Tips below.
Tip 2: Lots more NNTP servers are listed on Nyx Net's page about Specialized Public NNTP News Servers.
In Pine 4.56+, you can have Pine automatically use the currently open NNTP server as the outgoing (posting) NNTP server. To enable this, set this feature.
[X] predict-nntp-server
If this feature is set, you do not need to list your outgoing NNTP servers in the nntp-server variable, which is discussed in the next two sections. Instead, Pine will post an NNTP message to the currently open NNTP server (if an NNTP server is currently open).
Another option, which was also introduced in Pine 4.56 and is what
I recommend, is to specify your nntp-server variable
in the "public" (non personal) Pine
Role that you use for public posting.
As I discuss in Reading From Multiple NNTP Servers
above, you use the news-collections variable to list the
NNTP servers from which you read newsgroups. To post to
these NNTP servers, you need to either set predict-nntp-server,
which is discussed in the previous section, or list them in the nntp-server
variable. For example, to be able to post to the NNTP servers listed above,
use this setting:
nntp-server=primary.isp.com,
alternate.isp.com,
news.gmane.org,
forums.macromedia.com,
msnews.microsoft.com,
news.mozilla.org,
oldnews.mozilla.org,
secnews.netscape.com/ssl/novalidate-cert
When you compose and initiate the sending of a news message with ^X, Pine steps through the your nntp-server list until it finds one that it can use to post to the newsgroup(s) you have specified in the Newsgroups header of the message you are sending.
| Notes |
|
If you are using Pine 4.21 or earlier, the nntp-server
variable, which is used for posting, can be set to at most one NNTP server.
To post to an NNTP server that is different from the one that is specified
in your pinerc, you can create a Pine shortcut that
sets the nntp-server on the command line. For example, when I want to
participate in that is, both post to and read
newsgroups on the Gmane NNTP server, I start Pine with this command:
pine -nntp-server=news.gmane.org
You can restrict the newsgroup names that are displayed on a server's FOLDER LIST screen by specifying a View. For example, in the last seven news-collections below I have specified a View (the part inside the square brackets) that will list only the newsgroups that I read on the corresponding server:
news-collections={primary.isp.com/nntp}#news.[],
{alternate.isp.com/nntp}#news.[],
{news.gmane.org/nntp}#news.[gmane.*],
{freenews.genecast.com/nntp}#news.[weblog.*],
{forums.macromedia.com/nntp}#news.[macromedia.*],
{msnews.microsoft.com/nntp}#news.[microsoft.*],
{news.mozilla.org/nntp}#news.[mozilla.*]
{oldnews.mozilla.org/nntp}#news.[netscape.public.*]
{secnews.netscape.com/nntp/ssl/novalidate-cert}#news.[netscape.mozilla.*]
Since I use the first two news collections to access all standard
Usenet newsgroup hierarchies comp.*, news.*, sci.*, rec.*, etc.
I do not restrict these views and thus I see all newsgroups that
are listed in my newsrc when I'm viewing the FOLDER LIST screen of either
of those news collections (this includes the macromedia.*, newsrc so that newsgroups that are not standard
Usenet newsgroups are at the bottom of my newsrc and set news-read-in-newsrc-order
in my Pine Config.
For more about Pine Views, see the Collection Tips above.
Tip: If you use multiple newsrcs, which is discussed in the next two sections and is what I recommend, you probably won't need to use any of the above example Views. This is because, for example, all the (non control) newsgroups on news.mozilla.org are named mozilla.something and the Pine FOLDER LIST will list only mozilla.* newsgroups in any case.
If you are using Pine 4.56 or later and if you would like the newsrc name to reflect the name of the news (NNTP) server, set the following in your feature-list.
[X] enable-multiple-newsrcs
Since it is generally useful to have the name of the news server as part of the newsrc file name, I recommend that you set this whether you access one or multiple news servers. This is one of the 27 feature settings that I recommend in Step 6B above.
If you set this feature, I recommend that you also do the following.
[X] mult-newsrc-hostnames-as-typed
newsrc-path to something
like this:
newsrc-path=${HOME}/Newsrc/newsrc ^^^^^^^^^^^^^^ ^^^^^^ DirectoryName PrefixOfNewsrcNameWith this setting, the newsrc file name for a news server named
news.server.name
will be:
${HOME}/Newsrc/newsrc-news.server.name
and the previous version of this newsrc will be:
${HOME}/Newsrc/newsrc-news.server.name.old
You can of course use any newsrc prefix name (newsrc
in this example) and any directory. For example, you could set the prefix name to rc
and the directory to News.
newsrc-path to an absolute path rather
than a relative path. If you use a relative path, you can have unexpected
results if the feature use-current-dir
is set or if newsrc-path is set in an IMAP-accessible
pinerc.newsrc-path,
use the string ${HOME} rather than the string $HOME
or ~ (tilde). ${HOME} is more likely to
work on all systems that use this pinerc (for example, if newsrc-path
is set in an IMAP-accessible
pinerc).~/Newsrc
in this example) exists and that it is a directory.
~/.newsrc
(which is the default newsrc name for Unix-like Pines) copy it to newsrc-path
using, e.g., a command like this:
cp -i ~/.newsrc ~/Newsrc/newsrc
^^^^^^^^^^^^^^^
your Pine newsrc-path value
Pine will use the file that is specified by your newsrc-path
variable — if it exists — as the starter file for a
new
To use more than one newsrc in Pine 4.55 or earlier, you need to specify
the nntp-server and newsrc-path on the command
line like this
pine -nntp-server=news.gmane.org -newsrc-path=newsrc-gmane
You can set up an alias (shortcut) for the above command and start Pine by using it whenever you want to read those newsgroups.
An alternative is to put the nntp-server and newsrc-path
in a configuration exception file and start Pine using something
like this:
pine -x pinerc-gmane
I discuss the -x (and -P and -p)
command-line arguments in the section Changing
Both Your SMTP and NNTP Servers below, and on a separate page called
Compartmentalizing
and Sharing Your Pine Configuration.
Other options for pre-Pine 4.56 users are:
enable-multiple-newsrcs
feature (see previous section)newsrcs
on different IMAP servers -- more about this in the next section
Starting with version
4.00, Pine can be set up to use an IMAP-to-NNTP proxy to store your
newsrc on a UW-IMAP server. I discuss this — including
how to set it up — in the comp.mail.pine message Re:
Multiple newsservers, multiple newsrcs?
Doing this has the following advantages.
newsrc is stored on an IMAP server, it can
be used from Pine running on any system and you won't see news messages
that you have already “deleted.”newsrc for each news server that you access on a different
UW-IMAP account (and one could be stored locally of course). This
newsrc
if you read the same newsgroup with the same instance of Pine,
but on multiple news servers. A disadvantage of using an IMAP-to-NNTP proxy is that it can be slower and more vulnerable to disconnections because a connection is made first from your system to the IMAP server and then from the IMAP server to the NNTP server.
| News- Over- IMAP Tips |
|
| Type this | To do this | ||
| M | Go to the Pine Main Menu | ||
| L | Go to your Pine Folder List | ||
| (arrow keys) | Move to a news collection | ||
| A | Add group(s) | ||
| ^T | To list all groups | ||
| L | List mode | ||
| X | Select group(s) | ||
| S | Subscribe to selected group(s) |
/user=LoginName
after every occurrence of the server name in your pinerc. For example:
nntp-server=news.isp.com/user=LoginName
news-collections={news.isp.com/user=LoginName/nntp}#news.[]
/ssl for a server,
do it for every occurrence of the server name in your pinerc. For example:
nntp-server=secnews.netscape.com/ssl/novalidate-cert
news-collections={secnews.netscape.com/nntp/ssl/novalidate-cert}#news.[]
[ ] news-deletes-across-groups [X] news-offers-catchup-on-close [X] news-post-without-validationI discuss these three feature-list settings and more NNTP speed tips in Speeding Up Pine above.
thread.
[X] news-read-in-newsrc-orderIf
news-read-in-newsrc-order is not set, ASCII (alphabetical)
order is used. If this feature is set, which is what I prefer, the order
in which the newsgroups appear in your newsrc file is used.
You can reorder your newsgroups by directly editing your newsrc
file using a text editor, such as pico -w or vim.
incoming-folders
list. Details are in Using the Incoming-Folders
Collection (Pine Shortcuts) above.
Many Internet Access Providers (IAPs) let only their customers (i.e., users who are either dialed into their system or connected via a LAN, WAN, or DSL) use their SMTP and NNTP servers to send messages. If you have more than one IAP that you connect to from your PC, you may need to change your SMTP and NNTP settings each time you change which IAP you are connected to.
| News: Starting with Pine 4.50 you can specify a list of SMTP servers in a role. |
You can list all the SMTP servers that you use in your smtp-server
variable setting like this:
smtp-server=smtp.isp1.com,
smtp.isp2.com,
smtp.isp3.com
Pine will try each SMTP server until it finds one that works. A disadvantage of this method is that if the first one doesn't work, you will experience a delay while Pine checks the others in the list. If you don't want to wait for the delay you can either start Pine with a command-line argument like this:
pine -smtp-server=smtp.isp3.com
Or you can compartmentalize your pinerc settings and start Pine using
the -P, -p, and -x command-line
arguments. I describe this in the next section, Changing
Both Your SMTP and NNTP Servers, and in a separate page called Compartmentalizing
and Sharing Your Pine Configuration.
| Note | The smtp-server variable is a list variable,
which means it can be set to a list of values. Before Pine 4.30,
the nntp-server variable, which I discuss above,
was not a list variable and could be set to at most one value. Starting
with Pine 4.30, the nntp-server is also a list variable.
|
News
|
If you want to temporarily change your smtp-server, your
nntp-server, and your newsrc-path, you could
do it all on the command line like this:
pine -smtp-server=smtp.isp2.com -nntp-server=nntp.isp2.com -newsrc-path=newsrc-isp2
When I want to set a lot of variables on the command line (as in this
example), I prefer to use the Pine command-line arguments -P,
-p, and -x to specify two or three pinerc
files. The -P argument specifies a pinerc file that contains
generic settings and the -p and -x arguments
specify pinerc files that contain user (easily changeable)
settings, i.e., settings that can be changed by MSC
(Main > Setup > Config) or MSXC
(Main > Setup > eXceptions > Config).
One reason I prefer using -P, -p, and -x
to putting all the settings on the command line in a Windows shortcut
is that it is easier to edit a file than a Windows shortcuts with its
tiny text box.
One way to set this up is to put your ISP-specific settings in files named pinerc-ispn.
For example,pinerc-isp1 would contain this:
smtp-server=smtp.isp1.com nntp-server=nntp.isp1.com newsrc-path=C:\MyHome\Pine\newsrc-isp1
And pinerc-isp2 would contain this:
smtp-server=smtp.isp2.com nntp-server=nntp.isp2.com newsrc-path=C:\MyHome\Pine\newsrc-isp2
And your pinerc file would have these variables unset:
smtp-server= nntp-server= newsrc-path=
Then when you are connected to ispn, start Pine with
C:\Progra~1\Pine\pine.exe -x C:\MyHome\Pine\pinerc-ispn
Or if you are using Pine 4.21 or earlier, use this
C:\Progra~1\Pine\pine.exe -P C:\MyHome\Pine\pinerc -p C:\MyHome\Pine\pinerc-ispn
To avoid typing these long commands, set up shortcuts
on your desktop or start menu.
| Notes |
|
When you view a message with Pine, you have the choice of leaving it in the folder it's already in or saving it to a folder on an IMAP server or a folder on your local file system. In order to have all three of these choices, you need to set up both local and remote folder collections, which I describe in Step 7 above. To move some or all messages in a mailbox, you can do one of the following.
To move a mailbox to another location on the system it is currently
on, you can use the Rename command. For example, to move a mailbox named
_done to a subdirectory named Archive, 1)
Type L to go to the FOLDER LIST screen; 2) Select the _done
mailbox; 3) Type R (for Rename) and specify something like
this:
Rename folder to : Archive/_done-2007
^
Use the appropriate hierarchy delimiter; usually slash (/), dot (.) or backslash (\)
Important: The path (Archive/ in this example) must be either empty (null) or point to a (possibly non-existent) subdirectory of the current directory. If a subdirectory does not exist, Pine will create it. If the target mailbox (_done-2007 in this example) already exists, Pine will not do the move.
Note: If you use the Rename command in the Incoming-Folders virtual collection, it does not move a folder, but instead renames the incoming-folder's nickname.
To use Pine's aggregate operations to select and move all messages in a mailbox, first set enable-aggregate-command-set in your pinerc, then open the mailbox, view its index, and type:
; A A S
which means ;select All Apply Save; then type:
^R ^N mailbox-name ^ ^ | | | +---- 0 or more [steps through Next Collections] +---- 0 or 1 [toggles between SAVE (and delete) and SAVE (no delete)]
where you type
^R if you want to change whether a copy or move is performed
and you type
^N (Next Collection) zero or more times
until you get to the appropriate collection. If you need to set
up a collection, see Setting Up IMAP, NNTP, and Local Collections above.
If you want to move the messages to your default INBOX (the mailbox
specified by inbox-path), you do not need to type ^N
to specify the collection where your primary INBOX resides. Instead,
you can type the following from anywhere (and the case
of the string INBOX does not matter):
; A A S inbox
Note that the target of a save command must be either IMAP accessible
or on your local file system; it is not possible to move messages to
an NNTP or POP folder. Also note that Runbox.com
and AOL
do not let users move messages to the INBOX even though
INBOX is an IMAP-accessible mailbox.
For more examples of and discussion about Pine's aggregate operations, see:
Starting with version 4.55, which was released 2003 April 16, Pine has the built-in ability to automatically fetch or snarf all messages in a folder — called a “maildrop folder” in this context — and move them to another folder. Before Pine 4.55, a Pine user needed to either use a Pine filter or an external program, such as getmail or fetchmail, to do this.
A Pine #move folder is specified in the pinerc file by
using the move namespace
prefix (#move) followed by a delimiter, followed
by the maildrop folder's specification, followed by the
same delimiter, followed by the destination folder's
specification. For example, if your default INBOX (inbox-path)
is a #move folder, your pinerc file will contain a line like this:
inbox-path="#move!MaildropFolder!DestinationFolder"
^ ^ ^ ^
: : : :
: :...delimiter..: :
: :
:..quotes don't hurt & sometimes help..:
Here is a diagram that illustrates how a Pine “#move folder” works:
+---------------------+
| Maildrop Folder |
| |
+---------------------+
||
|| periodic fetch
\/
+---------------------+
| Destination Folder |
| |
+---------------------+
||
|| local or IMAP access
||
+---------------------+
| PINE 4.55+ |
+---------------------+
| |
| your view of the |
| “#move folder” |
| |
+---------------------+
The maildrop folder can be any type of folder that Pine supports (POP,
IMAP, NNTP, or local) and the destination folder can be either a local
or an IMAP folder. A #move folder is especially useful for fetching
messages from a POP or NNTP folder because
When you set up a POP or NNTP folder as a #move folder, you get automatic recent-message checking, you get these messages into a folder that supports flags & other metadata, and for a POP folder, you get the messages off the POP server.
To set up a #move folder, either use
the Pine Setup screens, which is described on Eduardo Chappa's site,
or directly edit your pinerc file (using, for example,
"#move!MaildropFolder!DestinationFolder"
I use bang (!)
as the #move delimiter, but you can you use any character
that does not occur in the rest of the specification as the delimiter.
For example, if you want your default Pine INBOX to be a #move folder that fetches a newsgroup's messages and moves them to a folder in your local folder collection, it will look like this in your pinerc:
inbox-path="#move!{usenet.server/nntp}comp.mail.pine!Msgs/comp-mail-pine"
^^^^^^^^^^^^^^^^^^^
relative to local $HOME
make sure it exists!
To specify more than one #move folder, you need to use Pine's incoming-folders variable. For example, here is an incoming-folders variable setting that contains a couple #move folders:
incoming-folders=INHERIT, : : fetch-cmp "#move!{usenet.server/nntp}comp.mail.pine!Msgs/comp-mail-pine", nickname "#move!MaildropFolder!DestinationFolder", : :
This fetch-cmp #move folder moves all “undeleted”
messages in the comp.mail.pine
Usenet newsgroup to a destination mailbox named comp-mail-pine
in the $HOME/Msgs directory of the local system. Alternatively,
you could move these messages to a destination mailbox on an IMAP server,
an example of which is in the next section, POPping Gmail is Different.
To learn more about #move folders, see:
| #move Tips |
|
On 10 November 2004 Google started letting their users use POP (Post Office
Protocol) to access their Gmail
messages. After a lot of experiments, I have decided to use a #move
folder, which is discussed in the previous section, to fetch a copy of my Gmail messages.
Rather than fetch them to my local system, I fetch them to my two-gigabyte
IMAP store at FastMail.FM
by using a specification like this in my incoming-folders list:
If you would rather fetch your Gmail messages to a local mailbox rather than a remote IMAP mailbox, use a specification like this:
fetch-gmail "#move!{pop.gmail.com/pop3/ssl/user=UID@gmail.com}INBOX!Msgs/fetched-gmail",
^^^^^^^^^^^^^^^^^^^
relative to local $HOME
make sure it exists!
In either case, make sure the destination folder, fetched-gmail,
exists! For more #move tips and examples of #move folder specifications,
see the previous section, Using Pine's Built-In
Fetch (#move) Ability.
The following are five ways in which Gmail is different from other POP service providers.
Enable POP for all mail (even mail that's already been downloaded)
| Gmail Tips |
|
Starting with version 4.20, Pine has built-in filters that you can use
to delete messages, move messages, or change the keywords or status flags of messages. To create
a Pine filter, type MSRFA
(Main > Setup > Rules > Filters >
Add). To learn about Pine filters, see:
| Filter Tips |
|
Pine can be set up to automatically rename some mailboxes in your primary folder collection at the beginning of each month. The following Pine variables are used to set this up:
default-fcc (which, in Pine's default configuration, is a "pruned folder") pruned-folders (available in Pine 3.92+) pruning-rule (available in Pine 4.30+) read-message-folder
In order for pruning to work, a
For example, set your default-fcc to simply sent-mail
rather than the fully qualified {my.default.server/user=MyUID}mail/sent-mail.
To force a pruning at some time other than the beginning of the month,
set the hidden variable last-time-prune-questioned
so that the year field is a number before the current year. For example,
if the current year is 2005, set the year field to anything less than
105. One way to do this is to run something like the following
on the command line:
pine -last-time-prune-questioned=100.1
Note that 100.1 means year 2000, month
1. The year field is specified as the number of years since 1900, which
is the Pine epoch.
Starting with Pine 4.61, you have the option of setting this feature:
[X] prune-uses-yyyy-mm
This will make Pine use a purely numeric date as the pruned mailbox name extension. This is especially useful when doing an ASCII sort of a list of mailbox names.
| Pruning Tips |
|
You can have Pine automatically move the read (seen) messages in a folder to another folder
by using the incoming-archive-folders
variable (and read-message-folder
for your primary INBOX) to associate an incoming folder with its corresponding
archive folder. In a pinerc file, incoming-archive-folders pairs look
like this:
incoming-archive-folders=folder1 archive-folder1,
folder2 archive-folder2,
: :
folderN archive-folderN
The first part of the pair, e.g. folderN, can be either
an incoming-folder nickname (discussed above) or a fully qualified folder specification
(discussed in Step 7F above and in Server
Name Syntax at the UW PIC). The second part of the pair, e.g.
archive-folderN, can be either a name relative to your Pine
primary collection or a fully qualified folder specification.
If the feature auto-move-read-msgs
is not set, Pine will ask if you want the move to be performed;
otherwise the move will happen without any prompting. Note that this moves
only read (seen) messages and not the entire mailbox (unless all messages
have been marked read). If you want all messages both read
and unread to be moved, use a move folder or use a filter.
Tip 1: If you want your archive folders to be in a subdirectory of your primary collection, use pairs that look like this:
folderN Archive/folderN-2007
^
hierarchy delimeter is usually slash (/), dot (.), or backslash (\)
Make sure that the subdirectory, e.g. Archive, exists in your
Pine primary collection!Tip 2: To avoid problems when (if) you change your Pine primary collection, you may want to use a fully qualified folder specification to specify the second part (the archive folder) of an incoming-archive-folders pair. This way your archive folders will not depend on the way folder-collections list is ordered (the first in this list is considered your primary collection).
See Also: To learn about Pine incoming folders, which are
related to incoming-archive-folders, see Using the Incoming-Folders Collection (Pine Shortcuts)
above.
Sometimes it is faster to transfer a mailbox (or mailboxes) using SFTP, FTP over SSH2, FTPS (FTP over SSL/TLS), or FTP. What I usually do is move the mailboxes that I want to transfer into a directory named something like Tmp4Transfer and then get the folders using an FTP client on my local computer. The key is to do a binary, not an ascii, transfer. The following folder formats work in both PC-Pine and Unix Pine:
So if you use any of these folder formats and are using the latest Pine (4.64), you should not have any problem transferring these folders from Unix to Windows, or vice versa, and using Unix Pine or PC-Pine to process them (as long as you do a binary transfer).
Three advantages of first moving the folder(s) into a directory named Tmp4Transfer are 1) you'll know what folders you've downloaded; 2) if a folder is an incoming folder, you won't have to wonder which messages got downloaded and which messages arrived during or after your download; and, most importantly, 3) if a folder is an incoming folder, you don't need to worry about it being corrupted if messages are delivered to it while it is being FTP'd.
Note |
|
To have Pine automatically fetch the messages that are in your default
incoming mail spool and move them to a mailbox named mbox,
you can use the mbox driver. The mbox driver is invoked if a file named
mbox exists in your $HOME directory and if it is either empty
or in traditional Unix spool (mbox) mailbox format. To find out more about
the mbox driver, see:
To disable the mbox driver (which is what I do), do both of the following.
mbox so it no longer exists in your $HOME
directory. Also see Tip D below. (*)disable-these-drivers=mboxIf you want to disable more than one driver, separate them with comma (
,)
followed by newline
followed by whitespace. For example:
disable-these-drivers=mbox, maildir, mdThis is a hidden variable so you need to directly edit your pinerc file using, for example,
vim or pico -w. Alternatively,
you could set Pine's expose-hidden-config feature, which
is one of my favorite Pine settings, and then edit this
(and other hidden variables and features) from the Pine SETUP CONFIGURATION
screen. | mbox Driver Tips |
|
mailutilmailutil, which is described here,
is a command-line tool that is distributed with Pine 4.50+ and with the
UW (University of Wasington)
IMAP software 2002+. It
For example, to copy all mailboxes from the default IMAP home of an old IMAP server to the default IMAP home of a new IMAP server, you might use a command like this.
mailutil transfer -merge append "{old.imap.server/user=UID/tls}" "{new.imap.server/user=UID/tls}"
To copy all mailboxes from the default IMAP home of an old IMAP server
to a directory named Old on a new IMAP server, you might
use a command like this.
mailutil transfer -merge append "{old.imap.server/user=UID/tls}" "{new.imap.server/user=UID/tls}Old/"
^^^^
Important: Use the appropriate path and delimiter
If new.imap.server is a default Cyrus or Courier IMAP server,
the path will probably begin with INBOX and the delimiter
will probably be dot (.), e.g.:
mailutil transfer -merge append "{old.imap.server/user=UID/tls}" "{new.imap.server/user=UID/tls}INBOX.Old."
In any case, mailutil will create the Old directory
if it does not exist.
To copy all mailboxes from the default IMAP home of an IMAP server
to traditional Unix mbox formatted mailboxes in the $HOME
directory of your local system (the system on which mailutil is running),
you might use this:
mailutil transfer -merge append "{imap.server/user=UID/tls}" "#driver.unix/"
To copy all mailboxes from the default IMAP home of an IMAP server
to traditional Unix mbox formatted mailboxes in
$HOME/SubdirectoryOfHOME
mailutil transfer -merge append "{imap.server/user=UID/tls}" "#driver.unix/SubdirectoryOfHOME/"
To copy all mailboxes from the default IMAP home of an IMAP server to
traditional Unix mbox formatted mailboxes in /absolute/path/to/directory
mailutil transfer -merge append "{imap.server/user=UID/tls}" "#driver.unix//absolute/path/to/directory/"
^^
Note!
If you want the target mailbox to be in c-client
mix format rather than Unix mbox format, replace #driver.unix/
with #driver.mix/ in the above three examples.
To create a new mailbox in mix format in your local $HOME/Msgs
directory, use a command like this:
mailutil create #driver.mix/Msgs/example.mix
^^^^
optional extension that signifies mailbox format
You do not need an extension in the mailbox name, but I like to use an extension for mailboxes that are in a non-default mailbox format. To create a new mailbox in the default mailbox format, use a command like this:
mailutil create Msgs/example
The default mailbox format depends on the operating system and what version of mailutil you are using.
In all of the above examples, mailutil will prompt you for the passwords on the IMAP servers.
To learn more about mailutil, see:
For a reminder of the mailutil arguments, run mailutil without any arguments, e.g. run one of these:
mailutil /absolute/path/to/mailutil
Starting with mailutil version ~2006f, this command will also display the mailutil version number.
Note 1: To use mailutil on MS Windows, you need to
be using an updated MS Windows 98 or later, and you need to run mailutil
as a Windows command, not as a DOS command. Details are in the
2004-Nov-10 comp.mail.pine message Re:
How send password with mailutil? by Mark Crispin.
Note 2: As stated in the mailutil manual
page:
“mailutilreplaces the oldchkmail,imapcopy,imapmove,imapxfer,mbxcopy,mbxcreat, andmbxcvtprograms.”
chkmail and Co. were replaced by mailutil
in 2002.
Tip 1: To avoid problems with special characters,
such as octothorpe (#), left brace ({), &
right brace (}), surround folder specifications with quotation
marks and run mailutil commands from a Bourne shell. Examples of Bourne
shell scripts are in the sections Using a PASSFILE
with Unix and Mac Pine and Using a Shell Script
to Launch Pine above. The second of these includes an example of using
a continuation backslash to split a long line into multiple lines.
Tip 2: To prevent mailutil from trying to use
rsh or ssh to connect to a server, which often causes unnecessary slowdowns,
include the /norsh qualifier in the server specification.
Note that if a server specification includes the /tls or
/ssl qualifier, mailutil will not try to use rsh or ssh (so
you do not need to specify /norsh in these cases).
Tip 3: To make it easier to specify a server and all
its qualifiers as an argument of a mailutil command, you
might want to specify the server in an environment variable. Specifying
a server in an environment variables is also useful for setting up and
maintaining Pine configuration files and is discussed in Using Environment Variables to Specify Folders and
Collections above.
Question: When mailutil is used to snarf messages
from an NNTP server, is a .newsrc file used and, if so, what
is its location?
On the Infinite Ink All About Pine page in the section Syncing and Snarfing Mailboxes, I am collecting a list of tools that you can use to synchronize or snarf mailboxes. This list includes mailutil, which is discussed in the previous section, and a lot more.
Important: If you care about flags, keywords, and any other IMAP metadata, make sure that you use a tool that preserves these. Most tools that use the IMAP protocol -- for example UW's mailutil (discussed in previous section), Cone's mailtool, and Gilles Lamiral's imapsync -- will preserve IMAP metadata.
In the IMAP world, removing a message from a mailbox is a two-step process: 1) Mark the message for deletion and 2) Expunge. This means that one way to save your trash is to do step 1, but do not do step 2 (expunge) until you really want to throw out the trash. Starting with Pine 4.30, you can set the following feature:
[ Advanced User Preferences ]
:
[X] expunge-only-manually
And then when you are ready to expunge all messages that are marked
for deletion in a mailbox, type X (eXpunge).
To make your deleted messages less obtrusive, I suggest that you do one or both of the following
Another option for saving your trash is to set up a Pine filter (discussed above) to automatically move deleted messages
to a "Trash" or "Expunged" mailbox. This is described
in Can I have
my deleted messages go to a trash folder instead of being deleted?,
which is part of Gopi Sundaram's FAQ
for comp.mail.pine. Note that this type of filter might not work in Alpine.
Yet another option is to use Eduardo Chappa's Rules patch, which is discussed at Eduardo's Define your own rules and make pine flexible! and Patches for Pine.
| Warnings |
|
If you have a mailbox that was created by another client, use one of the following procedures to try to import it into Pine.
If you use Pine on multiple machines, you will probably want to keep your address book on an IMAP server so you can access it from anywhere. In order to use PC-Pine when you're off line and also to make a backup of your address book, you can periodically delete all the records in your local address book and then copy all the records from your IMAP-accessible address book to it. I automate this procedure by running Pine with the following initial-keystroke-list macro:
pine -I S,A,N,D,D,Y,E,A,CR,;,A,A,S,S,^N,CR,M,A,N,CR
To test this, start Pine and type the sequence of commands. Do not type the commas and press ENTER for CR (carriage return).
| Note | On some systems, you need to escape semicolon (;),
less than (<), and greater than (>)
with a backslash (\). For example:
pine -I S,A,N,D,D,Y,E,A,CR,\;,A,A,S,S,^N,CR,M,A,N,CR
^^
note!
You can sometimes avoid needing to escape special characters by running
the command from a Bourne shell script. Examples of Bourne shell scripts
are in Using a PASSFILE with Unix and Mac
Pine and Using a Shell Script to Launch Pine
above. |
| ¡Warning! | Do not use this until you have backed up both your remote and local address books and you have stepped through the commands by hand. This sequence of commands works only if your address books are configured the way mine are (and it is likely that yours are configured differently from mine!). |
Another example of an initial-keystroke macro is in the message Re: status of mails in sent-mail in comp.mail.pine.
The current release of Pine was not designed for disconnected or offline operations, but you can convince it to access only local folders & address books, and let you compose and postpone messages locally, by starting it with a command like this:
C:\Progra~1\Pine\pine.exe -p C:\MyHome\Pine\pinerc -x C:\MyHome\Pine\pinerc-disconnected
where pinerc is your regular pinerc file and pinerc-disconnected, which will override the settings in pinerc, contains something like this
## These can NOT be inherited from the -p pinerc personal-name=Nancy McGough user-id=nm last-version-used=4.64 window-position=77x25+0+0b last-time-prune-questioned=999.9 ## 999.9 means month 9 of year 2899 so it won't prompt you about pruning! ## These override settings in the -p pinerc inbox-path=C:\MyHome\Msgs\~BogusINBOX.cMBX address-book=abook-local ## Set smtp-server only if -p pinerc has it blank # smtp-server=bogus ## Set postponed-folder only if -p pinerc uses a remote folder # postponed-folder=C:\MyHome\Msgs\postponed
| Notes |
|
The next time you connect to the Net you can send the messages that are in your local postponed folder. If you do this regularly you will probably want your default pinerc to use a local folder for postponed messages. Another advantage of using a local folder for postponed messages is that it speeds up Pine because Pine does not need to access the IMAP server each time you compose a message to see if there are any postponed messages.
As I discussed above, you can avoid typing a long command by setting up a shortcut on your desktop or start menu.
Pine was designed to be an IMAP client so if you would like to take full advantage of all Pine's features, you'll want to store your messages on an IMAP server. If you can't convince your ISP to install an IMAP daemon, or if you can't switch to one of the ISPs that offers IMAP, you can set up Pine to access POP INBOXes.
To set up your primary INBOX to be accessed using POP, specify something like the following as your inbox-path.
inbox-path={your.pop.server/user=LoginName/pop3}INBOX
^^^^^
this is the key!
To set this, use Pine's configuration screen, which is described in step 5I above. Alternatively you could directly edit your pinerc file.
If you have more than one INBOX, you can list them in the incoming-folders variable in your pinerc like this:
incoming-folders=nickname1 {imap1.server/user=LoginName1}INBOX,
nickname2 {imap2.server/user=LoginName2}INBOX,
nickname3 {pop3.server/user=LoginName3/pop3}INBOX,
nickname4 {pop4.server/user=LoginName4/pop3}INBOX
The first two above are IMAP INBOXes and the second two are POP INBOXes.
When you view your Incoming-Folders in Pine using ML
(Main > Folder List), the INBOX specified in the inbox-path variable
is displayed in Pine as simply INBOX. All the INBOXes listed
in your incoming-folders variable are displayed in Pine as their nicknames.
Disadvantages of using POP rather than IMAP are that Pine does not tell you about recent messages that arrive while you are accessing a POP INBOX and message keywords (labels) & flags, such as New, Answered, and Important, are not remembered between sessions.
| Tips |
|
If you find a bug in Pine or the Pine documentation:
I prefer to publicly post bugs because that way other people will learn about the bug and know it has already been reported. Also, you and everyone reading the discussion group — both now and in the future — might learn that it's a feature rather than a bug!
Important: If you find a bug that could be exploited by a malicious attacker, report it privately to the Pine Team.
The first thing I do when I'm trying to figure out what's going on with
Pine is type MJ (Main > Journal) to look at the
To learn more about bugs and debugging in Pine, see:
-ddebug-level
and -dkeywords command-line arguments. For example
-d0 suppresses the creation of .pine-debug* files.
Newsgroups Header Lineinbox-path,
enable-incoming-folders, expose-hidden-config,
remote-abook-validity, and tcp-open-timeout,
take effect only after restarting Pine.INBOX matters,
so, if you are having problems accessing an INBOX, try using INBOX,
inbox, Inbox, and other combinations of upper-
and lower-case characters. /debug qualifier in that server's specification.
(I'm not sure what exactly this qualifier does, but I'm mentioning
it here so you (and I) know that it exists.)
(to be written: discuss the hidden variable debug-memory and the files ~/.pine-crash, .pine-debug[2,3,4], ~/.pine-interrupted-mail, pico.save, *.save, & pine.core)
Enjoy Pine and let me know if you have any suggestions for improving these instructions!
|
|
|
|
Power Pine: Getting the Most Out of Unix-, Mac- &
PC-Pine |
|