home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / doc / tech_notes.me < prev    next >
Encoding:
Text File  |  1994-04-06  |  120.9 KB  |  3,501 lines

  1. .ba 1.0i
  2. .\"
  3. .\"               **** Big header for the first page
  4. .\"
  5. .sz 25
  6. .ce 2
  7. Pine Technical Notes
  8. .sp 0.3
  9. .sz 16
  10. .br
  11. Version 3.85, September 1993
  12. .sp 0.6i
  13. .sz 12
  14. .\"
  15. .\"              **** copyright page
  16. .\"
  17. .bp
  18. .sz 12
  19. .sp 0.3
  20. .br
  21. .lp
  22. Pine is a trademark of the University of Washington
  23. .lp
  24. Copyright 1989-1993  University of Washington
  25. .lp
  26. PC-Pine and UNIX Pine are still under active development.  The core
  27. functionality in Pine has been in testing for many months, but there
  28. are also significant new features (e.g. multiple/remote folder
  29. collections) which have not yet been extensively tested.  Therefore we
  30. still consider this an experimental version.  New versions will be
  31. released as bug fixes and new features become available. 
  32. .lp
  33. Permission to use, copy, modify, and distribute this software and its
  34. documentation for any purpose and without fee to the University of
  35. Washington is hereby granted, provided that the above copyright notice
  36. appears in all copies and that both the above copyright notice and this
  37. permission notice appear in supporting documentation, and that the name of
  38. the University of Washington not be used in advertising or publicity
  39. pertaining to distribution of the software without specific, written prior
  40. permission.  This software is made available as is.
  41. .lp
  42. THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  43. WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  44. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  45. NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  46. INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  47. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  48. (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  49. WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  50. .\"
  51. .\"              **** Set the headers for the main body
  52. .\"
  53. .he ''- Pine Technical Notes -''
  54. .fo ''- % -''
  55. .\"
  56. .\"              **** regular start of a section
  57. .\"
  58. .pn 1
  59. .bp
  60. .sz 16
  61. .ce 1
  62. .b   "Section 1 \\- Introduction"
  63. .(x
  64. .b   "Section 1 \\- Introduction"
  65. .)x
  66. .sz 12
  67. .sp 0.3i
  68. .uh "Design Goals"
  69. .(x
  70. Design Goals
  71. .)x
  72. .br
  73. .lp
  74. Pine was originally conceived in 1989 as a simple, easy-to-use mailer for
  75. administrative staff at the University of Washington in Seattle. The goal
  76. was to provide a mailer that naive users could use without fear of
  77. making mistakes.  We wanted to cater to users who were less interested in
  78. using electronic mail than in doing their jobs; users who perhaps had some
  79. computer anxiety.  We felt the way to do this was to build a system that
  80. didn't do surprising things the user didn't understand, a mailer that had
  81. limited, well-thought-out functionality.  At the time, there was no such
  82. UNIX mailer commercially or freely available.  Elm seemed closest to
  83. the goal, so we started modifying it. 
  84. .lp
  85. One of the greatest problems with most mailers on UNIX systems is the
  86. editor. One can normally choose between \fIemacs\fR and \fIvi\fR. We
  87. experimented with
  88. some versions of emacs and settled on a hacked version of micro emacs.
  89. Eventually it became heavily modified and tightly integrated with the rest
  90. of Pine.  One of the main features of having a tightly coupled editor is
  91. that it can guide the user through editing the header of the message, and
  92. Pine takes great care to do this. A very simple and efficient interface to
  93. the UNIX spell command was also added. The emacs-style key bindings were
  94. retained, though most of the other wild and wonderful emacs functions were
  95. not. The Pine composition editor is also available as a very simple stand
  96. alone editor named "pico". 
  97. .lp
  98. Throughout Pine development, we have had to strike a balance between the
  99. need to include features which advanced users require and the need to keep
  100. things simple for beginning users.  To strike this balance, we have tried
  101. to adhere to these design principles:
  102.  
  103. .ip
  104. - The underlying model presented to the user has to be simple and clear.
  105. Underlying system operation is hidden as much as possible.
  106. .ip
  107. - It's better to have a few easily understood commands that
  108. can be repeated than to have some more sophisticated command that will
  109. do the job all at once.
  110. .ip
  111. - Whenever the user has to select a command, file name, address, etc.,
  112. the user is given or can get a menu from which to make the selection.
  113. Menus are complete, small, organized and well thought out.
  114. .ip
  115. - Pine provides immediate feedback for the user with each operation.
  116. .ip
  117. - Pine must be very tolerant of user errors.
  118. Any time a user is about to perform an irreversible act (send a message, 
  119. expunge messages from a folder), Pine asks for confirmation.  
  120. .ip
  121. - Users can learn by exploration without fear of doing anything wrong.
  122. This is an important feature so the user can get started quickly without
  123. reading any manuals and so fewer manuals are required.
  124. .ip
  125. - The size of Pine should be kept to a minimum so users don't
  126. feel "lost" in all these commands and concepts.
  127.  
  128. .lp
  129. Just as there were goals relating to the look and feel of Pine, there were
  130. equally important goals having to do with Pine's structure\-the things
  131. that users never see but still rely on every time they use Pine.  While
  132. Pine can be used as a stand-alone mail user agent, one of its strongest
  133. assets is its use of the Interactive Mail Access Protocol (IMAP) for
  134. accessing remote email folders.  In addition, Pine was one of the first
  135. programs to support the Multipurpose Internet Mail Extensions (MIME) 
  136. specification.  With MIME, Pine users can reliably send any binary file 
  137. to any
  138. other person on the Internet who uses a MIME compliant email program. 
  139. .lp 
  140. The choices to use IMAP and MIME reflect the importance of
  141. interoperability, standardization and robustness in Pine.  As you work
  142. with Pine more, you will see other features which reflect the same values. 
  143. For example, Pine enforces strict compliance with RFC-822, implements a strong
  144. mail
  145. folder locking mechanism and verifies a process before overwriting any
  146. files (e.g. addressbook, expunging messages). 
  147.  
  148. .sz 12
  149. .sp 0.3i
  150. .uh "Pine Components"
  151. .(x
  152. Pine Components
  153. .)x
  154. .br
  155. .lp
  156. If you have picked up the Pine distribution, then you already know that
  157. Pine comes in a few different pieces.  They are:
  158.  
  159. .ip \fIPine\fR
  160. This main code from which the Pine program is compiled.
  161.  
  162. .ip \fIPico\fR
  163. Pico is the name for the Pine composer.  The Pico code is used in two
  164. ways:  (1) it is compiled on its own to be a stand-alone editor or (2) 
  165. compiled as a library for Pine to support composition of messages within
  166. Pine.  Pico is Pine's internal editor invoked when users need to fill in
  167. header lines or type the text of an email message.
  168.  
  169. .ip \fIImap\fR
  170. An API for IMAP.  Includes the C-Client library, which is compiled into
  171. Pine, and the IMAP server IMAPd.  C-Client implements the IMAP protocol
  172. and also negotiates all access between Pine and the mail folders it
  173. operates on.  The C-Client routines are used for email folder parsing and
  174. interpreting MIME messages. IMAPd is a separate server that handles IMAP
  175. connections from any IMAP compliant email program.  When Pine accesses a
  176. remote mailbox, the Pine program is the IMAP client and the IMAPd program
  177. is the IMAP server. 
  178.  
  179. .bp
  180. .sz 16
  181. .ce 1
  182. .b "Section 2 \\- Background Details"
  183. .(x
  184. .b "Section 2 \\- Background Details"
  185. .)x
  186. .sz 12
  187. .sp 0.3i
  188. .br
  189.  
  190. .uh "Domain Names"
  191. .(x
  192. Domain Names
  193. .)x
  194. .br
  195. .lp
  196. Domain names are used to uniquely name each host on the Internet.
  197. A domain name has a number of parts separated by periods.
  198. Each label represents a level in the hierarchy.
  199. An example of a name is:
  200.  
  201. .i
  202. .ce 1
  203. olive.cac.washington.edu
  204. .r
  205.  
  206. In this domain name the top-level label is
  207. .i edu,
  208. indicating it is at an educational institution, the second-level label is
  209. .i washington,
  210. indicating the University of Washington.
  211. .i cac
  212. is a specific department within the University of Washington, and
  213. .i olive
  214. is the host name.
  215. The top-level names are assigned by Internet
  216. organizations, and other names are assigned at the appropriate level.
  217. The Domain Name Service, DNS, is the
  218. distributed database used to look up these names.
  219.  
  220. Pine relies on domain names in multiple places.  A domain name is embedded
  221. into the message-id line generated for each piece of email.  A domain name
  222. is needed to contact an IMAP server to get access to remote INBOXes and
  223. folders.  Most importantly, domain names are needed to construct the 
  224. From: line of your outgoing messages so 
  225. that people on the Internet will be able to get email back to you.
  226.  
  227. On UNIX systems, you can set the domain via the \fIuser-domain\fR 
  228. variable in the Pine configuration file, or rely on
  229. the file
  230. .i /etc/hosts
  231. which usually sets the name of the local host.
  232. While Pine can often deliver email without the domain name being properly
  233. configured, it is best to have this set right.  
  234. Problems can usually be solved by adjusting the system's entry
  235. in the
  236. .i /etc/hosts
  237. file.
  238. The fully-qualified name should be listed before any abbreviations.
  239. .(l
  240. .ce 5
  241. 128.95.112.99   olive.cac.washington.edu   olive
  242.  
  243. is preferred over
  244.  
  245. 128.95.112.99   olive   olive.cac.washington.edu
  246. .)l
  247.  
  248. On PCs, the task of configuring the domain name is a bit different.  Often
  249. times, PCs do not have domain names\-they have \fIIP addresses\fR.
  250. IP addresses are the numbers which uniquely identify a computer on the
  251. network.  The way you configure your IP address depends on the networking
  252. software which you use on the PC.  You can refer to the documentation
  253. which came with your networking software or see the PC specific
  254. installation notes for help configuring the IP address with your network
  255. software.
  256.  
  257. With PCs, it is vital that users set the variable 
  258. .i user-domain
  259. in the Pine configuration file (\fIPINERC\fR).
  260.  
  261. Details on configuring Pine with correct domain names can be found in
  262. the Domain Settings section of this document.
  263.  
  264. .uh "RFC-822 Compliance"
  265. .(x
  266. RFC-822 Compliance
  267. .)x
  268. .br
  269. .lp
  270. Pine tries to adhere to RFC-822 a little more strongly than
  271. some other mailers and uses the "full name <address>" format
  272. rather than the "address (full name)" format.
  273. The intent of the
  274. standard is that parentheses should only be for comments.
  275. Pine displays and generates the newer format, but will
  276. parse the old format and attempt to turn it into the new one.
  277. .lp
  278. As far as outgoing email is concerned, Pine fully-qualifies addresses 
  279. whenever possible.  They are even displayed in fully-qualified
  280. form on the terminal as the user composes a message.  This
  281. makes addresses more clear 
  282. and gives a hint to the user that the network
  283. extends beyond the local organization.
  284. Pine implements fully-qualified domain names by tacking on the local
  285. domain to all unqualified addresses which a user types in.  Any address
  286. which does not contain a "@" is considered unqualified.
  287. .lp
  288. The newer format for addresses allow for spaces and special characters in 
  289. the full name of an address.  For this reason, commas are required to
  290. separate addresses.
  291. If any special characters as defined in
  292. RFC-822 appear in the full name, quotes are required around the address.
  293. Pine will insert the quotes automatically.
  294. The common cases where
  295. this happens are with periods after initials and parentheses.
  296. .lp
  297. Because Pine fully complies with RFC-822, it is sometimes difficult to use
  298. non-Internet address formats such as UUCP's 
  299. .i host!user 
  300. or DECNet's
  301. .i USER::HOST 
  302. with Pine.  People who run Pine on these systems have made local
  303. modifications to Pine or to the mail transport agent (e.g. sendmail)
  304. to make things work for them.  Another special case that
  305. Pine does not allow for are the sites in the United Kingdom which 
  306. require two "local" domains (one in the form 
  307. .i machine.site.ac.uk
  308. for use outside the UK and the other
  309. .i uk.ac.site.machine
  310. for use inside the UK).  This special case requires local modifications
  311. to Pine.
  312. .lp
  313. Pine expects dates to be in the standard RFC-822 format which is something
  314. like:
  315.  
  316. .ce 1
  317. [www, ] dd mmm yy hh:mm[:ss] [timezone]
  318.  
  319. It will attempt to parse dates that are not in this format.
  320. When an unparsable date is encountered it is displayed as
  321. .i "xxx xx"
  322. when shown in the FOLDER INDEX screen.
  323.  
  324.  
  325. .uh "SMTP and Sendmail"
  326. .(x
  327. SMTP and Sendmail
  328. .)x
  329. .br
  330. .lp
  331. Pine is a 
  332. .i "user agent"
  333. not a
  334. .i "message transfer agent."
  335. In plain English, that means Pine does not know how to interact with other
  336. computers on the Internet to deliver or receive email.  
  337. What Pine does know how to do is help users
  338. read, organize and create email.  The "dirty work" of delivering and
  339. accepting email is handled by other programs.
  340. .lp
  341. All outgoing email is delivered to a mail transfer program or to an
  342. SMTP server.  The most common mail transfer program is 
  343. .i sendmail.
  344. When Pine on a UNIX computer uses the local 
  345. .i "sendmail,"
  346. it first writes the message to a temporary file in
  347. .i "/tmp."
  348. Then Pine runs a shell in the background that runs
  349. .i sendmail
  350. on the temporary file and then removes it.
  351. This is done with a shell in the background so the user doesn't have to wait
  352. for
  353. .i sendmail
  354. to finish.  By default, 
  355. .i sendmail
  356. is invoked with the
  357. .i "-t"
  358. flag to cause it to read and parse the header
  359. to determine the recipients; the
  360. .i "-oem"
  361. flag to cause errors to be mailed back; and the
  362. .i "-oi"
  363. flag to ignore dots in incoming messages.
  364. Systems administrators can choose to configure Pine to use a different 
  365. mail transfer program or even 
  366. .i sendmail
  367. with different flags.
  368. See the section on UNIX Pine Compile-time Options for more details on this.
  369. .lp
  370. Pine can also operate as an SMTP client.  
  371. SMTP stands for 
  372. .i "Simple Mail Transfer Protocol;" 
  373. it specifies the rules by which computers on the Internet pass email to
  374. one another.
  375. In this case, Pine passes
  376. outgoing email messages to a designated SMTP server instead of to a mail
  377. transfer program on the local machine.  A program on the server then takes
  378. care of delivering the message.
  379. To make Pine operate as an SMTP
  380. client, the
  381. .i "smtp-server"
  382. variable must be set to the IP address or host name of the SMTP server
  383. within your organization.  This variable accepts a comma separated list
  384. of servers, so you can specify multiple SMTP servers.
  385. PC-Pine only runs as an SMTP client.
  386.  
  387. .uh "Interactive Mail Access Protocol (IMAP)"
  388. .(x
  389. Interactive Mail Access Protocol (IMAP)
  390. .)x
  391. .br
  392. .lp
  393. IMAP is a mail access protocol.
  394. Pine uses IMAP to get at
  395. messages and folders which reside on remote machines.
  396. With IMAP,  all messages are kept on the server.  An IMAP client (such as
  397. Pine) can request specific messages, headers, message structures, etc.  The 
  398. client
  399. can also issue commands which delete messages from folders on the server.
  400. IMAP's closest kin is POP, the
  401. Post Office Protocol, which works by transferring an entire mailbox to the
  402. client where all the mail is kept.  For a complete comparison of IMAP and
  403. POP, see the paper 
  404. .i "Comparing Two Approaches to Remote Mailbox Access: IMAP vs. POP"
  405. by Terry Gray.  The paper can be found as the file doc/imap.vs.pop in the
  406. standard Pine distribution.
  407.  
  408. .lp 
  409. IMAP Features: 
  410. .ip 
  411. Allows access to mail folders from more than one
  412. client computer. 
  413. .ip 
  414. Works well over low-bandwidth lines because
  415. information is sent in small pieces as needed by the user. 
  416. .ip 
  417. Email can
  418. be delivered and stored on a well-maintained and reliable server which is
  419. "always-up". 
  420. .ip 
  421. Folders can be accessed and manipulated from anywhere on
  422. the Internet. 
  423. .ip 
  424. Users can get to messages stored on different folders
  425. within the same Pine session. 
  426. .ip 
  427. Allows use of IMAP server for searching
  428. and parsing. 
  429.  
  430. .lp 
  431. IMAP2 is defined in RFC-1176.  IMAP2bis, the proposed
  432. extension to IMAP2, is described in the document imap2bis-draft-XX.txt in
  433. the /mail directory of ftp.cac.washington.edu.  IMAP2bis will be
  434. formally documented in an upcoming RFC.  Pine 3.85 is an IMAP2bis client. 
  435. It takes advantage of the extensions to IMAP2 and should work with any
  436. IMAP2bis server software. 
  437.  
  438.  
  439. .uh "Multipurpose Internet Mail Extensions (MIME)"
  440. .(x
  441. Multipurpose Internet Mail Extensions (MIME)
  442. .)x
  443. .br
  444. .lp
  445. MIME is a way of encoding a multipart message structure into a standard
  446. Internet email message.  The parts may be nested and may be of seven 
  447. different
  448. types:  Text, Audio, Image, Video, Message, Application and Multipart
  449. (nested).  The MIME specification allows email programs such as 
  450. Pine to
  451. reliably and simply exchange binary data (images, spreadsheets, etc.) MIME
  452. includes support for international character sets, tagging each part of a
  453. message with the character set it is written in, and providing 7-bit
  454. encoding of 8-bit character sets. It also provides a simple rich text
  455. format for marking text as bold, underlined, and so on. There is a
  456. mechanism for splitting messages into multiple parts and reassembling them
  457. at the receiving end. 
  458. .lp
  459. MIME is still relatively new, but already we are seeing it used
  460. widely throughout the Internet.  The MIME standard was officially
  461. published in June of 1992 as RFC 1341.  Pine 3.0 was one of the first email
  462. programs to Implement MIME.  Now, there are a dozen public MIME email
  463. programs and nearly that many commercial MIME email programs.  In
  464. addition, MIME is being added to newsreaders so MIME messages can be
  465. posted and read in USENET newsgroups.
  466. .lp
  467. An actual MIME message looks something like this:
  468. .sz 8 
  469. .(l
  470. From lgl@olive.cac.washington.edu Tue Jul 14 17:55:17 1992
  471. Date: Tue, 14 Jul 1992 17:55:17 -0700 (PDT)
  472. From: Laurence Lundblade <lgl@cac.washington.edu>
  473. Subject: Test MIME message
  474. To: Laurence Lundblade <lgl@cac.washington.edu>
  475.      
  476. --16820115-1435684063-711161753:#2306
  477. Content-Type: TEXT/PLAIN; charset=US-ASCII
  478.  
  479. The text of the message would go here. It is readable if
  480. one doesn't mind wading around a little bit of the MIME
  481. formatting. After this is a binary file in base 64
  482. encoding. It has been shortened for this example. The
  483. Base 64 stuff looks dorky in PostScript because
  484. troff -me doesn't have a fixed font like courier.
  485.  
  486. Laurence Lundblade                       206-543-5617
  487.   lgl@cac.washington.edu
  488.      Computing and Communications, University of Washington
  489.  
  490. --16820115-1435684063-711161753:#2306
  491. Content-Type: TEXT/plain; name=login
  492. Content-Transfer-Encoding: BASE64
  493. Content-Description: NeXT login program
  494.  
  495. AYAAAABAAAAAQAAAAQAAAL4AAAAAQAAAAEAAAJYAAAAAAAAAAAA
  496. AAAAAAAABfsAAADFAAAFswAAAAHAAAABwAAAAgAAAAAX190ZXh0
  497. AAAAF9fVEVYVAAAAAAAAAAAAAAAAAAAAAAQpAAAAxQAAAABAAAA
  498. AAAAAAAAAAAAABfX2Z2bWxpYl9pbml0MAAAX19URVhUAAAAAAAA
  499. KQAAAEwAAATuAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAF9fZnZt
  500. XQxAABfX1RFWFQAAAAAAAAAAAAAAAAR1AAAAAAAABToAAAAAgAA  
  501. AAAAAAAAAAAAAAAX19jc3RyaW5nAAAAAAAAAF9fVEVYVAAAAAAA
  502. BHUAAADQQAAFOgAAAAAAAAAAAAAAAAAAAACAAAAAAAAAABfX2Nv
  503. AAAAAAAX19URVhUAAAAAAAAAAAAAAAAFRgAAACsAAAYLAAAAAIA
  504. AAAAAAAAAAAAAAAAF9fZGF0YQAAAAAAAAAAAABfX0RBVEEAAAAA
  505. AAVxAAAAQgAABjYAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAX19i
  506. AAAAAAAAF9fREFUQQAAAAAAAAAAAAAAABbMAAAADAAAAAAAAAAC
  507. AAAAAABAAAAAAAAAABfX2NvbW1vbgAAAAAAAAAAX19EQVRBAAAA
  508. CAlcwAlZCBMT0dJTiBGQUlMVVJFJXMgT04gJXMsICVzAHN1AGxv
  509. Wxsb2Mgb3V0IG9mIG1lbW9yeQoAJXMgdG9vIGxvbmcNCgAvZXRj
  510. 3Vzci9hZG0vd3RtcAAAAABAKCMpUFJPR1JBTTpsb2dpbiAgUFJP
  511. WRzLTQyICBERVZFTE9QRVI6cm9vdCAgQlVJTFQ6U3VuIE5vdiAx
  512. zoyMSBQU1QgMTk5MAoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  513. AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  514. AAAAAAAAAAAAAAAAAAAAAAAAAAAQCgjKSBDb3B5cmlnaHQgKGMp
  515. DE5ODcsIDE5ODggVGhlIFJlZ2VudHMgb2YgdGhlIFVuaXZlcnNp  
  516. 2FsaWZvcm5pYS4KIEFsbCByaWdodHMgcmVzZXJ2ZWQuCgBAKCMp
  517. wk1LjQwIChCZXJrZWxleSkgNS85Lzg5AAAAABHUAAAR1f//////
  518. wAAEdQAABHUAAAR1AAAEdQAAAEsAxwREwT/GhkSDxcWAAAR2gAA
  519. AAR5gAAEeoAABHuAAAR8gAAEfYAABH6AAAR/gAAEgIAABIGAAAA  
  520. AAB
  521.      
  522. --16820115-1435684063-711161753:#2306--
  523. .)l
  524. .sz 10
  525.  
  526.  
  527. For more information about MIME, see RFC 1341 or the FAQ in the
  528. newsgroup comp.mail.mime or the paper \fIMIME Overview\fR by Mark Grand. 
  529. You can find the paper via ftp on adad.premenos.sf.ca.us as pub/mime.ps
  530. or /pub/mime.txt.  For details about Pine's implementation of MIME, see
  531. the two MIME sections later in this document.
  532.  
  533. .uh "Folder Collections"
  534. .(x
  535. Folder Collections
  536. .)x
  537. .br
  538. .lp
  539. Folder Collections are Pine's way of dealing with more than a single
  540. group of folders.  With advent of PC-Pine and the development of tools
  541. within IMAP to better manage remote folders, the time was ripe to provide
  542. a mechanism for defining a group of remote folders.  PC-Pine forced
  543. the issue in that many potential PC-Pine users would be migrating from UNIX
  544. pine in a time sharing environment and, thus, would have some investment
  545. in their archived messages on that host.
  546. .lp
  547. Currently, pine has no way to dynamically create or define collections,
  548. but there is much work still going on in this area.  The hope is to 
  549. provide a general way to define, display and navigate remote folder 
  550. collections in a consistent way across platforms and applications.
  551. Stay tuned!
  552. .lp
  553. For a more complete description of Folder Collections, see the section 
  554. on "Syntax for Collections".
  555.  
  556. .bp
  557. .sz 16
  558. .ce 1
  559. .b   "Section 3 \\- Building and Installation"
  560. .(x
  561. .b   "Section 3 \\- Building and Installation"
  562. .)x
  563. .sz 12
  564. .sp 0.3i
  565. .lp
  566. The Pine distribution is designed to require as little configuration and 
  567. effort at compile time as possible.  Still, there are some Pine behaviors 
  568. which are set at the time you compile Pine.  For each of these,
  569. there is a reasonable (our opinion) default built into the code, so most
  570. systems administrators will have no need for these steps.
  571.  
  572.  
  573. .uh "UNIX Pine Compile-time Options"
  574. .(x
  575. UNIX Pine Compile-time Options
  576. .)x
  577. .br
  578. .lp
  579. The files you may need to modify are 
  580. .i "./pine/makefile.xxx"
  581. and 
  582. .i "./pine/osdep/os-xxx.h" 
  583. where "xxx" is the 3-letter code for your platform.
  584. You can give the command  
  585. .i "build help"
  586. to see the list of ports incorporated into Pine and their associated
  587. 3-letter codes.
  588. The file 
  589. .i "./pine/makefile.xxx"
  590. is where you would set your compiler options.  By default, Pine will be
  591. compiled with debugging on, optimization and profile off.  Note that if 
  592. you compile with DEBUG off, then Pine will not create its normal debug
  593. files, no matter how the debug-level and debug command line flag are set.
  594. .lp
  595. Most of Pine's behaviors are set in the file 
  596. .i "./pine/osdep/os-xxx.h," 
  597. which includes comments that explain each setting.
  598. Some of these can only be set when you compile.  Others, however, can be
  599. overridden by command-line flags to Pine or settings in Pine's user or
  600. system configuration files.  Some of the options which 
  601. can be set when
  602. compiling: 
  603. .ip
  604. USE_QUOTAS: Determines whether quotas are checked on startup.
  605. Default for most systems is to check the quota.
  606. .ip
  607. DEFAULT_DEBUG: Sets the level of debugging output create in Pine's 
  608. debug files.
  609. .ip
  610. NEW_MAIL_TIME:  Interval between new-mail checks.  
  611. Default for most systems is 30 seconds.
  612. .ip
  613. OVERLAP: Number of lines overlap when user views the next page of a
  614. message.
  615. Default on most systems is 2.
  616. .ip
  617. USE_TERMINFO: Instructs Pine to use the terminfo database instead of
  618. termcap.  Default varies by system.
  619. .ip
  620. SENDMAIL and SENDMAILFLAGS: Sets the name and flags for the local program that
  621. will be called to handle outgoing email.
  622. Default is 
  623. .i "/usr/lib/sendmail -oi -oem -t"
  624. on most UNIX systems.
  625. .ip
  626. SYSTEM_PINERC: The name of the file which holds Pine configuration 
  627. information for all users on the system.
  628. Default on UNIX systems is 
  629. .i "/usr/local/lib/pine.conf."
  630. .lp
  631. There are a couple of more obscure options which are in the source code
  632. because a few people have asked for them or because we changed our
  633. minds about them being a good idea in general.
  634. .ip
  635. ENCODE_FROMS: Use Quoted-printable encoding so that
  636. .i From's
  637. at the beginning of lines don't end up being escaped by >'s.
  638. Most people seem to dislike the Q-P encoding more than the > escapes.
  639. .ip
  640. NO_KEYBOARD_LOCK: Disable the keyboard locking function in the main menu.
  641.  
  642.  
  643. .uh "Pico Compile-time Options"
  644. .(x
  645. Pico Compile-time Options
  646. .)x
  647. .br
  648. .pp
  649. There are even fewer options needed when compiling Pico.  The two
  650. interesting ones are for UNIX Pico versions only.  The file that may need
  651. some changing is 
  652. .i "./pico/os_unix.h."
  653. Whatever is set
  654. will effect the behavior of the Pico stand-alone program as well as
  655. the composer within Pine.
  656. .ip
  657. SPELLER: Names the program called to do "normal" spell-checking.
  658. .ip
  659. TERMCAP and TERMINFO: Determines which of these terminal databases
  660. will be used.
  661.  
  662.  
  663. .uh "IMAPd Compile-time Options"
  664. .(x
  665. IMAPd Compile-time Options
  666. .)x
  667. .br
  668. .lp
  669. There are no options or settings required for the version of IMAPd
  670. distributed with Pine.  If you need to be doing more complex modifications
  671. to IMAP, then you should pick up the IMAP development package and work
  672. with that code.  The developer's version of IMAP is available for
  673. anonymous ftp from \fIftp.cac.washington.edu\fR in the directory
  674. \fImail\fR.  The file is called \fIimap.tar.Z\fR.
  675.  
  676.  
  677. .uh "Building the Pine Programs"
  678. .(x
  679. Buiding the Pine Programs
  680. .)x
  681. .br
  682. .pp
  683. You may have already compiled Pine and tried it out.  If so, great!
  684. If not, you should be able to do it without too much trouble by following
  685. these step-by-step instructions:
  686. .ip 1. 
  687. Figure out what platform you're building for.
  688. You can give the command
  689. .i "build help"   
  690. to see the list of ports incorporated into Pine.  
  691. What you need is the three letter code for the platform.
  692. Some examples are
  693. .i nxt
  694. for a Next operating system and
  695. .i ult
  696. for Ultrix.
  697. If your platform is not in the list of ports, then you might have some
  698. work ahead of you.  First, check the file 
  699. .i "doc/pine-ports."
  700. to see if there are others working on a port for your platform or to see
  701. if the port is included in the "contrib" section of the source code. 
  702. Ports in the 
  703. .i contrib
  704. directory were contributed by Pine administrators from around the world,
  705. but the Pine development team has not been able to test the code. If Pine
  706. has not yet been ported to your platform at all, read the section on
  707. Porting Pine in this document. 
  708.  
  709. .ip 2.
  710. Make sure you're in the root of the Pine source.
  711. When you type
  712. .i ls
  713. you should see the following files and directories (or something close to it):
  714. .(l             
  715. README    build    doc     makefile       pine
  716. bin        contrib    imap    pico
  717. .)l
  718.  
  719. .ip 3.
  720. Make sure you're getting a clean start by giving the command
  721. .i "build clean."
  722. This should take only a few seconds to run.
  723.  
  724. .ip 4.
  725. Give the command
  726. .i "build xxx"
  727. where
  728. .i xxx
  729. is the three letter code you picked in step 1.
  730. The compiler should grind away for a few minutes.
  731.  
  732. .ip 5.
  733. When the compilation is complete the sizes of the four binaries
  734. built (pine, mtest, imapd, pico) will be displayed.
  735. The actual binaries are in the various various source directories.
  736. In addition, the 
  737. .i bin 
  738. directory contains a link to each program compiled.  
  739. You can just copy them out of  
  740. .i bin
  741. or try them from there.
  742.  
  743.  
  744. .uh "Installing Pine and Pico on UNIX Platforms"
  745. .(x
  746. Installing Pine and Pico on UNIX Platforms
  747. .)x
  748. .br
  749. .lp
  750. Installing Pine and Pico is remarkably simple.  You take the program files 
  751. which you have just transferred or built and you move them to the correct
  752. directory on your system.  Most often the binaries go in 
  753. .i "/usr/local/bin"
  754. though sometimes they are placed in 
  755. .i "/usr/bin."  
  756. All the help text is compiled into Pine so there are no
  757. .b required
  758. auxiliary files.
  759. .lp
  760. There are, however, two optional auxiliary files:
  761. .i /usr/local/lib/pine.info
  762. and
  763. .i /usr/local/lib/pine.conf.
  764. The file 
  765. .i pine.info 
  766. contains text on how to get further help on the local system.
  767. It is presented as the first page of the help text for the main menu
  768. and should probably refer to the local help desk or the system administrator.
  769. If this file doesn't exist a generic version which suggests 
  770. .q "talking to the computer support staff at your site"
  771. is shown.
  772. The file 
  773. .i "pine.conf"
  774. is used to set system-wide default configurations for Pine.  See the
  775. section on Pine Configuration
  776. later in this document for details about the 
  777. .i pine.conf
  778. file.
  779.  
  780.  
  781. .uh "Installing PC-Pine"
  782. .(x
  783. Installing PC-Pine
  784. .)x
  785. .br
  786. .lp
  787. Most of the PC-Pine configuration 
  788. involves making sure PC-Pine can interact correctly with your networking
  789. software.
  790. PC-Pine runs on top of whatever TCP/IP networking stack you already have. 
  791. Currently, PC-Pine operates with FTP's PC/TCP, Novell's LAN
  792. Workplace for DOS and WATTCP for packet drivers.
  793. Work is underway to develop a version of Pine that works with Sun's PC/NFS
  794. as well.
  795. PC-Pine needs to be able to interact closely with the stack loaded on your 
  796. PC.  
  797. Most of the time, this occurs automatically.  However, there are certain
  798. modifications that need be made.
  799.  
  800. .ip "LAN Workplace for DOS Version 4.1"
  801. Set the environment variable 
  802. .i EXCELAN 
  803. in the PC's 
  804. .i AUTOEXEC.BAT
  805. file.  This provides the necessary links so that LAN Workplace for DOS 4.1 can
  806. translate domain names to IP numbers correctly.  It is needed because Pine
  807. was developed for  LAN Workplace 4.0 and this particular variable is
  808. treated differently in 4.1 than in 4.0.  The 
  809. .i EXCELAN 
  810. variable must point to the directory in which LAN Workplace
  811. is installed.
  812. .ip "PC/TCP versions before 2.2"
  813. You need a file called 
  814. .i PCTCP.INI
  815. which contains a bare-minimum 2-line description of the PC's configuration.
  816. It looks like this:
  817. .(l
  818.         [pctcp ifcust 0]
  819.         ip-address=\fIxx.xx.xx.xx\fR
  820. .)l
  821. .ip
  822. Where 
  823. .i xx.xx.xx.xx 
  824. is the IP address of the PC.  
  825. Pine also requires an environment variable,
  826. .i "PCTCP,"
  827. which points to this file.  For example:
  828. .(l
  829.         set PCTCP=C:\\PINE\\PCTCP.INI
  830. .)l
  831. .ip "Packet Drivers"
  832. Pine needs to be made aware of the PC's network configuration file.
  833. Simply edit the file \fIWATTCP.CFG\fR
  834. included in the Pine distribution.  The file includes 5 configuration
  835. settings\-\-IP-address, gateway, netmask, nameserver(s) and domainslist. 
  836. If you have a network configuration file for NCSA Telnet then
  837. \fIWATTCP.CFG\fR is just a pared down version of the
  838. \fICONFIG.TEL\fR file you already made.  Take a look at \fICONFIG.TEL\fR
  839. to find the correct settings for \fIWATTCP.CFG\fR.
  840. Once the
  841. configuration file is made, the DOS environment variable 
  842. .i WATTCP.CFG 
  843. needs to point at it.  For example:
  844. .(l
  845.         set WATTCP.CFG=C:\\PINE
  846. .)l
  847.  
  848. .lp
  849. In addition to networking software issues, you might need to worry about
  850. setting the timezone.   
  851. PC-Pine includes the timezone as part of outgoing email.  
  852. There is a generic way for PC applications to get the timezone, but,
  853. because PC-Pine is one of a very few applications which requires this
  854. information, timezone might not be previously configured.
  855. .lp
  856. The trick is to add an environment variable,
  857. .i "TZ,"
  858. to your PC's \fIAUTOEXEC.BAT\fR file.  
  859. The format for the \fITZ\fR 
  860. environment variable is as follows:
  861.  
  862. .ce 1
  863. ZZZ[+H]H[:MM:SSTTT]
  864.  
  865. .lp
  866. First is the 3-letter code for your standard time, then a 
  867. "+" or a "-" for direction of offset from GMT, then the amount of offset
  868. (hours, minutes, seconds) and finally the 3-letter code for your summer- 
  869. or daylight savings time.  Everything in [] brackets is optional.
  870. .lp
  871. The default timezone is "PST-8PDT" (U.S. Pacific Time).  Coincidentally,
  872. Microsoft is headquartered in that timezone.
  873. .lp
  874. As an example, people in the Eastern part of the US should add this line
  875. to their
  876. .i AUTOEXEC.BAT 
  877. files:
  878.  
  879. .ce 1
  880. TZ=EST-5EDT
  881.  
  882.  
  883. .uh "Installing IMAPd"
  884. .(x
  885. Installing IMAPd
  886. .)x
  887. .br
  888. .lp
  889. When the Pine distribution is built on a UNIX station, the IMAP server
  890. binary,  
  891. .i "imapd,"
  892. is compiled.  
  893. Installing
  894. .i imapd
  895. requires placing the binary in the appropriate directory, usually
  896. .i /usr/etc,
  897. and adding entries to
  898. .i /etc/services
  899. and   
  900. .i /etc/inetd.conf
  901. or their counterparts.
  902. The following line is appropriate for
  903. .i
  904. /etc/services:
  905.  
  906.   imap         143/tcp         # Mail transfer
  907.  
  908. .r
  909. and the next line is appropriate for
  910. .i       
  911. /etc/inetd.conf:
  912.  
  913.   imap  stream  tcp     nowait  root    /usr/etc/imapd imapd
  914.  
  915. .r
  916. The   
  917. .i /etc/inetd.conf
  918. file entry may vary on different versions of UNIX.
  919. Some have a slightly different set of fields.
  920. Also the pathname in
  921. .i /etc/inetd.conf
  922. must match the path where
  923. .i imapd
  924. is installed.
  925. .lp
  926. With this configuration, the IMAP server 
  927. runs without pre-authentication.  Each new IMAP connection requires a correct
  928. username and password.  IMAP can also be run with pre-authentication based on
  929. the standard 
  930. .i rsh
  931. mechanism.  To enable this, the user account on the IMAP server must
  932. contain a valid
  933. .rhosts
  934. file which grants access to the client machine.  Enabling
  935. .i rimap
  936. authentication is done by creating a link called
  937. .i /etc/rimapd
  938. to
  939. .i imapd.
  940. Basically, what is happening is that Pine is taking
  941. advantage of the ability that
  942. .i rsh
  943. has to use privileged TCP ports so it doesn't have to run in privileged mode.
  944. If the
  945. .i rimap
  946. authentication fails it will drop back to plain password authentication.
  947. .lp
  948. PC-Pine cannot take advantage of 
  949. .i rimap 
  950. authentication.  Also, if your system uses a distributed configuration
  951. database, like NIS, Yellow Pages or Netinfo, be sure that appropriate
  952. steps are taken to ensure the above mentioned information is updated.
  953.  
  954.  
  955. .uh "Support Files: UNIX Pine"
  956. .(x
  957. Support Files: UNIX Pine
  958. .)x
  959. .br
  960. .lp
  961. This section lists the various files which Pine uses which are not
  962. email folders.  All of these are the default names of files, they 
  963. may vary based on Pine's configuration.
  964. .ip /usr/local/lib/pine.conf
  965. Pine's global configuration file.
  966. .ip ~/.pinerc
  967. Personal configuration file for each user.
  968. .ip ~/.addressbook
  969. Personal addressbook
  970. .ip ~/.newsrc
  971. Personal USENET subscription list.  This is shared with other newsreading
  972. programs.
  973. .ip ~/.pine-debugX
  974. The files created for debugging Pine problems.  
  975. By default, there are 4 .pine-debug files kept at any time.
  976. .ip ~/.signature
  977. A signature file which will be included in all outgoing email messages.
  978. .ip ~/mail/interrupted-mail
  979. The text of a message which was interrupted by some unexpected error which
  980. Pine detected.
  981. .ip ~/mail/postponed-mail
  982. The text of a message which the user chose to postpone.
  983. .ip /etc/imapdrc
  984. Imapd global configuration file.
  985. .ip ~/.imapdrc
  986. Personal imapd configuration file.
  987.  
  988.  
  989. .uh "Support Files: PC-Pine"
  990. .(x
  991. Support Files: PC-Pine
  992. .)x
  993. .br
  994. .lp
  995. This section lists the various files which PC-Pine uses which are not
  996. email folders.  All of these are the default names of files, they 
  997. may vary based on Pine's configuration.
  998. .ip "$HOME\\\PINE\\\PINERC"
  999. Personal configuration file for each user.
  1000. .ip "$HOME\\\PINE\\\ADDRBOOK"
  1001. Personal addressbook
  1002. .ip "$HOME\\\PINE\\\PINE.SIG"
  1003. A signature file which will be included in all outgoing email messages.
  1004. .ip "$HOME\\\PINE\\\PINE.HLP"
  1005. File containing Pine's internal help text.
  1006. .ip "$HOME\\\PINE\\\PINE.NDX"
  1007. Index of Pine's help text used by PC-Pine to locate entries.
  1008. .ip "$HOME\\\NEWSRC"
  1009. Personal USENET subscription list.  This is shared with other newsreading
  1010. programs.
  1011. .ip "$HOME\\\MAIL\\\INTRUPTD"
  1012. The text of a message which was interrupted by some unexpected error which
  1013. Pine detected.
  1014. .ip "$HOME\\\MAIL\\\POSTPONE"
  1015. The text of a message which the user chose to postpone.
  1016. .lp 
  1017. PC-Pine maintains its files in two different
  1018. directories by default, all relative to the \fIHOME\fR environment
  1019. variable.  When not set, the  default is 
  1020. the root of the current working drive.  The \fIPINERC\fR file's default
  1021. location can be overridden by the \fIPINERC\fR environment variable.
  1022. This variable defines the path and name of the \fIPINERC\fR file used
  1023. by pine.  It also defines where 
  1024. the \fIPINE.SIG\fR and \fIADDRBOOK\fR files are to be found,
  1025. unless fully qualified in the \fIPINERC\fR configuration file.
  1026. .lp
  1027. In the absense of environment variables and no 
  1028. .i "\\\PINE"
  1029. directory on the current working drive, the \fIPINERC\fR is expected 
  1030. to reside in the same directory as the \fIPINE.EXE\fR executable.
  1031. .lp
  1032. PC-Pine's help text and help text index file, are expected to reside in 
  1033. the same directory as the \fIPINERC\fR (based on the above rules).
  1034. If missing, the files are expected to reside in the same directory as the
  1035. \fIPINE.EXE\fR executable.  These rules can be overridden with the
  1036. \fIPINEHOME\fR environment variable.  This variable should be set to
  1037. the directory where the \fIPINE.HLP\fR and \fIPINE.NDX\fR reside.
  1038.  
  1039.  
  1040. .bp
  1041. .sz 16
  1042. .ce 1
  1043. .b   "Section 4 \\- Command Line Arguments"
  1044. .(x
  1045. .b "Section 4 \\- Command Line Arguments"
  1046. .)x
  1047. .sz 12
  1048. .sp 0.3i
  1049. .lp
  1050. Pine and PC-Pine can accept quite a few command-line arguments.  Many of
  1051. these arguments overlap with variables in the Pine configuration file.  If
  1052. there is an difference, then a flag set in the command line takes precedence.
  1053. Both Pine and PC-Pine expect command line arguments to be preceded by the
  1054. "-" (dash) standardly used by UNIX programs.
  1055.  
  1056. .ip "-d \fIdebug-level\fR"
  1057. Debug Level:  Sets the level of debugging information written by Pine. 
  1058. \fIdebug-level\fR can be set to any integer 0-9.  A debug level of 0 
  1059. turns off debugging for the session.
  1060.  
  1061. .ip "-f \fIfolder\fR"
  1062. Startup folder:  Pine will open this folder in place of the standard INBOX.
  1063.  
  1064. .ip "-i \fIa,b,c,...\fR"
  1065. Initial Keystrokes:  Pine will execute this comma-separated
  1066. sequence of commands upon
  1067. startup.  This allows users to get Pine to start in any of its
  1068. menus/screens.  You cannot include any input into the composer in the
  1069. initial keystrokes.  The key <Return> is represented by a 
  1070. .q CR 
  1071. in the
  1072. keystroke list; the spacebar is designated by the letters 
  1073. .q "SPACE".
  1074. If -i is used
  1075. with no keystrokes, Pine will start-up in
  1076. the FOLDER INDEX screen.  
  1077. Configuration
  1078. equivalent: \fIinitial-keystroke-list\fR
  1079.  
  1080. .ip -k
  1081. Function-Key Mode: When invoked in this way, Pine expects the input of
  1082. commands to be function-keys.  Otherwise, commands are linked to the
  1083. regular character keys.  Configuration equivalent: \fIuse-function-keys\fR
  1084. included in \fIfeature-list\fR.
  1085.  
  1086. .ip -l
  1087. Folder-List: With "-l" set, Pine will default to an expanded folder list. 
  1088. This means that the FOLDER LIST screen will always show all folders in all
  1089. collections.  Default is to show the folders in the current collection only.
  1090. Configuration equivalent: \fIexpanded-view-of-folders\fR in
  1091. \fIfeature-list\fR.
  1092.  
  1093. .ip "-n \fIn\fR"
  1094. Message-Number: When specified, Pine starts up in the FOLDER INDEX screen
  1095. with the current message being the designated message number.  
  1096.  
  1097. .ip "-o \fIfolder\fR"
  1098. Opens the specified folder (or INBOX) readonly.
  1099.  
  1100. .ip "-p \fIfile\fR"
  1101. Uses the named file as the personal configuration file instead of
  1102. \fI~/pinerc\fR or \fI$HOME\\\PINE\\\PINERC\fR.
  1103.  
  1104. .ip "-P \fIfile\fR"
  1105. Uses the named file as the system wide configuration file instead of
  1106. \fI/usr/local/lib/pine.conf\fR.  UNIX Pine only.
  1107.  
  1108. .ip -r
  1109. Restricted Mode:  For UNIX Pine only.  Pine in restricted mode can only
  1110. send email to itself.  Save and export are limited.
  1111.  
  1112. .ip "-sort \fIkey\fR"
  1113. Sort-Key: Specifies the order messages will be displayed in for the FOLDER
  1114. INDEX screen.  \fIKey\fR can have the following values: subject, arrival,
  1115. date, from, size, subject/reverse, arrival/reverse, date/reverse, 
  1116. from/reverse, size/reverse.  The default value is "arrival".  
  1117. The \fIkey\fR value reverse is equivalent to arrival/reverse.
  1118. This option
  1119. will be expanded in the
  1120. future to allow sorting on "to" and "cc".  Configuration equivalent:
  1121. \fIsort-key\fR.
  1122.  
  1123. .ip -z 
  1124. Enable Suspend:  When run with this flag, the key sequence ctrl-z will
  1125. suspend the Pine session.  Configuration equivalent: \fIenable-suspend\fR
  1126. included in \fIfeature-list\fR.
  1127.  
  1128.  
  1129. .lp
  1130. .b "Special Pine Command-Line Modes"
  1131.  
  1132. .ip "\fI[address]\fR"
  1133. Send-to:  If you put an unqualified string (or strings) in the command
  1134. line, Pine reads them as email address.  Pine will startup in the composer
  1135. with a message started to the person/people specified.  Once the message
  1136. is sent, the Pine session closes.
  1137.  
  1138. .ip -h
  1139. Help:  Prints the list of available command-line arguments to the screen.
  1140.  
  1141. .ip -conf
  1142. Configuration: Prints a sample system configuration file to the screen or
  1143. standard output.  UNIX Pine only.
  1144.  
  1145. .bp
  1146. .sz 16
  1147. .ce 1
  1148. .b   "Section 5 \\- Configuration and Preferences"
  1149. .(x
  1150. .b "Section 5 \\- Configuration and Preferences"
  1151. .)x
  1152. .sz 12
  1153. .sp 0.3i
  1154.  
  1155. .uh "Pine Configuration"
  1156. .(x
  1157. Pine Configuration
  1158. .)x
  1159. .br
  1160. .lp
  1161. There is very little in Pine which \fBrequires\fR configuration.  In almost
  1162. every case, the compiled-in preferences will suit users just fine.  When
  1163. running Pine on a UNIX system, the built-in configuration can be changed
  1164. by setting variables in the system configuration file,
  1165. \fI/usr/local/lib/pine.conf\fR.  
  1166. Both Pine and PC-Pine also use personal (user-based) configuration files. 
  1167. On UNIX machines, the personal configuration file is the file 
  1168. \fI~/.pinerc\fR.  For PC-Pine systems, the personal configuration file is
  1169. in 
  1170. .i "\\\PINE\\\PINERC."
  1171. .lp
  1172. The syntax of a configuration variable is this:
  1173. .(l
  1174. <variable> = <value>
  1175. .)l
  1176. If the value is absent then the variable is unset.
  1177. To set a variable to the empty value the syntax is "".
  1178. This is equivalent to an absent value except that it overrides any
  1179. system-wide value that may be set.
  1180. Quotes may be used around any value.
  1181. All values are strings and end at the end of the line or the closing quote.
  1182. Leading and trailing space is ignored unless it is included in the quotes.
  1183. For some variables the only appropriate values are
  1184. .i yes
  1185. and
  1186. .i no.
  1187. There is also a second valid syntax which has been introduced since the last
  1188. version of Pine.
  1189. Some variables are now lists.
  1190. A list is a comma-separated list of values.
  1191. The syntax for a list is:
  1192. .(l
  1193. <variable> = <value> [, <value> , ... ]
  1194. .)l
  1195. A list can be continued on subsequent lines by beginning the line with
  1196. white-space.
  1197. Both the per-user and global configuration files may contain comments
  1198. which are lines beginning with a
  1199. .i "#."
  1200. .lp
  1201. For UNIX Pine, There are four ways in which a variable can be set.
  1202. In decreasing order of precedence they are:  
  1203. .(l
  1204. (1) a command line argument
  1205. (2) the personal configuration file
  1206. (3) the system-wide configuration file
  1207. (4) default in the source code.
  1208. .)l
  1209. So, command line flags always take precedence over per-user settings, which
  1210. take precedence over system-wide configuration settings, which take precedence over
  1211. source code defaults.
  1212. PC-Pine has the same precedence, but it does not us a system-wide
  1213. configuration file.
  1214. .lp
  1215. You may get a sample/fresh copy of the system configuration file by
  1216. running
  1217. .i "pine -conf."
  1218. The result will be printed on the standard
  1219. output with comments describing each variable.
  1220. Pine will automatically create the personal configuration 
  1221. file the first time it is run, so there is no need to generate a sample.
  1222. Pine reads and writes the personal configuration 
  1223. file occasionally during normal operation.
  1224. The user may add additional
  1225. comments to the personal configuration file and they will be retained.
  1226. Pine always writes this file at least once when running so you can tell
  1227. when a user last invoked Pine by checking the date on this file.
  1228. .lp
  1229. References to environment variables may be included in the Pine
  1230. configuration file.
  1231. The format is
  1232. .i $variable
  1233. or
  1234. .i ${variable}.
  1235. The character
  1236. .i ~
  1237. will be expanded to the
  1238. .i $HOME  
  1239. environment variable.
  1240. Currently, most of these variables have to be set by hand with an editor.
  1241. .lp
  1242. When environment variables are used for Pine settings which take lists
  1243. (\fIfeature-list, folder-collections\fR), you  
  1244. must have an environment variable set for each member of the list.  Pine
  1245. won't properly recognize an environment variable set equal to a
  1246. comma-delimitted list.  It is OK to reference unset environment variables
  1247. in the Pine configuration file.
  1248.  
  1249. .uh "General Configuration Variables"
  1250. .(x
  1251. General Configuration Variables
  1252. .)x
  1253. .br
  1254. .lp
  1255. The following variables can be found in any Pine configuration file\-be
  1256. it UNIX or DOS, system-wide or personal.
  1257.  
  1258. .ip "\fIuser-domain\fR"
  1259. Sets the domain or host name for the user, overriding the system
  1260. host or domain name.
  1261. See the domain name section.
  1262.  
  1263. .ip "\fIuse-only-domain-name\fR"
  1264. Can be set to
  1265. .i yes
  1266. or
  1267. .i no.
  1268. At this point anything but
  1269. .i yes
  1270. means
  1271. .i no.
  1272. If set to
  1273. .i yes
  1274. the first label in the host name will be lopped off to get the domain name
  1275. and the domain name will be used for outgoing mail and such.
  1276. That is, if the host name is
  1277. .i carson.u.example.edu
  1278. and this variable is set to
  1279. .i yes,
  1280. then
  1281. .i u.example.edu
  1282. will be used on outgoing mail.  Only meaningful if \fIuser-domain\fR is 
  1283. NOT set.
  1284.  
  1285. .ip "\fIinbox-path\fR"
  1286. This specifies the name of the folder to use for the INBOX.
  1287. Normally this is unset so the system's default is used.
  1288. The most common reason for setting this is to open an IMAP mailbox for
  1289. the INBOX.
  1290. For example,
  1291. .i {imap5.u.example.edu}inbox
  1292. will open the user's standard
  1293. .i INBOX
  1294. on the mail server, imap5.
  1295.  
  1296. .ip "\fIdefault-fcc\fR"
  1297. The name of the folder to which all outgoing mail goes is set here.
  1298. The compiled-in default is \fIsent-mail\fR (UNIX) or \fIsentmail\fR (DOS).
  1299. It can be set to "" (two double quotes with nothing between them) to turn off
  1300. saving copies of outgoing mail.  If the default-fcc is a relative
  1301. filename, then it is relative to your default collection for saves (see
  1302. \fIfolder-collections\fR).
  1303.  
  1304. .ip "\fIsmtp-server\fR"
  1305. One or more SMTP servers (host name or IP address) which Pine will use 
  1306. for outgoing mail.  If not set, Pine passes outgoing email to the 
  1307. .i sendmail
  1308. program on the local machine.
  1309. PC-Pine users must have this variable set in order to send mail as they
  1310. have no \fIsendmail\fR program.
  1311.  
  1312. .ip "\fIimage-viewer\fR"
  1313. This variable names the program to call for displaying
  1314. parts of a MIME message that are of type image.
  1315. In a future version of Pine this configuration will be
  1316. replaced by the more general
  1317. .i mailcap.  
  1318.  
  1319. .ip "\fIsignature-file\fR"
  1320. Names the file to be included as the signature.
  1321. This defaults to \fI~/.signature\fR on UNIX and \fI$HOME\\\PINE\\\PINE.SIG\fR 
  1322. on DOS.
  1323.  
  1324. .ip "\fImail-directory\fR"
  1325. This variable was more important in previous versions of Pine.
  1326. Now it is used only as the directory for storing postponed and
  1327. interrupted messages temporarily.  The default is \fI~/mail\fR on UNIX and
  1328. .i "$HOME\\\MAIL" 
  1329. on DOS.
  1330.  
  1331. .ip \fIcharacter-set\fR 
  1332. This sets the character set used by the terminal.
  1333. Currently appropriate values are US-ASCII, ISO-8859-1 through ISO-8859-9
  1334. and ISO-2022-JP. See the section on international character sets for more
  1335. details. The default is US-ASCII.
  1336.  
  1337. .ip \fIincoming-folders\fR
  1338. This is a list of one or more folders other than
  1339. .i INBOX
  1340. that may receive new messages.
  1341. This list is slightly special in that it is always expanded in the
  1342. folder lister.
  1343. In the future, it may become more special.
  1344. For example, it would be nice if Pine would monitor the folders in this
  1345. list for new mail.
  1346.  
  1347. .ip \fIfolder-collections\fR
  1348. This is a list of one or more collections where saved mail is stored.
  1349. See the sections describing folder collections and 
  1350. collection syntax for more
  1351. information.
  1352. The first collection in this list is the default collection for saves.
  1353.  
  1354. .ip \fInews-collections\fR
  1355. This is a list of collections where news folders are located.
  1356. See the section describing collections for more information.
  1357.  
  1358. .ip \fIinitial-keystroke-list\fR
  1359. This is a comma-separated list of keystrokes which Pine executes on startup.
  1360. Items in the list are usually just characters, but there are some special
  1361. values.
  1362. .i SPACE
  1363. and
  1364. .i CR
  1365. mean a space character and a carriage return, respectively.
  1366. .i F1
  1367. through
  1368. .i F12
  1369. stand for the twelve function keys.
  1370. .i
  1371. UP, DOWN, LEFT, \fRand\fI RIGHT
  1372. .r
  1373. stand for the arrow keys.
  1374. A restriction is that you can't mix function keys and character keys in this
  1375. list even though you can, in some cases, mix them when running Pine.
  1376. A user can always use all character keys in the startup list even if he 
  1377. or she is using function keys normally, or vice versa.
  1378.  
  1379. .ip \fIfeature-list\fR
  1380. This is a list of features (options) which should be turned on.
  1381. You may also turn features off (the default) by prepending the
  1382. characters \fIno-\fR to any of the features.  The \fIfeature-list\fR is
  1383. additive.
  1384. That is, first the system-wide \fIfeature-list\fR is read and then
  1385. the user's \fIfeature-list\fR is read.  This makes it possible for the
  1386. system manager to turn some of the features on by default while still
  1387. allowing the user to cancel that default.
  1388. However, some of the documentation assumes that all of the features are off
  1389. by default, so use this with care.
  1390. Here is the current list of possible features with brief descriptions:
  1391. .(l
  1392. enable-full-header-cmd        \fIHdrMode\fR command enabled
  1393. enable-unix-pipe-cmd        piping message to Unix enabled (not implemented yet)
  1394. enable-bounce-cmd        \fIBounce\fR mail to someone else (not implemented yet)
  1395. enable-alternate-editor-cmd    \fI^_\fR command enabled
  1396. enable-suspend            \fI^Z\fR job control enabled
  1397. enable-tab-completion        \fITAB\fR completion enabled for folder opening and saving
  1398. enable-jump-shortcut        can type just a number to \fIJump\fR in index
  1399. quit-without-confirm        won't ask for confirmation when quitting
  1400. enable-goto-cmd            \fIGotoFldr\fR command enabled
  1401. enable-apply-cmd        \fIApply\fR command enabled (not implemented yet)
  1402. enable-flag-cmd            \fIFlag\fR command enabled (not implemented yet)
  1403. enable-zoom-cmd            \fIZoom\fR command enabled
  1404. enable-forward-as-MIME        will ask if forwarded message should be attached
  1405. expanded-view-of-folders        folder lists pre-expanded in folder lister
  1406. use-function-keys        same as \fI-k\fR flag
  1407. include-header-in-reply        when replying, include header lines from message
  1408. signature-at-bottom        signature comes at bottom instead of top
  1409. delete-skips-deleted        \fIDelete\fR will skip to next undeleted message
  1410. .)l
  1411.  
  1412. .ip \fIsort-key\fR
  1413. This variable sets up the default index sorting.
  1414. The default is to sort by arrival order.
  1415. It has the same functionality as the
  1416. .i -sort
  1417. command line argument and the \fI$\fR
  1418. command in the folder index.  If a \fIsort-key\fR is set, then all folders
  1419. open during the session will have that as the default sort order.
  1420.  
  1421. .ip \fIsaved-msg-name-rule\fR
  1422. Determines default folder name when saving.  Currently, Pine will accept
  1423. the values "default-folder" or "by-sender".  If set to \fIdefault-folder\fR,
  1424. then Pine will offer the folder "saved-messages" (UNIX) or "SAVEMAIL"
  1425. (DOS) for saving messages.  If set to \fIby-sender\fR, then Pine will
  1426. offer to save the message in a folder with the same name as the sender.
  1427. If set to "last-folder-used", then Pine will offer to save in whatever 
  1428. folder you used previously.  We expect to expand 
  1429. this list so that Pine can save messages with the rule "by recipient".
  1430.  
  1431. .ip \fIread-message-folder\fR
  1432. If set, mail in the
  1433. .i INBOX
  1434. that has been read but not deleted is moved here, or rather, the user
  1435. is asked whether or not he or she wants to move it here upon quitting 
  1436. Pine.
  1437.  
  1438.  
  1439. .uh "Special Configuration Variables"
  1440. .(x
  1441. Special Configuration Variables
  1442. .)x
  1443. .br
  1444. .lp
  1445. Some configurations only make sense in a system-wide file, others only
  1446. make sense in a personal configuration file.  Also, there are certain
  1447. settings required in PC-Pine and others which make no sense there.  These
  1448. are the variables you may need to configure, depending on which
  1449. configuration file you are working with.
  1450.  
  1451. .ip \fIuser-id\fR
  1452. PC-Pine only.  Sets the username that is placed on all outgoing
  1453. messages. 
  1454.  
  1455. .ip \fIpersonal-name\fR
  1456. Personal configuration file only.
  1457. User's full personal name.
  1458. On UNIX systems, the default is taken from
  1459. the accounts data base (/etc/passwd).
  1460.  
  1461. .ip \fIprinter\fR
  1462. UNIX Pine only.
  1463. This is the current setting for a user's printer.  This variable is
  1464. set from Pine's printer-setup function.  The value must be either
  1465. .(l
  1466. "attached-to-ansi"    -or-
  1467. the value of \fIpersonal-print-command\fR         -or-
  1468. the value of \fIstandard-printer\fR from the system-wide configuration
  1469. .)l
  1470.  
  1471. .ip \fIstandard-printer\fR
  1472. System-wide configuration file only.
  1473. Specifies the command for printer selection number 2 on the printer menu.
  1474.  
  1475. .ip \fIpersonal-print-command\fR
  1476. UNIX personal configuration file only.
  1477. This corresponds to item 3 in the printer menu.
  1478. This variable retains the value of \fIpersonal-print-command\fR
  1479. when the printer is set to something other than item 3.  The
  1480. \fIpersonal-print-command\fR can be set within Pine using the printer
  1481. setup menu.
  1482.  
  1483. .ip \fIlast-time-prune-questioned\fR
  1484. Personal configuration file only.
  1485. This variable records the month the user was last asked if his/her
  1486. sent-mail folders should be pruned.  
  1487. The format is \fIyy.mm\fR.
  1488. This is automatically updated by Pine when the the pruning is done or
  1489. declined.
  1490.  
  1491. .ip "\fIbugs-nickname, bugs-fullname and bugs-address\fR"  
  1492. System-wide configuration file only.
  1493. This trio specifies an entry for
  1494. the address book that is always inserted if found absent.
  1495. It is a way to put the address to send requests for help to in everyone's
  1496. address book so users can find it easily.
  1497. There is no default value.
  1498.  
  1499. .ip "\fIeditor          \fR"
  1500. UNIX Pine only.
  1501. Sets the name of the alternate editor for composing mail (message text 
  1502. only, not headers). It will be invoked with the "^_" command.  
  1503.  
  1504. .ip \fIlast-version-used\fR
  1505. Personal configuration file only.
  1506. This is set automatically by Pine.
  1507. It is used to keep track of the last version of Pine that was run
  1508. by the user.
  1509. Whenever the version changes, a new version message is printed out.
  1510. If you toggle back and forth between two versions you'll get the message
  1511. every time, since it just checks for equality.
  1512.  
  1513.  
  1514.  
  1515. .uh "Retired Variables"
  1516. .(x
  1517. Retired Variables
  1518. .)x
  1519. .br
  1520. .lp
  1521. Variables that are no longer used by the current Pine version.  When
  1522. an obsolete variable is encountered, its value is applied to any
  1523. new corresponding setting and a comment is place before it noting that
  1524. it is no longer in used.  Several of the replaced values at the time of
  1525. this document include:
  1526.  
  1527. .ip \fIelm-style-save\fR
  1528. Replaced by 
  1529. .i saved-msg-name-rule
  1530.  
  1531. .ip \fIheader-in-reply\fR
  1532. Replaced by 
  1533. .i include-header-in-reply
  1534. in the
  1535. .i feature-list.
  1536.  
  1537. .ip \fIfeature-level\fR
  1538. Replaced by 
  1539. .i feature-list.
  1540.  
  1541. .ip \fIold-style-reply\fR
  1542. Replaced by
  1543. .i signature-at-bottom  
  1544. in the
  1545. .i feature-list.
  1546.  
  1547. .ip \fIsave-by-sender\fR
  1548. Replaced by 
  1549. .i saved-msg-name-rule.
  1550.  
  1551.  
  1552. .uh "Pine in Function Key Mode"
  1553. .(x
  1554. Pine in Function Key Mode
  1555. .)x
  1556. .br
  1557. .lp
  1558. The standard Pine uses alphabetic keys for most commands,
  1559. and control keys in the composer.
  1560. Despite possible appearances, the
  1561. current bindings are the result of much discussion and thought.
  1562. All the commands in the composer are single control characters.
  1563. This keeps things very neat and simple for users.
  1564. Two character commands in the composer are a possibility,
  1565. but we're trying to avoid them because of the added complexity for the user.
  1566. .lp
  1567. Pine can also operate in a function-key mode.
  1568. To go into this mode invoke
  1569. .i "pine -k"
  1570. or (on some UNIX systems)
  1571. .i pinef.
  1572. On a UNIX system, you can link or copy the  
  1573. .i pine  
  1574. executable to
  1575. .i pinef
  1576. to install
  1577. .i pinef.
  1578. Alternatively, users and systems administrators can set the
  1579. .i use-function-keys
  1580. feature in the personal or system-wide Pine configuration file.
  1581. The command menus at the bottom of the screen will show
  1582. .i 
  1583. F1-F12
  1584. .r
  1585. instead of the alphabetic commands.  In addition, the help screens will be
  1586. written in terms of function keys and not alphabetic keys.  
  1587. .lp
  1588. One of the
  1589. results of using Pine in function-key mode is that users can only choose
  1590. from twelve commands at any given time.  In alphabetic-key mode, a user can
  1591. press a key for a command (say, q to quit) and that command can be
  1592. fulfilled.  In function-key mode, the command must be visible on the bottom
  1593. key-menu in order to be used.  There are some screens where 34 commands
  1594. are operational; function-key users can get to all of them, just not all
  1595. at once.
  1596.  
  1597. .uh "Domain Settings"
  1598. .(x
  1599. Domain Settings
  1600. .)x
  1601. .br
  1602. .lp
  1603. Pine uses the default domain for a few different tasks.  First, it is tacked
  1604. onto the user-id for outgoing email.  Second, it is tacked onto all
  1605. "local" addresses in the "To:" or "Cc:" fields of messages being composed.
  1606. The domain name is also used to generate message-id lines for each
  1607. outgoing message and to allow Pine to check if an address is that of the
  1608. current Pine user. 
  1609. .lp
  1610. Pine determines the domain name according to whichever of these it finds. 
  1611. The list here is in decreasing order of precedence.
  1612. .ip 
  1613. (1) Value of the variable \fIuser-domain\fR in a personal configuration file
  1614. .ip
  1615. (2) Value of the variable \fIuser-domain\fR is a system-wide configuration
  1616. file
  1617. .ip
  1618. (3) Value from a local configuration database (\fI/etc/hosts\fR, DNS, NIS)
  1619. as modified by a personal configuration file if
  1620. \fIuse-domain-name-only\fR set to "yes"
  1621. .ip
  1622. (4) Value from a local configuration database (\fI/etc/hosts\fR, DNS, NIS)
  1623. as modified by a system configuration file if
  1624. \fIuse-domain-name-only\fR set to "yes"
  1625. .ip 
  1626. (5) Unmodified value from a local configuration database
  1627.  
  1628. .lp
  1629. The easiest way for this system to work is for PC-Pine users and UNIX Pine
  1630. system administrators to set the \fIuser-domain\fR variable.  The variable
  1631. \fIuse-domain-name-only\fR is helpful if your site
  1632. supports/requires hostless addressing but for some reason you don't want
  1633. to use the \fIuser-domain\fR variable.
  1634.  
  1635.  
  1636. .uh "Syntax for Collections"
  1637. .(x
  1638. Syntax for Collections
  1639. .)x
  1640. .br
  1641. .lp
  1642. In many environments, it is quite common to have collections of archived mail
  1643. on various hosts around the network.  Using the new collections facility
  1644. within Pine, access to these archives is just as simple as access to
  1645. folders on
  1646. Pine's local disk.  
  1647.  
  1648. "Collection" is the word we use in Pine to describe a set of folders. 
  1649. Folders within a defined collection 
  1650. can be manipulated
  1651. (opened, saved-to, etc) using just their simple name.  Any number
  1652. of folder collections can be defined, and pine will adjust its menus and
  1653. prompts to help navigate them.
  1654.  
  1655. The way collections are defined in Pine is with the \fIfolder-collections\fR
  1656. variable in the Pine configuration file.  \fIFolder-collections\fR takes a
  1657. list of one or more collections, each (optionally) preceded by a user-defined
  1658. logical name.  Once collections are defined, Pine adjusts its menus
  1659. and behavior to allow choosing files by their simple name within the
  1660. collection.  Collections are always defined in the configuration file;
  1661. there is no time that Pine will ever ask a question which requires a user
  1662. to input a collection specifier.
  1663.  
  1664. Consider the following:
  1665. .(l
  1666.    folder-collections=    Local-Mail    C:\MAIL\/[],
  1667.             Remote-Mail    {imap.u.example.edu}mail/[]
  1668. .)l
  1669.  
  1670. The example shows two collections defined (a comma separated list; newlines
  1671. in the list are OK if there's one or more spaces before the next entry),
  1672. one local and one remote.  Each collection is a space-delimited pair of
  1673. elements\-first an optional logical-name and second the collection
  1674. specifier.  The logical-name can have spaces if it has quotes around it
  1675. (but keeping the logical name short and descriptive works best). 
  1676. Pine will use the logical-name (if provided) to reference all
  1677. folders in the 
  1678. collection, so the user never has to see the ugliness of the collection
  1679. specifier.
  1680.  
  1681. The collection specifier can be thought of as an extended IMAP format
  1682. (see the "Remote Folders" section for a description of IMAP format names).
  1683. Basically, a pair of square-brackets are placed in the fully qualified IMAP
  1684. path where the simple folder name (the part without the hostname and path)
  1685. would appear.  Like IMAP, the path can be either fully qualified (i.e.,
  1686. with a leading '/') or relative to your home directory.  
  1687.  
  1688. An
  1689. advanced feature of this notation is that a pattern within the square
  1690. brackets allows the user to define a collection to be a subset of a
  1691. directory.  For example, a collection
  1692. defined with the specifier:
  1693. .(l
  1694.     M-Mail        C:\MAIL\/[m*]
  1695. .)l
  1696. will provide a view in the folder lister of all folders in the PC's
  1697. "C:\MAIL" directory that start with the letter 'm' (case insensitive under
  1698. DOS, of course).  Further, the wildcard matching will honor characters
  1699. trailing the '*' in the pattern.
  1700.  
  1701. From within Pine, the FOLDER LIST display will be adjusted to allow
  1702. browsing of the folders in any defined collection.  Even more, you'll
  1703. notice in the Goto and Save commands a pair of new sub-commands to toggle
  1704. through the list of logical collection names, so only a simple name need be
  1705. used to operate on a folder in any collection.
  1706.  
  1707. The first collection specified in the \fIfolder-collections\fR has special
  1708. signifigance.  That folder is the "default collection for saves".  In cases
  1709. where the user does not specify which collection should be used to save a
  1710. message, the default collection for saves will be used.  Also, if the
  1711. \fIdefault-fcc\fR is a relative file name, then it is relative to the
  1712. default collection for saves.
  1713.  
  1714. The notion of collections encompasses both email folders and news reading.
  1715. The current version of Pine supports very basic news reading. 
  1716. The variable \fInews-collections\fR uses nearly the same format as
  1717. \fIfolder-collections\fR.  Newsgroups can be defined for convenient access via
  1718. either IMAP or NNTP.
  1719. There are advantages and disadvantages to both access methods.  In the
  1720. IMAP case, your news environment state is maintained on the server and,
  1721. thus,
  1722. will be seen by any client.  The downside is that, at the moment, you must
  1723. have an account on the server.  In the NNTP case, server access is mostly
  1724. anonymous and no state/accounting need be maintained on it.  The downside
  1725. is that each client, for now, must individually maintain news environment
  1726. state.
  1727.  
  1728. An example pinerc entry might be:
  1729. .(l
  1730.      news-collections=    Remote-State    *{news.u.example.edu}[],
  1731.             Local-State    *{news.u.example.edu/nntp}[]
  1732. .)l
  1733. Note that each news collection must be preceded by a '*' to indicate non-mail
  1734. access.  Only newsgroups to which you are subscribed are included in the
  1735. collection.
  1736.  
  1737. The pattern matching facility can be applied so as to define a news
  1738. collection which is a subset of all the newsgroups you subscribe to.  For
  1739. example, this could be a valid collection:
  1740. .(l
  1741.             Newsfeed-News    *{news.u.example.edu/nntp}[clari.*]
  1742. .)l
  1743.  
  1744. We are in the process of fleshing out news reading (subscription
  1745. management, quasi-threading, etc) and hope to make it available as early
  1746. as Fall, 1993.  
  1747.  
  1748. Collection handling is a tough problem to solve in a general way, and the
  1749. explanation of
  1750. the syntax is a bit ugly.  The upside is, hopefully, that for a little
  1751. complexity in the Pine configuration file you get simple management
  1752. of multiple folders in diverse locations.
  1753.  
  1754.  
  1755. .uh "Syntax for Remote Folders"
  1756. .(x
  1757. Syntax for Remote Folders
  1758. .)x
  1759. .br
  1760. .lp
  1761. Remote folders are distinguished from local folders by a leading
  1762. hostname bracketed by '{' and '}'.  The path and folder name immediately
  1763. following the closing bracket, '}', is interpreted by the IMAP server
  1764. and is in a form compatible with that server (i.e., path delimiters and
  1765. naming syntax relative to that server).
  1766. .lp
  1767. Typically, a folder name without any path description is understood to
  1768. reside in the user's "home directory" (i.e., in some way the user's personal,
  1769. writable file area), as are incomplete path designations.  An example of 
  1770. a remote folder specification would be,
  1771. .(l
  1772.     {mailhost.cac.washington.edu}mail/saved-messages
  1773. .)l
  1774. This example simply specifies a folder named
  1775. .q "saved-messages"
  1776. on the imap server 
  1777. .q "mailhost.cac.washington.edu",
  1778. in the 
  1779. .q "mail"
  1780. subdirectory of the user's home directory.  Easy isn't it?
  1781. .lp
  1782. To confuse things a bit, qualifiers are permited within the brackets 
  1783. following the host name.  These qualifiers consist of a slash, '/'
  1784. character followed by a keyword or keyword and value equality, and 
  1785. have the effect of modifying how the connection is made to the 
  1786. host specified.  An example of such a specification might be,
  1787. .(l
  1788.     *{pine.cac.washington.edu/anonymous}updates
  1789. .)l
  1790. Another example might be,
  1791. .(l
  1792.     *{news.u.washington.edu/nntp}comp.mail.mime
  1793. .)l
  1794. .lp
  1795. Both of these examples illustrate a different qualifier.  The first, 
  1796. specifying 
  1797. .q "anonymous"
  1798. access to the IMAP server on
  1799. .q "pine.cac.washington.edu".
  1800. The second is interesting in that it specifies an altogether different
  1801. access method: access via the Network News Transport Protocol (NNTP).
  1802. Both examples bring to light one remaining subtlety.  The leading
  1803. .q "*"
  1804. tells pine to treat the remote folder as a Bulletin-Board (i.e., typically
  1805. a shared, read-only resource) and to adjusts its behavior accordingly.
  1806.  
  1807. .uh "Sorting a Folder"
  1808. .(x
  1809. Sorting a Folder
  1810. .)x
  1811. .br
  1812. .lp
  1813. The mail index may be sorted by subject, size, sender, date, or arrival order.
  1814. Each sort order can also be reversed.
  1815. The \fI$\fR command will prompt the user for the sort order.
  1816. The sort order can also be specified on the command line with the
  1817. .i -sort
  1818. flag or (equivalently) with the
  1819. .i sort-key
  1820. variable in the
  1821. .i .pinerc
  1822. file.
  1823. When a user changes folders, the sort order will go
  1824. back to the original sort order.
  1825. The command line (\fI-sort\fR) or configuration file sort specification
  1826. (\fIsort-key\fR) changes the original sort order.
  1827. .lp
  1828. When a folder is sorted and new mail arrives in the folder it will be
  1829. inserted in its properly sorted place.
  1830. This can be a little odd when the folder is sorted
  1831. by something like the subject.
  1832. It can also be a little slow if you are viewing a large, sorted INBOX, since
  1833. the INBOX will have to be re-sorted whenever new mail arrives.
  1834. .lp
  1835. The sorts are all independent of case and ignore leading or trailing
  1836. white space.
  1837. The subject sort ignores "Re:" at the beginning and "(fwd)" at the end.
  1838. The sort by sender sorts by the userid, not the full name.
  1839. The arrival sort is basically no sort at
  1840. all and the date sort depends on the format of the date.
  1841. Some dates are in strange formats and are unparsable.
  1842. The time zone is also taken into account.
  1843. .lp
  1844. Sorting large mail folders can be very slow since it requires fetching
  1845. all the headers of the mail messages.
  1846. With UNIX Pine, only the first sort is
  1847. slow since Pine keeps a copy of all the headers.
  1848. One exception is sorting in reverse arrival order.
  1849. This is fast because no headers have to be examined.
  1850. Pine will show progress as it is sorting.
  1851.  
  1852. .uh "Alternate Editor"
  1853. .(x
  1854. Alternate Editor
  1855. .)x
  1856. .br
  1857. .lp
  1858. In the Pine composer you can use any text editor, such as
  1859. .i vi
  1860. or
  1861. .i emacs,
  1862. for composing the message text.
  1863. The addresses and subject still must be
  1864. edited using the standard Pine composer.
  1865. It operates in one of two ways.
  1866. If you include the feature
  1867. .i enable-alternate-editor-cmd
  1868. in your
  1869. .i .pinerc
  1870. you can type
  1871. .i ^_
  1872. while in the composer and be prompted for the editor.
  1873. If you also set the
  1874. .i editor
  1875. variable in your
  1876. .i .pinerc
  1877. then
  1878. .i ^_
  1879. will invoke the configured editor when you type it.
  1880. .lp
  1881. We know that many people would like to use the custom editor to edit
  1882. the mail header as well.
  1883. We considered several designs for this and
  1884. didn't come up with one that we liked and that was easy to implement.
  1885. One of the main problems is that you lose access to the address book.
  1886. We also understand that many people would like an option for the alternate
  1887. editor to be invoked automatically.
  1888. There will probably be further discussion on this!
  1889.  
  1890. .uh "Signatures and Signature Placement"
  1891. .(x
  1892. Signatures and Signature Placement
  1893. .)x
  1894. .br
  1895. .lp
  1896. If the file \fI~/.signature\fR (UNIX) or 
  1897. .i $HOME\\\PINE\\\PINE.SIG
  1898. (DOS) exists, 
  1899. it will be included in all outgoing messages.
  1900. It is included before composition starts so that the user has a chance to
  1901. edit it out if he or she likes.
  1902. The file name for the signature can be changed by setting the
  1903. .i signature-file
  1904. variable in the
  1905. .i .pinerc.
  1906. There is no way to have Pine include different signatures in different
  1907. outgoing messages automatically.  You can do this by hand, however, by
  1908. having multiple signature files (\fI.sig1, .sig2, .sig3, etc\fR) and
  1909. choosing to include (^R in the composer) the correct one for the message 
  1910. being sent. 
  1911. .lp
  1912. Pine encourages the user to put
  1913. his or her contribution before the inclusion of the original text of the
  1914. message being forwarded or replied to, 
  1915. This is contrary to some
  1916. conventions, but makes the conversation more readable when a long 
  1917. original message is included in a reply for context.
  1918. The reader doesn't have to scroll through the original text that
  1919. he or she has probably already seen to find the new text.
  1920. If the reader wishes to see the old
  1921. message(s), the reader can scroll further into the message.
  1922. Users who perfer to add their input at the end of a messaage should set
  1923. the 
  1924. .i signature-at-bottom
  1925. feature in the \fIfeature-list\fR.
  1926. The signature
  1927. will then be appended to the end of the message after any included text.
  1928.  
  1929.  
  1930. .uh "Feature List Variable"
  1931. .(x
  1932. Feature List Variable
  1933. .)x
  1934. .br
  1935. .lp
  1936. Pine used to have \fIfeature levels\fR for users with different amounts
  1937. of experience.
  1938. We found that this was too restrictive.
  1939. Pine now has a
  1940. .i feature-list 
  1941. instead.
  1942. The old feature
  1943. .i feature-level=old-growth
  1944. is still supported as a macro by translating it into a particular set
  1945. of features, but it is now also possible for each user to pick and choose
  1946. which features they would like enabled.
  1947. More features (options) will no doubt continue to be added.
  1948.  
  1949.  
  1950. .uh "Additional Notes on PC-Pine"
  1951. .(x
  1952. Additional Notes on PC-Pine
  1953. .)x
  1954. .br
  1955. .lp
  1956. Below are a few odds and ends worth mentioning about PC-Pine.  They
  1957. have to do with DOS-specific behavior that is either necessary or 
  1958. useful (and sometimes both!).
  1959. .lp
  1960. As PC-Pine runs in an environment with limited access control, 
  1961. accounting or auditing, either of two additional lines are 
  1962. automatically inserted into the header of mail messages generated
  1963. by PC-Pine.  These lines are 
  1964. .(l
  1965.     X-Warning: UNAuthenticated Sender
  1966. .)l
  1967. and
  1968. .(l
  1969.     X-Sender: <userid>@<imap.host>
  1970. .)l
  1971. .lp
  1972. Which of the two headers is inserted depends on whether a 
  1973. successful imapd login has been established at the time the 
  1974. message is sent.  This feature can only be
  1975. disabled by recompiling PC-Pine.  Also, this should not be
  1976. considered a rigorous form of authentication.  It is extremely
  1977. lightweight, and is not a replacement for true authentication.
  1978. .lp
  1979. Hand in hand with authentication and accounting is user information. 
  1980. Since PC-Pine has no user database to consult for user-id, personal-name,
  1981. etc., necessary information must be provided by the user/installer before
  1982. PC-Pine can properly construct the "From" address required for
  1983. outbound messages.  As required editing of the \fIPINERC\fR is 
  1984. somewhat clumsy, 
  1985. PC-Pine will, by default, prompt for the requisite pieces as they are
  1986. needed.  This information corresponds to the \fIPINERC\fR variables
  1987. user-id, personal-name, user-domain, and smtp-server.
  1988. .lp
  1989. The user is then asked whether or not this information should
  1990. automatically be saved to the \fIPINERC\fR.  This is useful behavior
  1991. in general, but can lead to problems in a lab or other shared environment.
  1992. Hence, these prompts and automatic saving of configuration can be turned 
  1993. off on an entry by entry basis by setting any of the above values in
  1994. the \fIPINERC\fR to 
  1995. the null string (i.e., a pair of double quotes).  This means that the 
  1996. user will be prompted for the information once during each pine session, 
  1997. and no opportunity to save them in the \fIPINERC\fR will be offered.
  1998.  
  1999. .lp
  2000. Along similar lines, a feature allowing automatic login 
  2001. to the imap-server containing the user's \fIINBOX\fR has also been requested.
  2002. This feature is not enabled by default, but requires the existance of
  2003. the file named \fIPINE.PWD\fR in the same directory as the \fIPINERC\fR.
  2004. Even with the existance of this file, the user must still 
  2005. acknowledge a prompt before the password is saved to the file.
  2006. .lp
  2007. \fIWARNING\fR!  Use this feature with caution!  
  2008. It effectively makes the user's mail no more secure than the 
  2009. physical security of the machine running PC-Pine.  What's more,
  2010. while the password
  2011. is cloaked by a mild (some might say, feeble) encryption scheme, it is
  2012. nonetheless sitting in a file on the PC's disk and subject to cracking by
  2013. anyone with access to it.  \fIBEWARE\fR!
  2014.  
  2015. .lp
  2016. Another feature of DOS is the lack of standard scratch area for temporary
  2017. files.  During the course of a session, PC-Pine may require numerous 
  2018. temporary files (large message texts, various caches, etc.).
  2019. Where to create them can be a problem, particularly
  2020. when running under certain network operating systems.  PC-Pine observes 
  2021. the \fITMP\fR and \fITEMP\fR environment variables, and creates
  2022. temporary files in the directory specified by either.  In their absense,
  2023. PC-Pine creates these files in the root of the current working drive.
  2024.  
  2025.  
  2026.  
  2027. .bp
  2028. .sz 16
  2029. .ce 1
  2030. .b "Section 6\\-Behind the Scenes"
  2031. .(x
  2032. .b "Section 6\\-Behind the Scenes"
  2033. .)x
  2034. .sz 12
  2035. .sp 0.3i
  2036. .lp
  2037. Many people ask how certain Pine features are implemented.  This section
  2038. outlines some of the more interesting details.  For more information, you
  2039. would have to ask the developers or take a look at the source code.
  2040.  
  2041.  
  2042. .uh "Address Books"
  2043. .(x
  2044. Address Books
  2045. .)x
  2046. .br
  2047. .lp
  2048. The address book is stored in the user's home directory in the file
  2049. .i .addressbook
  2050. (UNIX) or in the 
  2051. .i "\\\PINE"
  2052. directory as the file \fIADDRBOOK\fR (DOS).  In either case, the address
  2053. book is a simple text file.
  2054. The lines are of the format:
  2055. .(l I
  2056.           <nickname>TAB<fullname>TAB<address>
  2057. .)l
  2058. If the entry is an address list then <address> is of the format:
  2059. .(l I
  2060.           (<address>,<address>,<address>,......)
  2061. .)l I
  2062. Normally entries are one per line unless it is a list and then the
  2063. entry extends until the closing parenthesis.
  2064. If lines are encountered
  2065. in the address book that don't fit the format (they don't have
  2066. two tabs) they are ignored.
  2067. An older format is also supported where
  2068. the address lists don't have parentheses.
  2069. Spaces are not allowed in nick names.
  2070. .lp
  2071. Entries in the address book may refer to other entries in the address book.
  2072. Lists may be nested.
  2073. If addresses refer to each other in a loop this is detected and flagged.
  2074. The address will be changed to "**** address loop ****".
  2075. .lp
  2076. The address book file is rewritten by Pine frequently in the format it
  2077. thinks 
  2078. proper so comments or other formatting introduced with a text editor
  2079. will not be maintained.
  2080. .lp
  2081. The address book format is simple, so writing script and programs to
  2082. modify and/or convert address books should be simple.  Some such
  2083. conversion programs are included in the Pine distribution in the
  2084. \fIcontrib\fR directory.
  2085. .lp
  2086. The address book is kept sorted in order by the full name field.
  2087. In order for this to be sensible the full names should be last name, then
  2088. comma, then first name.
  2089. Pine makes an attempt to encourage use of this format.
  2090. It will reverse the order of any names that have a single comma in them
  2091. when they are in addresses on outgoing mail so that it will be formatted
  2092. first name followed by last name.
  2093. The
  2094. .i TakeAddr
  2095. command that captures addresses off
  2096. incoming messages also attempts to reverse the name as it is inserted,
  2097. though it doesn't always succeed.
  2098. The way it works can probably be improved.
  2099. .lp
  2100. When the address book is written out, it is first written to a
  2101. temporary file and if that write is successful it is renamed correctly.
  2102. This guards against errors writing the file that might
  2103. destroy the whole address book.
  2104. The address book is written after each change.
  2105. .lp
  2106. There are two 
  2107. .q "known weaknesses" 
  2108. in the Pine address book scheme\-both of which are being worked on. 
  2109. First, a user can only have 1 address book.  There is no way to have a
  2110. global (system-wide) address book and a personal one.  Secondly, the
  2111. address book must be on the same machine as Pine.  You cannot, at the
  2112. moment, share an address book between Pine and PC-Pine.
  2113.  
  2114. .uh "Checkpointing"
  2115. .(x
  2116. Checkpointing
  2117. .)x
  2118. .br
  2119. .lp
  2120.  
  2121. Periodically Pine will save the whole mail folder to disk to
  2122. prevent loss of any mail or mail status in the case that Pine gets
  2123. interrupted,
  2124. disconnected, or crashes.
  2125. The period of time Pine waits to do the
  2126. checkpoint is calculated to be minimally intrusive.
  2127. The timing can be changed (but usually isn't) at compile time.  Folder
  2128. checkpointing happens for both local folders and those being accessed with
  2129. IMAP.
  2130. The delays are divided into three categories:
  2131.  
  2132. .ip "Good Time:"  1.5i
  2133. This occurs when Pine has been idle for more than 30 seconds.
  2134. In this case Pine will checkpoint if 12 changes to the file have been made or
  2135. at least one change has been made and a checkpoint hasn't been done
  2136. for five minutes.
  2137.    
  2138. .ip "Bad Time:"   1.5i
  2139. This occurs just after Pine has executed some command.
  2140. Pine will checkpoint if there are 36 outstanding changes to the mail file
  2141. or at
  2142. least one change and no checkpoint for ten minutes.
  2143.  
  2144. .ip "Very Bad Time:" 1.5i
  2145. Done when composing a message.
  2146. In this case, Pine will only checkpoint   
  2147. if at least 48 changes have been made or one change has been made in
  2148. the last twenty minutes with no checkpoint.
  2149.  
  2150.  
  2151. .uh "Debug Files"
  2152. .(x
  2153. Debug Files
  2154. .)x
  2155. .br
  2156. .lp
  2157. If UNIX Pine is compiled with the compiler 
  2158. .i DEBUG
  2159. option on (the current default), then Pine will produce debugging output 
  2160. to a file. The file is normally
  2161. .i .pine-debugX
  2162. in the user's home directory where
  2163. .i X
  2164. goes from 1 to 4.
  2165. Number 1 is always the most recent session and 4 the oldest.
  2166. Four are saved because often the user has gone in and out of Pine a few
  2167. times after a problem has occurred before the expert actually gets to
  2168. look at it.
  2169. The amount of output in the debug files varies with the debug level set 
  2170. when Pine is compiled and/or as a command line flag.
  2171. The default is level 2.
  2172. This shows very general things and records errors.
  2173. Level 9 produces copious amounts of output for each keystroke.
  2174. .lp
  2175. PC-Pine does not produce debug files.
  2176.  
  2177. .uh "Filters"
  2178. .(x
  2179. Filters
  2180. .)x
  2181. .br
  2182. .lp
  2183. Pine is not designed to process email messages as they are delivered;
  2184. rather Pine depends on the fact that some other program (sendmail, etc)
  2185. will deliver messages and Pine simply reads the email folders which that
  2186. "other" program creates.  For this reason, Pine cannot filter incoming
  2187. email into different folders.  It can, however, work alongside most of the
  2188. programs available over the Internet which perform this task.  Pine is
  2189. known to operate successfully with the Elm filter program and with Procmail.
  2190. .lp
  2191. Design changes in Pine 3.8x facilitate Pine users filtering email.  You
  2192. still have to get a filtering program and configure it correctly, but Pine
  2193. now allows users to specify a set of \fIincoming-folders\fR.  Pine
  2194. will separate out all the folders listed as \fIincoming-folders\fR and
  2195. offer convenient access to these.  We hope that in the future Pine will be
  2196. able to offer new message counts for all of the incoming folders.
  2197.  
  2198.  
  2199. .uh "Folder Formats"
  2200. .(x
  2201. Folder Formats
  2202. .)x
  2203. .br
  2204. .lp
  2205. A folder is a group of messages.
  2206. The default format used by Pine is the Berkeley mail format.
  2207. It is also used by the standard
  2208. .i mail
  2209. command and by
  2210. .i elm.
  2211. Pine also understands folders in other formats.  UNIX Pine understands
  2212. Tenex and netnews as well.
  2213. PC-Pine reads
  2214. and writes
  2215. folders on the PC itself in a special format called MTX.  Near as we can
  2216. tell, PC-Pine is the only program to use the MTX format.  
  2217. Pine has also
  2218. been used with Carmel, mh, MMDF and mbox format mailboxes.  For
  2219. more information about
  2220. the carmel format, see the directory \fI./contrib/carmel\fR in the Pine
  2221. distribution.
  2222.  
  2223. .ip "Berkeley Mail Format"
  2224. This format comes to us from the ancient UNIX mail program,
  2225. .i /bin/mail.
  2226. (Note that this doesn't have anything to do with Berkeley, but we call
  2227. it the Berkeley mail file format anyway.)
  2228. This program was actually used to interactively read mail at one time,
  2229. and is still used on many systems as the local delivery agent.
  2230. In the Berkely mail format, a folder is a simple text file.  Each message
  2231. (including the first) must start with a separator line which takes
  2232. approximately the form:
  2233. .(l
  2234.     From juser@u.example.edu  Wed Aug 11 14:32:33 1993
  2235. .)l
  2236. .ip
  2237. Each message ends with two blank lines.  There are actually several
  2238. different variations in the date part of the string, twenty at last count.
  2239. Because of the format of the
  2240. separators, no lines in the mail message can
  2241. begin with "From ", space included, so they are modified to be ">From ".
  2242. You'll see this occasionally in mail messages.  The message delivery
  2243. program (not Pine) enforces this restriction.
  2244. You can fool Pine into thinking a file is a mail folder by adding a
  2245. message separator at the beginning of the file and wherever you want
  2246. message boundaries.
  2247. The vast majority of INBOXes Pine reads and folders it writes are of this
  2248. format.
  2249.  
  2250. .ip "Tenex and MTX Formats"
  2251. The Tenex format of file uses a single file per folder.  Normally, the
  2252. file name ends with \fI.txt\fR.  The file format consists of a header line
  2253. followed by the message text for each message.  The header is in one of two
  2254. forms:
  2255. .(l
  2256.     dd-mmm-yy hh:mm:ss-zzz,n;ffffffffffff
  2257.     dd-mmm-yyyy hh:mm:ss sssss,n;ffffffffffff
  2258. .)l
  2259. .ip
  2260. and is immediately followed by a newline (and the message text).
  2261. .(l
  2262.  
  2263.     The fields in the formats are:
  2264.     dd    two-digit day of month (leading space if a single-digit day)
  2265.     mmm    three-letter English month name (Jan, Feb, etc.)
  2266.     yy    two-digit year in 20th century (obsolete)
  2267.     yyyy    four-digit year
  2268.     hh    two-digit hour in 24-hour clock (leading zero if single-digit)
  2269.     mm    two-digit minute (leading zero)
  2270.     ss    two-digit second (leading zero)
  2271.     zzz    three-letter North American timezone (obsolete)
  2272.     sssss    signed four-digit international timezone as in RFC 822
  2273.     n    one or more digits of the size of the following message in
  2274.         bytes
  2275.     ffffffffffff
  2276.         twelve-digit octal flags value
  2277. .)l
  2278. Punctuation is as given above.
  2279.  
  2280. .ip
  2281. The time in the header is the time that message was written to the
  2282. folder.  The flags are interpreted as follows: the high order 30 bits are 
  2283. used
  2284. to indicate user flags, the next two bits are reserved for future usage, the
  2285. low four bits are used for system flags (010 = answered, 04 = flagged urgent,
  2286. 02 = deleted, 01 = seen).  Mail is automatically moved from 
  2287. \fI/usr/spool/mail\fR into \fImail.txt\fR in the
  2288. user's home directory if the \fImail.txt\fR file exists.
  2289.  
  2290. .ip
  2291. The MTX format is identical to the tenex format, with two 
  2292. exceptions: the
  2293. folder name ends with \fI.MTX\fR instead of \fI.txt\fR (this is a 
  2294. requirement in
  2295. the MTX format), and DOS-style CR/LF newlines are used instead of UNIX-style
  2296. LF newlines.
  2297.  
  2298.  
  2299. .ip "Netnews Format"
  2300. The netnews format is a read-only format which uses directories under
  2301. /usr/spool/news as folders.  The \fI/usr/spool/news/\fR prefix is removed and
  2302. all subsequent 
  2303. .q / 
  2304. (slash) characters are changed to 
  2305. .q .
  2306. (period).  
  2307. For example, the
  2308. netnews folder name \fIcomp.mail.misc\fR refers to the directory name
  2309. \fI/usr/spool/news/comp/mail/misc\fR.  In addition, the news folder name 
  2310. must appear
  2311. in the file /usr/lib/news/active for it to be recognized.  Individual 
  2312. messages
  2313. are stored as files in that directory, with filenames being the ASCII 
  2314. form of
  2315. a number assigned to that message.
  2316.  
  2317.  
  2318.  
  2319. .uh "Folder Locking"
  2320. .(x
  2321. Folder Locking
  2322. .)x
  2323. .br
  2324. .lp
  2325. There are two kinds of locking which Pine has to worry about.  The first
  2326. might be called program-contention locking.  This affects the times when a
  2327. program is performing actual updates on a folder.  An update might be a
  2328. message delivery program appending a message (\fIsendmail\fR delivering a
  2329. message to an INBOX), status changes (checkpoints by Pine every few
  2330. minutes) or deletion of messages (an expunge in Pine).  For moderate sized
  2331. mail messages, these operations should not last for more than a few seconds.
  2332. The second kind of locking has to do with user-contention situations. 
  2333. This would be the case when one folder is shared by a group of people or
  2334. even when one person starts multiple email sessions all of which access
  2335. the same folders and INBOX.
  2336. .lp
  2337. There are two standard locking mechanisms which handle program-contention
  2338. locking.  To be on the safe side, Pine implements both of them.  The older
  2339. mechanism places a file \fIxxxx.lock\fR (where \fIxxxx\fR is the name of
  2340. the file being locked) in the same directory as the file being locked. 
  2341. This makes use of the fact that directory operations are atomic in
  2342. UNIX and mostly works across NFS.
  2343. There are involved algorithms used to determine if a lock
  2344. has been held for an excessive amount of time and
  2345. should be broken.  The second program-contention locking mechanism uses
  2346. the 
  2347. .i flock()
  2348. system call on the mailbox.
  2349. This is much more efficient and the locks can't get stuck because
  2350. they go away when the process that created them dies.
  2351. This is usually found on 4BSD and related machines.
  2352. .lp
  2353. In addition to these, Pine\-\-through the c-client library\-\-provides robust
  2354. locking which prevents several users 
  2355. (or several instances of the same user) having a mail file open (for
  2356. update) at once.
  2357. This user-contention lock is held the entire time that the folder is in use.
  2358. .lp
  2359. With IMAPd 7.3(63) and Pine 3.84 and higher, the second Pine session which 
  2360. attempts to open a folder with Pine will 
  2361. .q "win."
  2362. That is to say, the second session will have read/write access to the
  2363. folder.  The first user's folder will become read-only.
  2364. (Note that this is exactly the opposite of the behavior prior to Pine 3.84
  2365. where the second open was read-only.
  2366. Having the second open be read-write seems to match more closely
  2367. with what users would like to have happen in this situation.)
  2368. Pine's additional locking is only effective
  2369. against multiple uses of Pine or other programs using the c-client library,
  2370. such as 
  2371. .i 
  2372. MailManager, ms, IMAPd
  2373. .r
  2374. and a few others.  Beginning with Pine 3.85, there is an \fI-o\fR command 
  2375. line flag to intentionally open a mailbox read-only.
  2376. .lp
  2377. Pine locking on UNIX systems works by creating lock files in
  2378. .i /tmp
  2379. of the form
  2380. .i 
  2381. \\usr\\spool\\mail\\joe.
  2382. .r 
  2383. The system call 
  2384. .i flock()
  2385. is then used on these files; the existence of the file alone does not
  2386. constitute a lock.
  2387. This lock is created when the folder is opened and destroyed when it is
  2388. closed.
  2389. When the folder is actually being written, the standard UNIX locks
  2390. are also created.
  2391. .lp
  2392. If a folder is modified by some other program while Pine has it open,
  2393. Pine will give up on that mail file, concluding it's best not to do
  2394. any further reads or writes.   
  2395. This can happen if another mailer that doesn't observe Pine's user-contention 
  2396. locks (e.g.
  2397. .i elm
  2398. or
  2399. .i mail)
  2400. is run while Pine has the mail folder open.  Pine checkpoints files every
  2401. few minutes, so little data can be lost in these situations.
  2402. .lp
  2403. PC-Pine does not do any folder locking.  It depends on IMAP servers to
  2404. handle locking of remote folders.  It is assumed that only one Pine
  2405. session can be running on the PC at a time, so there is no contention
  2406. issue around folders on the PC itself.
  2407.  
  2408.  
  2409. .uh "INBOX and Special Folders"
  2410. .(x
  2411. INBOX and Special Folders
  2412. .)x
  2413. .br
  2414. .lp
  2415. The 
  2416. .i INBOX
  2417. folder is treated specially.
  2418. It is normally kept open constantly so that the arrival of
  2419. new mail can be detected.
  2420. The name
  2421. .i INBOX
  2422. refers to wherever new mail is retrieved on the system.
  2423. If the
  2424. .i inbox-path
  2425. variable is set, then 
  2426. .i INBOX
  2427. refers to that.  IMAP servers understand the concept of \fIINBOX\fR, 
  2428. so specifying the folder \fI{imap.u.example.edu}INBOX\fR is meaningful. 
  2429. The case of the word INBOX is not important, but Pine tends to display it
  2430. in all capital letters.
  2431. .lp
  2432. The folders for sent mail and saved messages
  2433. folders are also somewhat special.
  2434. They are automatically created if they are absent and recreated if
  2435. they are deleted.
  2436.  
  2437.  
  2438. .uh "Internal Help Files"
  2439. .(x
  2440. Internal Help Files
  2441. .)x
  2442. .br
  2443. .lp
  2444. The file
  2445. .i pine.hlp
  2446. in the
  2447. .i pine
  2448. subdirectory
  2449. contains all the help text for Pine.
  2450. On UNIX, it is compiled right into the Pine binary as strings.
  2451. This is done to simplify installation and configuration.
  2452. The
  2453. .i pine.hlp
  2454. file is in a special format that is documented at the beginning of the file.
  2455. It is divided into sections, each with a name that winds up
  2456. being referenced as a global variable.
  2457. Some special formatting rules are used to keep things lined up and to allow
  2458. for substitutions in
  2459. the help text depending on whether the Pine session uses function keys
  2460. or the standard alphabetic/mnemonic keys.
  2461. This file is processed by two awk scripts and turned into C files that are
  2462. compiled into Pine.
  2463. .lp
  2464. This scheme can increase efficiency because Pine can be compiled to have the
  2465. strings as part of shared, read-only text.
  2466. Rather than each process having to read in the help text from a file,
  2467. the strings are shared by all executing processes on the machine and
  2468. demand paged.  This works on machines that
  2469. have separate instruction and data space, but is only fully implemented in
  2470. the NeXT (tested) and Dynix (not tested) ports.
  2471. .lp
  2472. PC-Pine, which tries to run on machines with as little as 640k of memory, 
  2473. leaves
  2474. the Pine help text out of the executable.  \fIPINE.EXE\fR, \fIPINE.HLP\fR,
  2475. and \fIPINE.NDX\fR are all needed for PC-Pine's help system.
  2476.  
  2477.  
  2478. .uh "International Character Sets"
  2479. .(x
  2480. International Character Sets
  2481. .)x
  2482. .br
  2483. .lp
  2484. While Pine was designed in the U.S. and used mostly for English-language
  2485. correspondence, it is a goal for Pine to handle email in almost any
  2486. language.  Many sites outside of the U.S. run Pine in their native
  2487. language.  The default character set for Pine is US-ASCII.  That
  2488. can be changed in the personal or system-wide configuration file with the
  2489. variable \fIcharacter-set\fR.
  2490.  
  2491. .lp
  2492. When reading incoming email, Pine allows all character sets to pass through.
  2493. Pine doesn't actually display the
  2494. characters but simply passes them through; it is up to the actual display device
  2495. to show the characters correctly.  When composing email, Pine will accept
  2496. input in any language and tag the message according to the 
  2497. \fIcharacter-set\fR variable.  Again, it is up to the input device to
  2498. generate the correct sequences for the character set being used.
  2499. The outgoing message is checked to see if it is all US-ASCII text (and
  2500. contains no escape characters).  In that
  2501. case, the text will be labeled as US-ASCII even if the \fIcharacter-set\fR
  2502. variable is set to something else.  The theory is that every reasonable
  2503. character set will have US-ASCII as a subset, and that it makes sense to
  2504. label the text with the lowest-common-denominator label so that more
  2505. mailers will be able to display it.
  2506. .lp
  2507. The character sets are:
  2508. .(l
  2509. US-ASCII        Standard 7 bit English characters
  2510. ISO-8859-1      8 bit European "latin 1" character set
  2511. ISO-8859-2      8 bit European "latin 2" character set
  2512. ISO-8859-3      8 bit European "latin 3" character set
  2513. ISO-8859-4      8 bit European "latin 4" character set
  2514. ISO-8859-5      8 bit Cyrillic
  2515. ISO-8859-6      8 bit Arabic
  2516. ISO-8859-7      8 bit Greek   
  2517. ISO-8859-8      8 bit European "latin 5"" character set
  2518. ISO-8859-9      8 bit Hebrew
  2519. ISO-2022-JP     Japanese
  2520. .)l
  2521.  
  2522. In all of these except Japanese, the lower 7 bits are the same as US-ASCII.
  2523. Even in Japanese, the character set is the same as US-ASCII unless it has been
  2524. shifted to an alternate interpretation.
  2525. .lp
  2526. Earlier versions of Pine made use of the character set tags associated
  2527. with text in MIME to decide if the text should be displayed or not.
  2528. Depending on the character set tag and the \fIcharacter-set\fR variable
  2529. in Pine, the text was either displayed as is, displayed with some characters
  2530. filtered out, or not displayed at all.
  2531. The current version uses a much simpler algorithm in order to maximize the
  2532. chance that useful contents are readable by the user.
  2533. It simply displays \fBall\fR messages of type text and
  2534. makes no attempt to filter out
  2535. characters that may be in the wrong character set.
  2536. If the text is tagged as something other than US-ASCII and the tag does
  2537. not match the character set that the \fIcharacter-set\fR variable is set
  2538. to, then a warning is printed at the start of the message.  In that case,
  2539. it is possible that the text will be displayed incorrectly.  For example,
  2540. if the text is one variant of ISO-8859 and the display device is another
  2541. variant, some of the characters may show up on the screen as the wrong
  2542. character.  Or if the text is Japanese and the display device is not, some
  2543. parts of the message may be total gibberish (which will look like ASCII
  2544. gibberish).  On the other hand, the parts of the Japanese message that really
  2545. are US-ASCII will be readable in the midst of the gibberish.
  2546. .lp
  2547. In the case of PC-Pine, the character values cannot be passed thru
  2548. to the display device unaltered since MS-DOS uses various non-standard 
  2549. character sets called "Code Pages".
  2550. .lp
  2551. The mapping between DOS Code Page and standard character set is 
  2552. controlled by the "character-set" variable in the PINERC file and 
  2553. the PC's installed Code Page.  PC-Pine will automatically 
  2554. map common characters in IBM Code Pages 437, 850, 860, 863, and 865 to 
  2555. ISO-8859-1 and back when the PINERC has "character-set=ISO-8859-1".
  2556. Pine will also map common characters for IBM Code Page 866 to ISO-8859-5 and 
  2557. back when "character-set=ISO-8859-5".  The mappings are bi-directional,
  2558. and applied to all saved text attachments in the defined character set, 
  2559. messages exported, etc. 
  2560. .lp
  2561. Alternatively, the translation tables can be configured externally and
  2562. applied at run time whenever the "character-set=" variable is set to 
  2563. something other then "US-ASCII" (the default).  PC-Pine looks in the text
  2564. file pointed to by the environment variable "ISO_TO_CP" for the table to 
  2565. use for mapping text matching the type defined by the "character-set=" 
  2566. variable into the local Code Page value.  PC-Pine looks in the text file 
  2567. pointed to by the environment variable "CP_TO_ISO" for the table to use
  2568. for mapping text in the local Code Page into outbound text tagged with the
  2569. "character-set=" variable's value. 
  2570. .lp
  2571. A text file containing a character set mapping table is expected to
  2572. contain 256 elements where each element is a decimal number separated from
  2573. the next element by white-space (space, tab or newline, but no commas!).
  2574. The index of the element is the character's value in the source character
  2575. set, and the element's value is the corresponding character's value in the
  2576. destination character set.
  2577.  
  2578.  
  2579. .uh "Interrrupted and Postponed Messages"
  2580. .(x
  2581. Interrupted and Postponed Messages
  2582. .)x
  2583. .br
  2584. .lp
  2585. If the user is composing mail and is interrupted by being disconnected
  2586. (SIGHUP, SIGTERM or end of file on the standard input), Pine will save the
  2587. interrupted composition and allow the user to continue it when he or she
  2588. resumes Pine.
  2589. As the next Pine session starts, a message will be given that an interrupted
  2590. message can be continued 
  2591. To continue the interrupted message, simply go into the composer.
  2592. To get rid of the interrupted message, go 
  2593. into the composer and then cancel the message with
  2594. .i ^C.
  2595. .lp
  2596. Composition of a half-done message may be postponed to a later time by
  2597. giving the \fI^O\fR command.
  2598. Other messages can be composed while a postponded message waits, but
  2599. there can only be 
  2600. one message may be postponed at a time.
  2601. We would like Pine to be able to have more than one postponed
  2602. message, but haven't got around to it mostly because some work would
  2603. have to be done to make the user interface nice.   
  2604. Postponing is a good way to quickly reference other messages while composing.
  2605. .lp
  2606. There are some problems postponing messages that have MIME attachments
  2607. or characters from non-US-ASCII character sets.  With attachments, the
  2608. postponed message will only store a
  2609. reference to the file and not the actual file, so the file should not be
  2610. deleted or renamed until the message is sent.  Non-file attachments, the
  2611. results of forwarding or replying to a MIME message, will be dropped. 
  2612. Postponded messages with non-US-ASCII characters will not be decoded upon
  2613. resumption, so some odd things like "=D6" may appear where special
  2614. characters were.
  2615. .lp
  2616. The interrupted and postponed messages are saved in a special directory on
  2617. the local machine.  You can specify which directory by setting the
  2618. \fImail-directory\fR variable in the Pine configuration file.  Postponed
  2619. and interrupted messages cannot be kept on an IMAP server.
  2620.  
  2621. .uh "Message Status"
  2622. .(x
  2623. Message Status
  2624. .)x
  2625. .br
  2626. .lp
  2627. The c-client library allows for several flags or status marks to be set
  2628. for each message.  Pine uses three of these flags: UNSEEN, DELETED,
  2629. and ANSWERED.  
  2630. The "N" in Pine's FOLDER INDEX means that a message is unseen\-it has not 
  2631. been read from this folder
  2632. yet.  The "D" means that a message is marked for deletion.  Messages 
  2633. marked with "D" are removed when the user
  2634. .i expunges
  2635. the folder (which usually happens when the folder is closed or the user
  2636. quits Pine).
  2637. The "A" in Pine's FOLDER INDEX means that the message has bee replied-to.
  2638. For Berkeley format folders, the message
  2639. status is written into the email folder itself on the header lines marked
  2640. \fIStatus:\fR and \fIX-Status\fR.
  2641. In Tenex and MTX folders, the status goes into the 36-bit octal flags.
  2642.  
  2643.  
  2644. .uh "MIME\\-Reading a Message"
  2645. .(x
  2646. MIME\-Reading a Message
  2647. .)x
  2648. .br
  2649. .lp
  2650. Pine should be able to handle just about any MIME message.
  2651. When a MIME message is received, Pine will display a list of all the parts,
  2652. their types and sizes.  It will display the attachments when possible and
  2653. appropriate and allow users to save all other attachments.
  2654. .lp
  2655. Messages which include rich text in the main body will be displayed in a 
  2656. very limited way (it will show bold and underlining).  
  2657. .lp
  2658. If Pine sees a
  2659. message tagged as "image/gif" or "image/jpeg", it will attempt to send that
  2660. attachment to an appropriate image viewing program.  UNIX Pine will check
  2661. the environment setting DISPLAY to see if Pine is on an X-terminal
  2662. (which can handle the images).  If so, Pine passes the image to a 
  2663. program such as 
  2664. .i xloadimage 
  2665. to be viewed.
  2666. You can specify which program should be used by setting the Pine
  2667. configuration variable \fIimage-viewer\fR.
  2668. .lp
  2669. If an attachment is just text (tagged with "text/plain" in the MIME header),
  2670. then Pine will use an internal
  2671. viewer module to display the attachment.  International character sets in
  2672. attachments are handled in the same way as they are in regular email messages.
  2673. Some text attachments, specifically those which are just other
  2674. email messages forwarded as MIME messages, are displayed as part of the
  2675. main body of the message.  This distinction allows easy display when
  2676. possible (the forward as MIME case) and use of an attachment viewer when
  2677. that is desirable (the plain text file attachment case).
  2678. .lp
  2679. If the parts of a multipart message are alternate versions of the same
  2680. thing Pine will select and display the one best suited.
  2681. For parts of type "message/external-body", the
  2682. parameters showing the retrieval method will be displayed, but the
  2683. retrieval process is not yet automated.
  2684. Messages of type "message/partial" cannot currently be 
  2685. automatically reassembled or sent.
  2686. Lastly, Pine cannot display any attachments which are of the "application"
  2687. type; these must be saved to files and then processed outside of Pine.  
  2688. In a future release, we intend to support the \fImailcap\fR facility to 
  2689. allow automatic processing of display of additional MIME types.
  2690.  
  2691.  
  2692.  
  2693. .uh "MIME\\-Sending a Message"
  2694. .(x
  2695. MIME\-Sending a Message
  2696. .)x
  2697. .br
  2698. .lp
  2699. There are two important factors when trying to include an attachment in a
  2700. message: encoding and labeling.  Pine has rules for both of these which try
  2701. to assure that the message goes out in a form that is robust and can be
  2702. handled by other MIME mail readers.
  2703. .lp
  2704. MIME has two ways of encoding data\-Quoted-Printable and Base64.
  2705. Quoted-Printable leaves the ASCII text alone
  2706. and only changes 8-bit characters to "=" followed by the hex digits.
  2707. For example, "=09" is a tab.
  2708. It has the advantage that it is mostly readable and that it
  2709. allows for end of line conversions between unlike systems.
  2710. Base64 encoding is similar to
  2711. .i uuencode
  2712. or
  2713. .i btoa
  2714. and just encodes a raw bit stream.
  2715. This encoding is designed to get text and binary files through even
  2716. the most improperly implemented and configured gateways intact, 
  2717. even those that distort uuencoded data.
  2718. .lp
  2719. Starting with this (3.84) version of Pine we have
  2720. decided to encode all attachments using Base64 encoding.
  2721. This is so that the attachment will arrive at the other end looking
  2722. exactly like it did when it was sent.
  2723. Since Base64 is completely unreadable except by MIME-capable mailers or 
  2724. programs, there is an obvious tradeoff being made here.
  2725. We chose to ensure absolutely reliable transport of attachments at the
  2726. cost of requiring a MIME-capable mailer to read them.
  2727. If the user doesn't want absolute integrity he or she may always
  2728. .i include
  2729. text (with the \fI^R\fR command) in the body of a
  2730. message instead of attaching it.
  2731. With this new policy, the only time quoted-printable encoding is used is
  2732. when the main body of a message includes special foreign language 
  2733. characters.
  2734. .lp
  2735. When an attachment is to be sent, Pine sniffs through it to try to set the
  2736. right label (content-type and subtype).  An attachment with any lines
  2737. longer than 500 characters in it or more than 10% of the characters are
  2738. 8-bit it will be considered binary data.  Pine will recognize (and
  2739. correctly label) a few special types including GIF, JPEG, Postscript and
  2740. some audio formats.
  2741. .lp
  2742. If is not binary data (has only a small proportion of 8-bit characters in
  2743. it,) the attachment is considered 8-bit text.  8-bit text attachments are
  2744. labelled "text/plain" with charset set to the value of the user's
  2745. .i character-set
  2746. variable.
  2747. If an attachment is ASCII (no 8-bit characters) and contains no
  2748. .i
  2749. ESCAPE, ^N,
  2750. .r
  2751. or
  2752. .i ^O
  2753. characters (the characters used by some international character sets), then
  2754. it is considered plain ASCII text. 
  2755. Such attachments are given the MIME label "text/plain;
  2756. charset=US-ASCII", regardless of the setting of the user's 
  2757. .i character-set
  2758. variable.
  2759. .lp
  2760. All other attachments are unrecognized and therefore given the generic
  2761. MIME label "application/octet-stream".
  2762.  
  2763.  
  2764. .uh "New Mail Notification"
  2765. .(x
  2766. New Mail Notification
  2767. .)x
  2768. .br
  2769. .lp
  2770. Pine checks for new mail in the
  2771. .i INBOX
  2772. and in the currently open folder every 30 seconds.
  2773. It only has to check the
  2774. time stamp on the mail file, so doing this doesn't place a load on the system.
  2775. If you really don't want to wait you can force a new mail check by
  2776. attempting to move the cursor off the end of the message index three
  2777. times.  
  2778. It'll beep and complain as you do this, but it will
  2779. check for new mail on the third try.
  2780. .lp
  2781. When there is new mail, the message(s) will appear in the index, the
  2782. screen will beep, and a notice showing the sender and subject will be
  2783. displayed. If there has been more than one new message since you last
  2784. issued a command to Pine, the notice will show the count of new messages
  2785. and
  2786. the sender of the most recent one.
  2787. .lp
  2788. Questions have arisen about the interaction between Pine and external
  2789. mail notification routines (biff, csh, login).  Firstly and unfortunately,
  2790. we have found no PC based program that will check for email on an IMAP
  2791. server when PC-Pine is not running.  If you find one, please tell us.  
  2792. .lp
  2793. The UNIX case if more complicated.  Pine sets the modification and access
  2794. time on a file every time it performs a write operation (status change or
  2795. expunge).  You need to see which of these your email notification program
  2796. is looking at to know how it will behave with Pine.
  2797.  
  2798. .uh "NFS"
  2799. .(x
  2800. NFS
  2801. .)x
  2802. .br
  2803. .lp
  2804. It is possible to access
  2805. .i NFS
  2806. mounted mail folders with Pine, but there are some drawbacks to doing this.
  2807. One is that the Pine's user-contention 
  2808. locks don't work because
  2809. .i /tmp
  2810. is usually not shared, and even if it was,
  2811. .i flock()
  2812. doesn't work across
  2813. .i NFS.
  2814. .lp
  2815. The implementation of the standard UNIX ".lock" file locking has been
  2816. modified to work with
  2817. .i NFS
  2818. as follows.
  2819. Standard hitching post locking is used so first a uniquely named file
  2820. is created, usually something like
  2821. .i xxxx.host.time.pid.
  2822. Then a link to it is created named
  2823. .i xxxx.lock
  2824. where the folder being locked is
  2825. .i xxxx.
  2826. This file constitutes the lock.
  2827. This is a standard UNIX locking scheme.  After the link returns, a
  2828. .i stat(2)
  2829. is done on the file.
  2830. If the file has two links, it is concluded that the lock succeeded and it
  2831. is safe to proceed.
  2832. .lp
  2833. It is mostly safe to access mail via
  2834. .i NFS.   
  2835. Some problems may occur when two Pine sessions try to access the same mail
  2836. folder from different hosts without using IMAP.  Imagine the
  2837. scenario: Pine-A performs a write that changes the folder.  Pine-B then
  2838. attempts to perform a write on the same folder.  Pine-B will get
  2839. upset that the file
  2840. has been changed from underneath it and abort operations on the folder.
  2841. Pine-B will continue to display mail from the folder that it has in its
  2842. internal cache, but it will not read or write any further data.
  2843. The only thing that will be lost out of the Pine-B session when this
  2844. happens is the last few status changes.  
  2845. .lp
  2846. If other mail readers besides Pine
  2847. are involved, all bets are off.
  2848. Typically, mailers don't take any precautions against a user opening a
  2849. mailbox more than once and no special precautions are taken to prevent
  2850. .i NFS
  2851. problems.
  2852.  
  2853.  
  2854. .uh "Printers and Printing"
  2855. .(x
  2856. Printers and Printing
  2857. .)x
  2858. .br
  2859. .lp
  2860. UNIX Pine can print to the standard UNIX line printers or to generic 
  2861. printers attached to ANSI terminals using the escape sequences to turn 
  2862. the printer on and off.
  2863. The user has a choice of three printers in the configuration.
  2864. .lp
  2865. The first setting,
  2866. .i attached-to-ansi,
  2867. makes use of escape sequences on ANSI/VT100 terminals.
  2868. It uses "<ESC>[5i" to begin directing all
  2869. output sent to the terminal to the printer and then "<ESC>[6i" to  
  2870. return to normal.
  2871. Pine will send these escape sequences if the printer is set to
  2872. .i attached-to-ansi.
  2873. This works with most ANSI/VT100 emulators on Macs and PCs
  2874. such as kermit, NCSA telnet, VersaTerm Pro, and WinQVT.
  2875. Various terminal emulators implement the print feature differently.
  2876. For example, NCSA telnet requires "capfile = PRN" in the
  2877. .i config.tel
  2878. file.
  2879. Attached-to-ansi printing doesn't work at all with the telnet
  2880. provided with PC-NFS.
  2881. .lp
  2882. The second selection is the standard UNIX print command.
  2883. The default is
  2884. .i lpr,
  2885. but it can be changed on a system basis to anything so desired in
  2886. .i /usr/local/lib/pine.conf.
  2887. .lp
  2888. The third selection is the user's personal choice for a UNIX print
  2889. command.
  2890. The text to be printed is piped into the command.
  2891. .i Enscript
  2892. or
  2893. .i lpr
  2894. with options are popular choices.
  2895. The actual command is retained
  2896. even if one of the other print selections is used for a while.
  2897. .lp
  2898. If you have a Postscript attached to a PC or Macintosh, then you will need
  2899. to use a utility called \fIansiprt\fR to get printouts on your printer. 
  2900. \fIAnsiprt\fR source code and details can be found in the \fI./contrib\fR
  2901. directory of the Pine distribution.
  2902. .lp
  2903. The three printer choices are for UNIX Pine only.  PC-Pine can only
  2904. print to the locally attached printer.  All printing on PC-Pine is
  2905. done via ROM BIOS Print Pervices (Int 17h).  After verifying the
  2906. existance of a local printer via the BIOS Equipment-List Service (Int
  2907. 11h), it simply sends the message text, character by character, to the
  2908. first printer found using ASCII CR and LF at the end of lines and
  2909. followed by an ASCII FF.  Note, some system adjustments using the PC's
  2910. "MODE" command may be required if the printer is not on the first
  2911. parallel port.  PC-Pine cannot generate Postscript, so printing to
  2912. exclusively Postscript printers does not work.
  2913.  
  2914.  
  2915. .uh "Save and Export"
  2916. .(x
  2917. Save and Export
  2918. .)x
  2919. .br
  2920. .lp
  2921. Pine users get two options for moving messages in Pine: \fIsave\fR and
  2922. \fIexport\fR.  Save is used when the message should remain 
  2923. .q "in the Pine realm."
  2924. Saved messages include the complete header (including header lines
  2925. normally hidden by Pine), are placed in a Pine folder collection and
  2926. accumulate in a standard folder format which Pine can read.  In contrast,
  2927. the 
  2928. .i export 
  2929. command is used to write the contents of a message
  2930. to a file for use outside of Pine.  Messages which have been exported are
  2931. placed in the user's home directory, not in a Pine folder collection.  All
  2932. delivery-oriented headers are stripped from the message.  Even with
  2933. \fIexport\fR, Pine retains a folder format\-that is, multiple messages
  2934. can accumulate in a single file.  On UNIX systems, the \fIexport\fR
  2935. command pays attention to the standard 
  2936. .i umask
  2937. for the setting of the file permissions.
  2938.  
  2939.  
  2940. .uh "Sent Mail" 
  2941. .(x 
  2942. Sent Mail
  2943. .)x
  2944. .br 
  2945. .lp 
  2946. Pine's default behavior is to keep a copy each outgoing message in
  2947. a special "sent mail" folder.  This folder is also called the fcc for
  2948. "file carbon copy".  The existance, location and name of the
  2949. sent mail folder are all configurable.  Sent mail archiving can be turned
  2950. off by setting the configuration variable \fIdefault-fcc=""\fR.  The sent
  2951. mail folder is assumed to be in the default collection for saves, which
  2952. is the first collection named in \fIfolder-collections\fR.  The name of
  2953. the folder can be chosen by entering a name in \fIdefault-fcc\fR.
  2954. With PC-Pine, this can
  2955. be a bit complicated.  If the default collection for saves is
  2956. local (DOS), then the 
  2957. \fIdefault-fcc\fR
  2958. needs to be "SENTMAIL", which is syntax for a DOS file.  However, if the
  2959. default collection for saves is remote, then the \fIdefault-fcc\fR needs
  2960. to be "sent-mail" to match the UNIX syntax.
  2961. .lp
  2962. The danger here is that the sent mail could
  2963. grow without bound.  For this reason, we thought it useful to encourage
  2964. the users to
  2965. periodically prune their sent mail
  2966. folder.  The first time Pine is used each month it will offer to archive
  2967. all messages sent from the month before.  Pine also offers to delete all
  2968. the sent mail archive folders which are more than 1 month old.  If the
  2969. user or system has disabled sent mail archiving (by setting the
  2970. configuration variable \fIdefault-fcc=""\fR) or if the fcc folder is a
  2971. remote/IMAP folder then there will be no pruning
  2972. question.  
  2973. .lp
  2974. It is likely that Pine will be improved so that users can set the
  2975. time increment for pruning
  2976. (weekly, monthly, yearly, never) but that has not been implemented yet.
  2977.  
  2978.  
  2979.  
  2980. .uh "Spell Checker"
  2981. .(x
  2982. Spell Checker
  2983. .)x
  2984. .br
  2985. .lp
  2986. Spell checking is available for UNIX Pine only.  We could not find an
  2987. appropriate PC based spell checker to hook into PC-Pine.  Even UNIX Pine
  2988. depends on the system for its spell checking and dictionary.  Pico, the
  2989. text editor, uses the same spell checking scheme as Pine.
  2990. .lp
  2991. Lines beginning with ">" (usually messages included in replies) are not
  2992. checked.  The message text to be checked is on the
  2993. standard input and the incorrect words are expected on the standard output.
  2994. .lp
  2995. The default spell checker is UNIX \fIspell\fR.  You can replace this at
  2996. compile time for the whole system.  Pine also respects the environment
  2997. variable \fISPELL\fR.  If it is set, Pine will use that as the spelling
  2998. checker.  The spelling checker reads its words from a standard dictionary
  2999. on the system.  Below is a description, contributed by Bob Hurt, of how
  3000. you can create your own personal dictionary with additional 
  3001. .q "correct"
  3002. words.
  3003. .(l
  3004. .ip "Step 1:"
  3005. Make a file with all the words you want to include in your new
  3006. dictionary.
  3007. I did mine with one word per line in alphabetical
  3008. order.
  3009. Caps don't matter at all, as far as I know.
  3010. .ip "Step 2:"
  3011. At the UNIX prompt, type
  3012. "cat [word file] | spellin /usr/dict/hlista > [new dict name]"
  3013. where [word file] is the file you just created and [new dict name]
  3014. is the name of the new dictionary that Pine will look at instead of
  3015. the standard
  3016. .i /usr/dict/hlista.
  3017. I named my word file
  3018. .i .bobwords
  3019. and my dictionary
  3020. .i .bobspell
  3021. so I don't have to see them when I do a
  3022. .i ls       
  3023. command (\fIls\fR doesn't list "dot" files).
  3024. I also put the above command
  3025. into my
  3026. .i .alias
  3027. file as the command
  3028. .i makedict
  3029. so I can add a word to my word file and easily recreate my dictionary.
  3030. NOTE:  the new dictionary is in something called a "hashed" format,
  3031. and can't be read normally.   
  3032. .ip "Step 3:"
  3033. Check your new dictionary.
  3034. At the UNIX prompt, type
  3035. "cat [word file] | spellout [new dict name]"
  3036. If you did everything correctly, it should just give you another
  3037. prompt.
  3038. If it lists any of the words in your file, something is wrong.
  3039. I can try to help if all else fails.
  3040. .ip "Step 4:"
  3041. Now you have to tell UNIX to use your dictionary instead of the standard
  3042. one by setting the environment variable
  3043. .i SPELL
  3044. to access your dictionary.
  3045. Go into your
  3046. .i .login
  3047. or
  3048. .i .cshrc   
  3049. file in your home directory (it doesn't
  3050. seem to make a difference which one you use) and add the line
  3051. .(l
  3052.         setenv SPELL "spell -d [new dict name]"
  3053.  
  3054. .)l
  3055. .ip
  3056. I also created an alias for
  3057. .i SPELL
  3058. in my
  3059. .i .alias   
  3060. file so I can use the UNIX
  3061. .i spell
  3062. command to spell-check a file outside of Pine.
  3063. (The
  3064. .i .alias
  3065. line is: alias spell 'spell -d [new dict name]')
  3066. .ip "Step 5:"
  3067. Now you need to logoff and log back on to let UNIX look at your
  3068. .i .login
  3069. (or \fI.cshrc\fR) file.
  3070. .)l
  3071. .lp
  3072. Here is an alternative method suggested by Zachary Leber:
  3073. .ip
  3074. Create a list (e.g. \fI.zachwords\fR) with the upper case 
  3075. followed by lowercase words, sorted alphabetically.
  3076. .ip
  3077. Add this line to \fI.cshrc\fR:
  3078. .(l
  3079. setenv SPELL 'spell +/home/ie/rsa/.zachwords'
  3080. .)l
  3081. .ip
  3082. The limitation here is that the path must be absolute (e.g. 
  3083. .i +~/.zachwords
  3084. doesn't work).
  3085. .ip
  3086. My man pages for spell show this + flag to be an easy way to do the
  3087. exception list.  This way you don't have to bother with hash lists or
  3088. rehashing, and it seems to work across several platforms.
  3089.  
  3090.  
  3091.  
  3092. .uh "Terminal Emulation and Key Mapping"
  3093. .(x
  3094. Terminal Emulation and Key Mapping
  3095. .)x
  3096. .br
  3097. .lp
  3098. Pine has been designed to require as little as possible from the terminal.
  3099. At the minimum, Pine requires cursor positioning, clear to
  3100. end of line, and inverse video.
  3101. Unfortunately, there are terminals that
  3102. are missing some of these such as a vt52.
  3103. Pine makes no assumptions as to whether the terminal wraps or doesn't wrap.
  3104. If the terminal has other capabilities it will use them.
  3105. Pine won't run well on older terminals that require a space on the
  3106. screen to change video attributes, such as the Televideo 925.
  3107. One can get around this on some terminals by using "protected field" mode.
  3108. The terminal can be made to go into protected mode for reverse video,
  3109. and then reverse video is assigned to protected mode.
  3110. .lp
  3111. Pine handles screens of most any size and resizing on the fly.
  3112. It catches SIGWINCH and does the appropriate thing.
  3113. A screen one line high will display only the new mail notification.
  3114. Screens that are less than ten columns wide don't format very nicely
  3115. or work well, but will function fine again once resized to something large.
  3116. Pine sets an internal maximum screen size (currently 170x200) and decides
  3117. to use either \fItermcap\fR or \fIterminfo\fR when it is compiled.
  3118. .lp
  3119. On the input side of things, Pine uses all the standard keys, most of
  3120. the control keys and (in function-key mode) the function keys.  Pine
  3121. avoids certain control keys, specifically ^S, ^Q, ^H,
  3122. .r
  3123. and \fI^\\\fR because they have other meanings outside of Pine (they
  3124. control data flow, etc.)  
  3125. .i ^H
  3126. is treated the same as the
  3127. .i delete
  3128. key, so the
  3129. .i backspace
  3130. or
  3131. .i delete
  3132. keys always works regardless of any configuration.  In an upcoming 
  3133. version, there will be an option to have the \fIdelete\fR key behave like 
  3134. ^D rather than ^H.
  3135. .lp
  3136. When a function key is pressed and Pine is in regular (non-function key)
  3137. mode, Pine traps escape sequences for a number of common function
  3138. keys so users don't get an error message or have an unexpected command
  3139. executed for each character in the function key's escape sequence.
  3140. Pine expects the following escape sequences from terminals defined as
  3141. VT100: 
  3142.  
  3143. .(l
  3144.         ANSI/VT100
  3145. F1:     <ESC>OP 
  3146. F2:     <ESC>OQ 
  3147. F3:     <ESC>OR 
  3148. F4:     <ESC>OS 
  3149. F5:     <ESC>Op 
  3150. F6:     <ESC>Oq 
  3151. F7:     <ESC>Or 
  3152. F8:     <ESC>Os 
  3153. F9:     <ESC>Ot 
  3154. F10:    <ESC>Ou 
  3155. F11:    <ESC>Ov 
  3156. .)l
  3157.  
  3158. .lp
  3159. Arrow keys are a special case.  Pine has the escape sequences for a number
  3160. of conventions for arrow
  3161. keys hard coded and does not use
  3162. .i termcap
  3163. to discover them.
  3164. This is because
  3165. .i termcap
  3166. is sometimes incorrect, and because many users have
  3167. PC's running terminal emulators that don't conform exactly to what
  3168. they claim to emulate. 
  3169. Some arrow keys on old terminals send single control characters like
  3170. .i ^K
  3171. (one even sends \fI^\\\fR).
  3172. These arrow keys will not work with Pine.
  3173. The most popular escape sequences for arrow keys are:
  3174.    
  3175. .(l
  3176. Up:    <ESC>[A    <ESC>?x    <ESC>A    <ESC>OA
  3177. Down:    <ESC>[B    <ESC>?r    <ESC>B    <ESC>OB
  3178. Right:    <ESC>[C    <ESC>?v    <ESC>C    <ESC>OC
  3179. Left:    <ESC>[D    <ESC>?t    <ESC>D    <ESC>OD
  3180. .)l
  3181.  
  3182. .lp
  3183. It is possible to configure an NCD X-terminal so that some of the special 
  3184. keys operate.  Brad Greer contributes these instructions:
  3185.  
  3186. .ip 1. 
  3187. In your
  3188. .i .Xdefaults
  3189. file, include the following "translations", using
  3190. lower hex values:
  3191.    
  3192. .(l
  3193. Pine*VT100.Translations: #override \\n\\
  3194. <Key>Delete:    string(0x04)    \\n\\
  3195. <Key>End:    string(0x05)    \\n\\
  3196. <Key>Escape:    string(0x03)    \\n\\
  3197. <Key>Home:    string(0x01)    \\n\\
  3198. <Key>Next:    string(0x16)    \\n\\
  3199. <Key>Prior:    string(0x19)    \\n\\
  3200. <Key>KP_Enter:    string(0x18)    \\n\\
  3201. .)l
  3202.  
  3203.  
  3204. .ip 2.
  3205. Start up Pine from an
  3206. .i xterm,
  3207. and specify a "resource name".
  3208. This resource name will allow the user to specify resources for Pine
  3209. (that deviate from the defaults).
  3210. For example,
  3211. .i "xterm -name Pine -e pine &"
  3212. (the resource name
  3213. .i Pine
  3214. corresponds to the translations just added 
  3215. in the
  3216. .i .Xdefaults
  3217. file).
  3218.  
  3219. .bp
  3220. .sz 16
  3221. .ce 
  3222. .b "Section 7\\-Notes for Porting and Modification"
  3223. .(x
  3224. .b "Section 7\\-Notes for Porting and Modification"
  3225. .)x
  3226. .sz 12
  3227. .sp 0.3i
  3228. .lp
  3229.  
  3230.  
  3231. .uh "Porting Pine to Other Platforms"
  3232. .(x
  3233. Porting Pine to Other Platforms
  3234. .)x
  3235. .br
  3236. .lp
  3237. Substantial effort has gone into making Pine/Pico portable.
  3238. There are still, of course, a number of machine dependencies.
  3239. Some of the ports are well-tested and some are untested.
  3240. In particular, the most heavily used ports are the Ultrix, NeXT, DOS,
  3241. and PTX ports.
  3242. .lp
  3243. Each platform is given a three letter name (see the file
  3244. \fIdoc/pine-ports\fR).
  3245. Make up a new one for your new port.
  3246. We've attempted to bring all potential platform dependencies into three
  3247. files:
  3248. .i
  3249. os-xxx.h, os-xxx.c, \fRand\fI makefile.xxx
  3250. .r
  3251. where
  3252. .i xxx
  3253. is the three letter name of the port.
  3254. Thus any new port will hopefully just result in new versions of
  3255. these files and some notes for the  
  3256. .i pine-ports
  3257. file.
  3258. This is actually nine new files because there is a set of these files in the
  3259. c-client, Pico, and Pine source directories.
  3260. (As you can tell by reading this technical note, Pine originated on Unix
  3261. systems. 
  3262. There are still probably many Unix dependencies built in.
  3263. There is now a
  3264. .i DOS
  3265. port, which is the only non-Unix port.
  3266. The source code is full of instances of "ifdef DOS".
  3267. Most of these are due to memory limit problems on
  3268. .i DOS
  3269. as opposed to actual system dependencies.)
  3270. A  
  3271. .i VMS
  3272. (or other) port would no doubt reveal many remaining Unix dependencies.)
  3273. .lp
  3274. The makefiles are kept as simple and straight-forward as possible,
  3275. because many previous attempts at automatically figuring out what to 
  3276. do seem to have become complex and ineffective in what they set out
  3277. to do:  which is to make compiling and installing the program easy.
  3278. Each port is for a specific hardware/software platform, also because
  3279. past attempts to generalize on versions of Unix or some CPU architecture
  3280. don't seem to have gained much.
  3281. Thus, there is a separate makefile for each platform
  3282. that calls the appropriate compiler and linker with the appropriate flags.
  3283. Most of these makefiles are pretty similar.
  3284. The makefile also specifies which of the
  3285. .i os-xxx.c
  3286. and
  3287. .i os-xxx.h
  3288. files to use.
  3289. It is the root from which all platform dependencies are selected.
  3290. In most cases the makefile also defines a symbol named after the
  3291. platform on which there can be dependencies in the source code, though
  3292. we've tried to minimize relying on this where reasonable.
  3293. Pine, Pico, and the C-client don't quite do everything the same (there are
  3294. at least three separate authors involved).
  3295. Basically, to build the source in one of the directories, run
  3296. .i
  3297. make -f makefile.xxx
  3298. .r
  3299. where
  3300. .i xxx
  3301. is the three-letter name of the platform.
  3302. That's all the
  3303. .i build
  3304. script does.
  3305. When starting a new port in the
  3306. .i pine
  3307. directory, there is a generic makefile called
  3308. .i makefile.gen
  3309. which is a good starting point.
  3310. .lp
  3311. The file
  3312. .i os-xxx.h
  3313. is used for general platform dependent \fI#include\fR's and \fI#defines\fR.
  3314. In the
  3315. .i pine
  3316. directory these \fI.h\fR files are located in the
  3317. .i osdep
  3318. subdirectory.
  3319. All the include files that have been found to vary from one platform to
  3320. another are also included here.
  3321. In the case of Pico, there is only one
  3322. .i os-xxx.h
  3323. file called
  3324. .i os-unx.h
  3325. for most of the supported Unix
  3326. ports and inside it are \fI#ifdefs\fR based on the platform specific symbol
  3327. defined in the makefile.
  3328. On the other hand, Pine now has a separate
  3329. .i os-xxx.h
  3330. file for each platform.
  3331. There are a
  3332. number of Pine configuration settings that are defined here, as well, such as
  3333. the place it looks for certain files, defaults for the printer and
  3334. folder names, the maximum screen size, and so on.
  3335. For the Pine portion of the port, start by looking at the generic
  3336. .i os-gen.h
  3337. file and comparing it to some of the specific
  3338. .i os-xxx.h
  3339. files in
  3340. .i osdep.
  3341. .lp
  3342. The
  3343. .i os-xxx.c
  3344. file contains functions that are potentially platform dependent.
  3345. Again, the idea is to gather all the dependencies in one place.
  3346. Pico uses the same strategy here as it uses with
  3347. .i os-unx.h.
  3348. That is, there is a single
  3349. .i os-unx.c
  3350. file for most of the Unix ports.
  3351. Pine uses a complicated looking method to produce the
  3352. .i os-xxx.c
  3353. file from a set of included files.
  3354. Each included file usually contains a single function and we've found that
  3355. there are usually only a couple different implementations of each function
  3356. in the ports we've done so far.
  3357. Hopefully, coming up with an
  3358. .i os-xxx.c
  3359. for a new port will usually be a matter of including the right set of
  3360. these already written functions.
  3361. This is done by writing a new
  3362. .i os-xxx.ic
  3363. file in the
  3364. .i osdep   
  3365. subdirectory.
  3366. Start with the generic
  3367. .i os-gen.ic,
  3368. as you did with the
  3369. .i os-gen.h
  3370. file above.
  3371. .lp
  3372. We strongly encourage that no changes be made to the general source
  3373. when porting and that all changes be contained in the three/nine system
  3374. dependent files if possible.
  3375. The object is to maintain source code integrity and
  3376. assimilate ports to new platforms rapidly.
  3377. The more conventional way to
  3378. do this is with a large collection of \fI#ifdefs\fR.
  3379. The problem with this is
  3380. that adding a port for a new platform implies changing the source code
  3381. for all the other platforms and thereby risks breaking them.
  3382. (We readily admit that there are still too many \fIifdefs\fR in the code, but
  3383. we haven't had time to devote to fully cleaning that up.)
  3384. .lp
  3385. If you do port Pine to a new platform we hope that you will send us the
  3386. changes required so that we may attempt to include it in a later release.
  3387. Thanks!
  3388.  
  3389.  
  3390. .uh "Test Checklist"
  3391. .(x
  3392. Test Checklist
  3393. .)x
  3394. .br
  3395. .lp
  3396.  
  3397.  
  3398. The following is a checklist of some things to check when testing a new port:
  3399.  
  3400. .nr 68 \n(ps
  3401. .nr ps 0v
  3402.  
  3403. .ip ___
  3404. Sending mail, check that full name is correct
  3405. .ip ___
  3406. Sending mail with SMTP server
  3407. .ip ___
  3408. Replying to and forwarding a message
  3409. .ip ___
  3410. Postponing message under composition
  3411. .ip ___ 
  3412. Make sure local user names are expanded
  3413. .ip ___
  3414. Test spelling checker
  3415. .ip ___
  3416. Catching of SIGHUP while message is being composed
  3417. .ip ___
  3418. Setting of variables in \fI.pinerc\fR
  3419. .ip ___
  3420. New mail notification.  Should happen with Pine idle to check timeouts
  3421. .ip ___
  3422. Reading mail
  3423. .ip ___
  3424. Deleting and undeleting
  3425. .ip ___
  3426. Expunge to empty folder
  3427. .ip ___
  3428. Make sure that \fI~\fR expansion works
  3429. .ip ___
  3430. Save message to folder, check error conditions such as permission denied
  3431. .ip ___
  3432. Export message
  3433. .ip ___
  3434. Checkpointing (make 20 status changes, or 19 and wait 30 sec)
  3435. .ip ___  
  3436. Open IMAP and RIMAP folders
  3437. .ip ___
  3438. Default-fcc on remote IMAP server
  3439. .ip ___
  3440. Test opening bogus folders: invalid format, no permission
  3441. .ip ___
  3442. Open a USENET news group, list in folder-lister, read news
  3443. .ip ___
  3444. Command line arguments
  3445. .ip ___
  3446. Change password
  3447. .ip ___
  3448. Lock keyboard
  3449. .ip ___
  3450. Address book operations
  3451. .ip ___
  3452. Take command
  3453. .ip ___
  3454. Send mail with empty address book
  3455. .ip ___
  3456. Make sure that SIGQUIT, ^\\ confirmation works (check
  3457. core dump too)
  3458. .ip ___
  3459. Test panic (Give '#' command on main menu with debug
  3460. level > 8)
  3461. .ip ___
  3462. Make sure SIGTSTP, ^Z works
  3463. .ip ___
  3464. Pinef
  3465. .ip ___ 
  3466. Sent-mail pruning
  3467. .ip ___
  3468. Printing using all three printer configurations
  3469. .ip ___
  3470. View help text & news
  3471. .ip ___
  3472. Folder list operations (rename, create, delete...)
  3473. .ip ___
  3474. Screen redrawing (^L)
  3475. .ip ___
  3476. Window resizing
  3477. .ip ___
  3478. Error messages for incorrect terminal types (try "foo" and "vt52")
  3479. .ip ___
  3480. Reading of \fI/usr/local/lib/pine.conf\fR
  3481. .nr ps \n(68u
  3482. .he '''
  3483. .fo '''
  3484. .bp
  3485. .ep
  3486. .bp
  3487. .\"
  3488. .\"           ***** Table of contents
  3489. .\"
  3490. .sz 20
  3491. .ce 2  
  3492. - Pine Technical Notes -  
  3493. .sp 0.2i
  3494. .sz 15
  3495. .br
  3496. Version 3.85, September 1993
  3497. .sp 0.2i
  3498. .sz 10
  3499. .xp
  3500. .sp 0.15i
  3501.