Pine-Exchange mini-HOWTO

Alexandru Roman <[email protected]>

v1.0, 2002-03-28

Revision History
Revision 1.02002-03-28Revised by: ar
Submitted to the LDP for publication.
Revision 0.32002-03-25Revised by: ar
Added the site-wide Pine Configuration information
Revision 0.22002-03-22Revised by: ar
Added Exchange v5.5 requirement, Pine v4.0 requirement, and Acknowledgements Section.
Revision 0.12002-03-21Revised by: ar
Submitted to the LPD community/listserv for review.

Table of Contents
1. Introduction
2. Requirements
3. Communication
4. Exchange Server Configuration
5. Pine Configuration
6. Example Configuration
6.1. Gather your information
6.2. Setting up a local ~/.pinerc configuration file
6.3. Setting up a site-wide Pine configuration
6.4. Logging into the Exchange/IMAP server
6.5. Accessing your Folders with IMAP
6.6. Accessing your Global Address List with LDAP
6.7. Sending an email with SMTP
7. Resources
8. Acknowledgements
9. Disclaimer
10. Copyright

1. Introduction

This HOWTO will provide you the required information on setting up Pine to connect seamlessly to an Exchange Server. The services include the following:

NOTE: This configuration will not allow you access locally created Exchange files (ie. .pst, .pab, etc)


2. Requirements

I assume if you are reading this HOWTO, you probably already meet the requirements, but here they are anyhow:


3. Communication

These are the protocols that will facilitate communication between the Pine client and the Exchange Server: IMAP, SMTP, and LDAP. (see Resources)


4. Exchange Server Configuration

Before starting to work on your Pine configuration, you must make sure that the Exchange Server is configured correctly. This is where your SysAdmin comes in to play. You need to make sure the IMAP, SMTP, and LDAP services are all running. These services could potentially be running on separate servers, so you need to consult your SysAdmin.

On Exchange Server 5.5, IMAP and LDAP are installed and running in the default installation. SMTP has to be installed separately, and comes in an add-on package called Microsoft Exchange Connector, specifically for sending mail on the Internet.

NOTE: You can manually check to see if these services are running by telneting to their respective ports. (ie. IMAP:143, SMTP:25, and LDAP:389)


5. Pine Configuration

Pine has three types of configuration files we will concern ourselves with. Each of them can contain all the same settings, but with varied syntax. The decreasing order of precedence for each setting is as follows: /etc/pine.conf.fixed, ~/.pinerc, and /etc/pine.conf. Basically this means if Pine is looking for a specific setting it first checks pine.conf.fixed, if it does not exist it checks ~/.pinerc, if it does not exist it finally checks /etc/pine.conf.

Each of these files contain settings in the form of "key=value" pairings. You can change these settings with your favorite editor (ex. vi). For the ~/.pinerc file the user can change the settings directly from Pine, by going into (S)etup then (C)onfig. For LDAP settings go into (S)etup then (D)irectory.

Here are the important settings for communicating with the Exchange Server:

NOTE: The syntax of each setting will be shown in the Example configuration.

One potential problem that you may run into is SMTP Authentication. Basically, this means that you need to provide a username and password to use SMTP to send email. I have found no official documentation which states that Pine supports SMTP Authentication (more so on the contrary). The closest thing I've found is the possibility of a /user Parameter to the smtp-server setting, which was mentioned briefly in the change log from version 4.20 to 4.21. It was also brought up a couple of times on the listserv. (see Resources)

If you still have problems with it, here is an alternative which I ended up using. You can have your SysAdmin add your IP address to the Exchange Server to allow you to bypass the SMTP authentication.


6. Example Configuration

This example should help carify the syntax of the settings defined in the previous section, with a set of artificial data.


6.2. Setting up a local ~/.pinerc configuration file

Here are the settings you should find in your ~/.pinerc file. In most cases, each setting will be empty (ie "key=" with no value specified). Here is what they would look like plugging in the default information.

  user-domain=foofoo.org
  smtp-server=192.168.1.25
  inbox-path={192.168.1.25/user=foofoo}INBOX
  folder-collections="INBOX Folders" {192.168.1.25/user=foofoo}inbox/[],
                     "Mailbox Folders" {192.168.1.25/user=foofoo}[]
  default-fcc="{192.168.1.25/user=foofoo}Sent Items"
  postponed-folder={192.168.1.25/user=foofoo}Drafts
  customized-hdrs=From: Foo Foo <[email protected]>
  ldap-servers=192.168.1.100 "/base=/impl=1/rhs=0/ref=0/nosub=0/type=
             /srch=contains/time=/size=/cust=/nick=/matr=/catr=/satr=/gatr="
  rsh-open-timeout=0

NOTE: If you want to try SMTP Authentication with the above configuration, you would replace:
smtp-server=192.168.1.25
with:
smtp-server=192.168.1.25/user=foofoo


6.3. Setting up a site-wide Pine configuration

This configuration affects all the users on the system and requires a bit more work to setup. Only a UNIX SysAdmin should attempt this configuration.

NOTE: In order for this configuration to work properly, the Microsoft domain account information must be synced up with the Unix account information (ie. usernames and full names must match).

Looking at the default provided information you should notice that "Printed Name", and "Account/User Name" now have to be generalized. For "Printed Name", in removing it from the configuration file, Pine will default to the personal name found in the /etc/passwd file. For "Account/User Name", you can use "${USER}", which points to the environment variable which holds the users login name. So with that you get the following configuration:

  user-domain=foofoo.org
  smtp-server=192.168.1.25
  inbox-path={192.168.1.25/user=${USER}}INBOX
  folder-collections="INBOX Folders" {192.168.1.25/user=${USER}}inbox/[],
                     "Mailbox Folders" {192.168.1.25/user=${USER}}[]
  default-fcc="{192.168.1.25/user=${USER}}Sent Items"
  postponed-folder={192.168.1.25/user=${USER}}Drafts
  #customized-hdrs=From: Foo Foo <[email protected]>
  ldap-servers=192.168.1.100 "/base=/impl=1/rhs=0/ref=0/nosub=0/type=
             /srch=contains/time=/size=/cust=/nick=/matr=/catr=/satr=/gatr="
  rsh-open-timeout=0

NOTE: In this configuration we want to comment out the "customized-hdrs" setting since we want the user information to be retrieved from the system /etc/passwd file.

The last step in this configuration is determining whether to put the settings in /etc/pine.conf or /etc/pine.conf.fixed. That choice is yours, and depends on how much control you need to give to the users. If your company only uses Exchange, maybe all the settings should go in fixed, but then users couldn't use Pine for anything else. Remember, if you put a setting in pine.conf.fixed, the user does not have the option to change it.


7. Resources


8. Acknowledgements

Thanks to Hugo van der Kooij for mentioning that Exchange version 5.5 or greater was not in the Requirements section. Thanks to Y Giridhar Appaji Nag for suggesting I add support for a Site-Wide Pine configuration.


9. Disclaimer

Use the information in this document at your own risk. I disavow any potential liability for the contents of this document. Use of the concepts, examples, and/or other content of this document is entirely at your own risk.

All copyrights are owned by their owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark.

Naming of particular products or brands should not be seen as endorsements.


10. Copyright

Copyright (c) 2001-2002 by Alexandru Roman

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license may be found at:

http://www.gnu.org/copyleft/fdl.html

It is requested that the author's name and email are retained on all copies of this document. It is requested that corrections and/or comments be forwarded to the author. It is requested that the author be notified of any redistribution, derivation, and/or incorporation of this document.