Add support for tab-completion when selecting by rule
[alpine.git] / doc / tech-notes / config-notes.html
blob6bf103596f522d13f717ddbbbe60fda4376705f9
1 <HTML><HEAD><TITLE>Alpine Technical Notes: Notes on Configuration and
2 Preferences</TITLE></HEAD><BODY>
3 <H1>Notes on Configuration and Preferences</H1>
5 <H2><A NAME="fkey">Alpine in Function Key Mode</A></H2>
7 The standard <EM>Alpine</EM> uses alphabetic keys for most commands, and control keys
8 in the composer. Despite possible appearances, the current bindings are
9 the result of much discussion and thought. All the commands in the
10 composer are single control characters. This keeps things very neat and
11 simple for users. Two character commands in the composer are a
12 possibility, but we're trying to avoid them because of the added
13 complexity for the user. <P>
15 <EM>Alpine</EM> can also operate in a function-key mode. To go into this mode invoke
16 <EM>alpine -k</EM> or (on some UNIX systems) <EM>alpinef.</EM> On a UNIX
17 system, you can link or copy the <EM>Alpine</EM> executable to
18 <EM>alpinef</EM> to install <EM>alpinef.</EM> Alternatively, users and systems
19 administrators can set the <EM>use-function-keys</EM> feature in the
20 personal or system-wide <EM>Alpine</EM> configuration file.
21 The command menus at the
22 bottom of the screen will show <EM>F1-F12 </EM>instead of the alphabetic
23 commands. In addition, the help screens will be written in terms of
24 function keys and not alphabetic keys. <P>
26 One of the results of using <EM>Alpine</EM> in function-key mode is that users can
27 only choose from twelve commands at any given time. In alphabetic-key
28 mode, a user can press a key for a command (say, q to quit) and that
29 command can be fulfilled. In function-key mode, the command must be
30 visible on the bottom key-menu in order to be used. There are some
31 screens where four screens of commands are operational;
32 function-key users can get to all of them, just not all at once. <P>
34 <HR>
36 <H2><A NAME="domain">Domain Settings</A></H2>
38 <EM>Alpine</EM> uses the default domain for a few different tasks. First, it is
39 tacked onto the user-id for outgoing email. Second, it is tacked onto all
40 "local" (unqualified) addresses in the "To:" or "Cc:" fields of messages
41 being composed (unless they are found in the address book or on an
42 LDAP server). The domain
43 name is also used to generate message-id lines for each outgoing message
44 and to allow <EM>Alpine</EM> to check if an address is that of the current <EM>Alpine</EM> user.
45 <P>
47 <EM>Alpine</EM> determines the domain name according
48 to whichever of these it finds.
49 The list here is in decreasing order of precedence.
51 <OL>
53 <LI> Value of the variable
54 <A HREF="config.html#user-domain"><EM>user-domain</EM></A>
55 in the system fixed configuration file
57 <LI> Value of the variable <EM>user-domain</EM> in the personal
58 configuration file
60 <LI> Value of the variable <EM>user-domain</EM> in the system-wide
61 configuration file
63 <LI> Value from an external database (DNS, <CODE>/etc/hosts</CODE>, NIS) as
64 modified by a system fixed configuration file if
65 <A HREF="config.html#use-only"><EM>use-only-domain-name</EM></A>
66 set to <EM>yes</EM>
68 <LI> Value from an external database (DNS, <CODE>/etc/hosts</CODE>, NIS) as
69 modified by a personal configuration file if <EM>use-only-domain-name</EM>
70 set to <EM>yes</EM>
72 <LI> Value from an external database (DNS, <CODE>/etc/hosts</CODE>, NIS) as
73 modified by a system configuration file if <EM>use-only-domain-name</EM>
74 set to <EM>yes</EM>
76 <LI> Unmodified value (host name) from an external database <P>
78 </OL>
80 <P> The easiest way for this system to work is for <EM>PC-Alpine</EM>
81 users and UNIX <EM>Alpine</EM> system administrators to
82 set the <EM>user-domain</EM> variable. The
83 variable <EM>use-only-domain-name</EM> is helpful if your site
84 supports/requires hostless addressing, but for some reason you don't want
85 to use the <EM>user-domain</EM> variable. <P>
87 <HR>
89 <H2><A NAME="collections">Syntax for Collections</A></H2>
91 In many environments, it is quite common to have collections of archived
92 mail on various hosts around the network. Using the folder collections
93 facility in <EM>Alpine</EM>, access to these archives is just as simple as access to
94 folders on <EM>Alpine</EM>'s local disk. <P>
96 "Collection" is the word we use in <EM>Alpine</EM> to describe a set of folders. A
97 collection corresponds loosely to a "directory" containing mail folders.
98 Folders within a defined collection can be manipulated (opened, saved-to,
99 etc) using just their simple name. Any number of folder collections can
100 be defined, and <EM>Alpine</EM> will adjust its menus and prompts to help navigate
101 them. <P>
103 The way collections are defined in <EM>Alpine</EM> is with the
104 <A HREF="config.html#fold-coll"><EM>folder-collections</EM></A>
105 variable in the <EM>Alpine</EM> configuration file.
106 <EM>Folder-collections</EM> takes a list of one or more collections, each
107 (optionally) preceded by a user-defined logical name (label). Once
108 collections are defined, <EM>Alpine</EM> adjusts its menus and behavior to allow
109 choosing files by their simple name within the collection.
112 Consider the following:
114 <PRE>
115 folder-collections= Local-Mail C:\MAIL\[],
116 Remote-Mail {imap.u.example.edu}mail/[]
117 </PRE>
120 The example shows two collections defined (a comma separated list;
121 newlines in the list are OK if there's one or more spaces before the next
122 entry), one local and one remote. Each collection is a space-delimited
123 pair of elements-first an optional logical-name and second the collection
124 specifier. The logical-name can have spaces if it has quotes around it
125 (but keeping the logical name short and descriptive works best). <EM>Alpine</EM>
126 will use the logical-name (if provided) to reference all folders in the
127 collection, so the user never has to see the ugliness of the collection
128 specifier. <P>
130 The collection specifier can be thought of as an extended IMAP format (see
131 the <A HREF="#remote-folders"><EM>Remote Folders</EM></A> section
132 for a description of IMAP format names).
133 Basically, a pair of square-brackets are placed in the fully qualified
134 IMAP path where the simple folder name (the part without the host name and
135 path) would appear. Like IMAP, the path can be either fully qualified
136 (i.e., with a leading '/') or relative to your home directory. <P>
138 An advanced feature of this notation is that a pattern within the square
139 brackets allows the user to define a collection to be a subset of a
140 directory. For example, a collection defined with the specifier:
142 <PRE>
143 M-Mail C:MAIL/[m*]<BR>
144 </PRE>
146 will provide a view in the folder lister of all folders in the PC's
147 "C:MAIL" directory that start with the letter 'm' (case insensitive under
148 DOS, of course). Further, the wildcard matching will honor characters
149 trailing the '*' in the pattern. <P>
151 From within <EM>Alpine</EM>, the "Folder List" display will be adjusted to allow
152 browsing of the folders in any defined collection. Even more, you'll
153 notice in the <EM>Goto</EM> and <EM>Save</EM> commands a pair of
154 sub-commands to rotate
155 through the list of logical collection names, so only a simple name need
156 be input in order to operate on a folder in any collection. <P>
158 The first collection specified in the <EM>folder-collections</EM> has
159 special significance. That folder is the "default collection for saves".
160 By default, in cases where the user does not specify which
161 collection should be used to <EM>Save</EM> a message,
162 the default collection for saves will be used.
163 Also, if the <A HREF="config.html#def-fcc"><EM>default-fcc</EM></A>
164 is a relative file name, then it is relative
165 to the default collection for saves. (See also
166 <A HREF="config.html#saved-msg-name"><EM>saved-msg-name-rule</EM></A>. <P>
168 The notion of collections encompasses both email folders and news reading.
169 The variable <A HREF="config.html#news-coll"><EM>news-collections</EM></A>
170 uses nearly the same format as <EM>folder-collections</EM>.
171 Newsgroups can be defined for convenient
172 access via either IMAP or NNTP. There are advantages and disadvantages to
173 both access methods. In the IMAP case, your news environment state is
174 maintained on the server and, thus, will be seen by any client. The
175 downside is that, at the moment, you must have an account on the server.
176 In the NNTP case, server access is mostly anonymous and no
177 state/accounting need be maintained on it. The downside is that each
178 client, for now, must individually maintain news environment state. <P>
180 An example pinerc entry might be:
182 <PRE>
183 news-collections= Remote-State {news.u.example.edu}#news.[],
184 Local-State {news.u.example.edu/nntp}#news.[]
185 </PRE>
187 Only newsgroups to which you are subscribed are included in the collection. <P>
189 The pattern matching facility can be applied so as to define a news
190 collection which is a subset of all the newsgroups you subscribe to. For
191 example, this could be a valid collection:
193 <PRE>
194 Newsfeed-News {news.u.example.edu/nntp}#news.[clari.*]
195 </PRE>
198 Collection handling is a tough problem to solve in a general way, and the
199 explanation of the syntax is a bit ugly. The upside is, hopefully, that
200 for a little complexity in the <EM>Alpine</EM> configuration file you get simple
201 management of multiple folders in diverse locations. <P>
203 Collection setup is handled by the
204 <EM>Setup/collectionList</EM> screen. <P>
206 <HR>
208 <H2><A NAME="remote-folders">Syntax for Folder Names</A></H2>
210 Remote folders are distinguished from local folders by a leading host name
211 bracketed by '{' and '}'. The path and folder name immediately following
212 the closing bracket, '}', is interpreted by the remote server and is in a
213 form compatible with that server (i.e., path delimiters and naming syntax
214 relative to that server).
217 The full syntax for a <EM>Alpine</EM> folder name looks like
220 <CENTER><SAMP>[{&lt;remote-specification&gt;}][#&lt;namespace&gt;]&lt;namespace-specific-part&gt;</SAMP></CENTER>
223 The square brackets ([]) mean that the part is optional.
226 If there is no remote-specification, then the folder name is interpreted
227 locally on the computer running <EM>Alpine</EM>.
228 Local folder names depend on the operating system used by the computer
229 running <EM>Alpine</EM>, as well as the configuration of that system. For example,
230 &quot;C:&#92;ALPINE&#92;FOLDERS&#92;OCT-94&quot; might exist on a PC, and
231 &quot;~/mail/september-1994&quot; might be a reasonable folder name on a
232 system running Unix.
235 <EM>Alpine</EM> users have the option of using folders which are stored on some other
236 computer. <EM>Alpine</EM> accesses remote folders via IMAP (the Internet Message
237 Access Protocol), or in the case of news, via NNTP (the Network News
238 Transport Protocol). To be able to access remote folders in <EM>Alpine</EM>, the
239 remote host must be running the appropriate server software (imapd or
240 nntpd) and you must correctly specify the name of the folder to <EM>Alpine</EM>,
241 including the domain name of the remote machine. For example,
243 <CENTER><SAMP>&#123;monet.art.example.com}INBOX</SAMP></CENTER>
245 could be a remote folder specification, and so could
247 <CENTER><SAMP>&#123;unixhost.art.example.com}~/mail/september-1994</SAMP></CENTER>
250 <CENTER><SAMP>&#123;winhost.art.example.com}&#92;mymail&#92;SEP-94</SAMP></CENTER>
252 Note that in the case of remote folders, the directory/file path in the specification is
253 determined by the operating system of the remote computer, <B>not</B> by
254 the operating system of the computer on which you are running <EM>Alpine</EM>.
256 As you can tell, the name of the computer is in &#123;} brackets
257 followed immediately by the name of the folder. (In each of these cases the
258 optional namespace is missing.) If, as in these
259 examples, there is no remote access protocol specified, then IMAP is
260 assumed. Check
261 <A HREF="#server-name-syntax"><EM>Server Name Syntax</EM></A>
262 for a more detailed look at what options can be placed between the brackets.
263 If there are no brackets at all, then the folder name is interpreted locally
264 on the computer on which you are running <EM>Alpine</EM>.
267 To the right of the brackets when a server name is present, or at the
268 start of the foldername if no server is present, the sharp sign,
269 &quot;#&quot;, holds special meaning. It indicates a folder name
270 outside the area reserved for your personal folders. In fact, it's
271 used to indicate both the name of the folder, and a special phrase
272 telling <EM>Alpine</EM> how to interpret the name that follows.
275 So, for example, <EM>Alpine</EM> can be used to access a newsgroup that might be
276 available on your computer using:
278 <CENTER><SAMP>#news.comp.mail.pine</SAMP></CENTER>
280 The sharp sign indicates the folder name is outside your personal
281 folder area. The &quot;news.&quot; phrase after it tells <EM>Alpine</EM> to
282 interpret the remainder of the name as a newsgroup.
285 Similarly, to access a newsgroup on your IMAP server, you might
286 use something like:
288 <CENTER><SAMP>&#123;wharhol.art.example.com}#news.comp.mail.misc</SAMP></CENTER>
291 There are a number of such special phrases (or &quot;namespaces&quot;)
292 available. For a more detailed explanation read about
293 <A HREF="#folder-namespaces"><EM>Namespaces</EM></A>.
296 Note that &quot;INBOX&quot; has special meaning in both local and remote folder
297 names. The name INBOX refers to your &quot;principal incoming
298 message folder&quot; and will be mapped to the actual file name used for your
299 INBOX on any given host. Therefore, a name like
300 &quot;&#123;xxx.art.example.com}INBOX&quot; refers to whatever file is used to
301 store incoming mail for you on that particular host.
304 <HR>
306 <H2><A NAME="server-name-syntax">Server Name Syntax</A></H2>
308 This section describes the syntax which may be used for server names
309 which may be associated with remote folders or SMTP servers.
312 A server name is the hostname of the server.
313 It's a good idea to use the host's fully-qualified network name.
316 <CENTER><SAMP>foo.example.com</SAMP></CENTER>
319 However, IP addresses are allowed if surrounded
320 with square-brackets.
323 <CENTER><SAMP>[127.0.0.1]</SAMP></CENTER>
326 An optional network port number may be supplied by appending
327 a colon (:) followed by the port number
328 to the server name.
329 By default, the IMAP port number, 143, is used.
332 <CENTER><SAMP>foo.example.com:port</SAMP></CENTER>
335 Besides server name and optional port number, various other optional
336 parameters may be supplied that alter <EM>Alpine</EM>'s interaction with the server.
337 A parameter is supplied by appending a slash (/) character followed by
338 the parameter's name and,
339 depending on the particular parameter, the value assigned to that
340 name, to the server name (and optional port number).
341 Parameter names are <EM>not</EM> case sensitive.
342 Currently supported parameters include:
344 <DL>
346 <DT>User</DT>
347 <DD>This parameter requires an associated value, and is intended to
348 provide the username identifier with which to establish the server
349 connection.
350 If your SMTP server offers SMTP AUTH authentication, adding this
351 parameter to the
352 <A HREF="config.html#smtp-server"><EM>SMTP-Server</EM></A>
353 option will cause <EM>Alpine</EM> to attempt to authenticate to the server using the
354 supplied username.
355 Similarly, if your NNTP server offers NNTP &quot;AUTHINFO SASL&quot;
356 or &quot;AUTHINFO USER&quot; authentication, adding this parameter to the
357 <A HREF="config.html#nntp-server"><EM>NNTP-Server</EM></A>
358 option (or to the server name for any folder collection using NNTP)
359 will cause <EM>Alpine</EM> to attempt
360 to authenticate to the server using the supplied username.
361 An example might be:
364 <CENTER><SAMP>/user=katie</SAMP></CENTER>
367 </DD>
369 <DT>TLS</DT>
370 <DD>
371 Normally, when a new connection is made an attempt is made to
372 negotiate a secure (encrypted) session using Transport Layer Security (TLS).
373 If that fails then a non-encrypted connection will be attempted instead.
374 This is a unary parameter indicating communication with the server must
375 take place over a TLS connection. If the attempt to use TLS fails then
376 this parameter will cause the connection to fail instead of falling
377 back to an unsecure connection.
380 <CENTER><SAMP>/tls</SAMP></CENTER>
383 </DD>
385 <DT>SSL</DT>
386 <DD>
387 This is a unary parameter indicating communication with the server should
388 take place over a Secure Socket Layer connection. The server must support
389 this method, and be prepared to accept connections on the appropriate
390 port (993 by default).
391 <EM>Alpine</EM> must be linked with an SSL library for this option to be operational.
394 <CENTER><SAMP>/ssl</SAMP></CENTER>
397 </DD>
399 <DT>NoValidate-Cert</DT>
400 <DD>Do not validate certificates (for TLS or SSL connections) from the server.
401 This is needed if the server uses self-signed certificates or if <EM>Alpine</EM>
402 cannot validate the certificate for some other known reason.
404 </DD>
406 <DT>Anonymous</DT>
407 <DD>This is a unary parameter (that means it does not have a value)
408 indicating that the connection be logged in as
409 &quot;anonymous&quot; rather than a specific user.
410 Not all servers offer anonymous
411 access; those which do generally only offer read-only access to certain
412 &quot;public&quot; folders.
415 <CENTER><SAMP>/anonymous</SAMP></CENTER>
418 </DD>
420 <DT>Secure</DT>
421 <DD>This is a unary parameter indicating that the connection use the
422 most secure authentication method mutually supported by <EM>Alpine</EM> and the
423 server.
424 <EM>Alpine</EM> is capable of authenticating connections to
425 the server using several methods.
426 By default, <EM>Alpine</EM> will attempt each
427 method until either a connection is established or the
428 list of methods is exhausted.
429 This parameter causes <EM>Alpine</EM> to instead fail
430 the connection if the first (generally most &quot;secure&quot;) method fails.
433 <CENTER><SAMP>/secure</SAMP></CENTER>
436 </DD>
438 <DT>Submit</DT>
439 <DD>This is a unary parameter for use with the
440 &quot;SMTP-Server&quot; option.
441 It indicates that the connection should be made to the Submit server
442 (<A HREF="http://www.ietf.org/rfc/rfc2476.txt">RFC 3676</A>)
443 (port 587) instead of the SMTP port (25).
444 At the time this help was written the submit option was equivalent to
445 specifying port 587.
448 <CENTER><SAMP>/submit</SAMP></CENTER>
452 <CENTER><SAMP>host:587</SAMP></CENTER>
455 </DD>
457 <DT>Debug</DT>
458 <DD>This is a unary parameter indicating that the connection be established
459 in a verbose mode. Basically, it causes <EM>Alpine</EM> to log the communication with
460 the server in <EM>Alpine</EM>'s debug file.
461 Normally, the alpine -d command-line flag would be used instead.
463 </DD>
465 <DT>NoRsh</DT>
466 <DD>By default, <EM>Alpine</EM> attempts to login using &quot;rsh&quot;,
467 the UNIX remote shell program.
468 Including &quot;NoRsh&quot; will cause connections to this server to skip
469 the &quot;rsh&quot; attempt.
470 This might be useful to avoid long timeouts caused by rsh firewalls, for
471 example.
473 </DD>
475 <DT>Service</DT>
476 <DD>This parameter requires an associated value. The default value is
477 &quot;IMAP&quot; which indicates communication with the server based
478 on the IMAP4rev1 protocol (defined in RFC 3501 -- see
479 <A HREF="http://www.imap.org/docs/rfc3501.html">http://www.imap.org/docs/rfc3501.html</A>).</DD>
481 Other service values include:
482 <DL>
483 <DT>NNTP</DT>
484 <DD>This value indicates communication with the server takes place via
485 the Network News Transfer Protocol. Use this to define a collection
486 of newsgroups on a remote news server. So
489 <CENTER><SAMP>/service=NNTP</SAMP></CENTER>
491 or just
493 <CENTER><SAMP>/NNTP</SAMP></CENTER>
496 is the way to specify NNTP access.
498 </DD>
500 <DT>POP3</DT>
501 <DD>This value indicates communication with the server takes place via the
502 Post Office Protocol 3 protocol.
505 <CENTER><SAMP>/service=POP3</SAMP></CENTER>
507 or just
509 <CENTER><SAMP>/POP3</SAMP></CENTER>
512 Note that there are several important issues
513 to consider when selecting this option:
514 <OL>
515 <LI> POP3 provides access to only your INBOX. In other words,
516 secondary folders such as your &quot;saved-messages&quot; are inaccessible.
517 <LI> <EM>Alpine</EM>'s implementation of POP3 does not follow the traditional POP
518 model and will leave your mail on the server. Refer to the
519 <A HREF="#maildrop"><EM>Mail Drop</EM></A>
520 functionality for a possible way around this problem.
521 <LI> See the discussion about new-mail checking in <A HREF="config.html#reopen-rule"><EM>Folder-Reopen-Rule</EM></A>.
522 </OL>
523 </DD>
524 </DL>
525 </DL>
528 Note that it is possible to include more than one parameter in a server
529 specification by concatenating the parameters. For example:
532 <CENTER><SAMP>foo.example.com:port/user=katie/novalidate-cert/debug</SAMP></CENTER>
535 <HR>
537 <H2><A NAME="folder-namespaces">Folder Namespaces</A></H2>
539 A <EM>Alpine</EM> folder name looks like
542 <CENTER><SAMP>[{&lt;remote-specification&gt;}][#&lt;namespace&gt;][&lt;namespace-specific-part&gt;]</SAMP></CENTER>
545 The local part of a folder name has an optional &quot;Namespace&quot; which
546 tells <EM>Alpine</EM> how to interpret the rest of the name.
548 <P>
549 By default the folder name is interpreted as defining a section of your personal
550 folder area. This area and how you specify it are defined by the
551 server, if one is specified, or, typically, the home
552 directory, if no server is defined.
555 If a namespace is specified, it begins with the
556 sharp, &quot;#&quot;, character followed by the name of the namespace
557 and then the namespace's path-element-delimiter. Aside from the
558 path's format, namespaces can also imply access rights, content
559 policy, audience, location, and, occasionally, access methods.
562 Each server exports its own set (possibly of size one) of
563 namespaces. Hence, it's likely communication with your server's
564 administrator will be required for specific configurations. Some of
565 the more common namespaces, however, include:
567 <DL>
568 <DT>#news.</DT>
569 <DD>This specifies a set of folders in the newsgroup namespace. Newsgroup
570 names are hierarchically defined with each level delimited by a period.
572 <CENTER><SAMP>#news.comp.mail.pine</SAMP></CENTER>
574 </DD>
575 <DT>#public/</DT>
576 <DD>This specifies a folder area that the server may export to the general
577 public.
578 </DD>
579 <DT>#shared/</DT>
580 <DD>This specifies a folder area that the folder may export to groups
581 of users.
582 </DD>
583 <DT>#ftp/</DT>
584 <DD>This specifies a folder area that is the same as that it may have
585 exported via the &quot;File Transfer Protocol&quot;.
586 </DD>
587 <DT>#mh/</DT>
588 <DD>This specifies the personal folder area associated with folders
589 and directories that were created using the MH message handling system.
590 </DD>
591 <DT>#move/</DT>
592 <DD>This namespace is interpreted locally by <EM>Alpine</EM>. It has an unusual interpretation and format.
594 <CENTER><SAMP>#move&lt;DELIM&gt;&lt;MailDropFolder&gt;&lt;DELIM&gt;&lt;DestinationFolder&gt;</SAMP></CENTER>
596 The <CODE>#move</CODE> namespace is followed by two folder names separated by a delimiter
597 character.
598 The delimiter character may be any character which does not appear in
599 the <CODE>MailDropFolder</CODE> name.
600 The meaning of <CODE>#move</CODE> is that mail will be copied from the <CODE>MailDropFolder</CODE> to
601 the <CODE>DestinationFolder</CODE> and then deleted (if possible) from the <CODE>MailDropFolder</CODE>.
602 Periodic checks at frequency
603 <A HREF="config.html#mail-check"><EM>Mail-Check-Interval</EM></A>, but with a minimum time between checks set by
604 <A HREF="config.html#maildrop-check-minimum"><EM>MailDrop-Check-Minimum</EM></A>,
605 are made for new mail arriving in the <CODE>MailDropFolder</CODE>.
606 An example which copies mail from a POP inbox to a local folder follows
608 <CENTER><SAMP>#move+{popserver.example.com/pop3/ssl}inbox+local folder</SAMP></CENTER>
610 To you it appears that mail is being delivered to the local folder when it
611 is copied from the <CODE>MailDropFolder</CODE>, and you read mail from the local folder.
613 Note that if the <CODE>DestinationFolder</CODE> does not exist then the messages are not
614 copied from the <CODE>MailDropFolder</CODE>.
615 A <CODE>#move</CODE> folder may only be used as an
616 <A HREF="config.html#enable-incoming-folders"><EM>Incoming folder</EM></A> or
617 an Inbox.
618 When you are in the FOLDER LIST of Incoming Message Folders (after turning
619 on the enable-incoming-folders option)
620 the Add command has a subcommand &quot;Use Mail Drop&quot;
621 which may be helpful for defining the folder in your <EM>Alpine</EM> configuration.
622 The same is true when you edit the
623 <A HREF="config.html#inbox-path"><EM>Inbox-Path</EM></A>
624 option in Setup/Config.
625 Each of these configuration methods will also create the <CODE>DestinationFolder</CODE>
626 if it doesn't already exist.
627 If you are having problems, make sure the <CODE>DestinationFolder</CODE> exists.
628 </DD>
629 </DL>
632 In addition, the server may support access to other user's folders,
633 provided you have suitable permissions. Common methods use a prefix
634 of either &quot;~<VAR>user</VAR>/&quot;, or &quot;/<VAR>user</VAR>/&quot; to
635 indicate the root of the other user's folder area.
638 <HR>
640 <H2><A NAME="maildrop">What is a Mail Drop?</A></H2>
642 In some situaions it may make sense to have your mail delivered to one
643 folder (the Mail Drop) and then when you want to read mail that has been
644 delivered to the Mail Drop folder <EM>Alpine</EM> will move it to another
645 destination folder.
646 Often the Mail Drop will be a remote folder and messages will be moved from
647 there to a local destination folder.
650 One example where this might make sense is if the Mail Drop folder is accessible
651 only with the POP protocol.
652 You could designate your POP inbox as the Mail Drop folder and have <EM>Alpine</EM> move
653 mail from there to a local (on the same machine <EM>Alpine</EM> is running on)
654 destination folder, where you'll read it.
657 A Mail Drop may only be used as your Inbox or as an
658 <A HREF="config.html#enable-incoming-folders"><EM>Incoming folder</EM></A>.
661 There is no attempt to synchronize the contents of the destination folder
662 with the contents of the Mail Drop folder.
663 All that happens is that all of the messages in the Mail Drop folder are
664 copied to the destination folder and then they are deleted and expunged (if possible)
665 from the Mail Drop folder.
666 The next time a check for new mail is made, any messages in the Mail
667 Drop folder are once again copied to the destination folder and deleted
668 and expunged from the Mail Drop folder.
669 (If the Mail Drop folder is a news group, then the messages can't be
670 expunged from the newsgroup. Instead, only Recent messages are copied from
671 the newsgroup to the destination folder.)
674 Configuration of a Mail Drop is a little different from configuration of
675 a folder which does not use a Mail Drop because you have to specify two
676 folder names instead of one.
677 The two folders may be any types of folders that <EM>Alpine</EM> can normally use.
678 They don't have to be a remote folder and a local folder, that is
679 simply the most common usage.
680 When you use a Mail Drop folder <EM>Alpine</EM> will periodically re-open the Mail
681 Drop to check for new mail.
682 The new-mail checks will happen at the frequency set with the
683 <A HREF="config.html#mail-check"><EM>Mail-Check-Interval</EM></A> option,
684 but with a minimum time
685 (<A HREF="config.html#maildrop-check-minimum"><EM>MailDrop-Check-Minimum</EM></A>)
686 between checks.
687 Because of this minimum you may notice that new mail does not
688 appear promptly when you expect it.
689 The reason for this is to protect the server from over-zealous opening and
690 closing of the Mail Drop folder.
691 If the user initiates the check by typing ^L (Ctrl-L) or the Next command when at
692 the end of the folder index, then the check will happen, regardless of how
693 long it has been since the previous check.
695 If there is new mail, that mail will be copied to the destination folder
696 and then will be deleted from the Mail Drop.
697 Note that using a Mail Drop with a local destination folder does not make
698 sense if you read mail from more than one machine, because the mail is
699 downloaded to the destination folder (which is accessible from only one
700 machine) and deleted from the Mail Drop.
702 The feature <A HREF="config.html#maildrops-preserve-state"><EM>Maildrops-Preserve-State</EM></A>
703 modifies the operation of Mail Drops.
706 The actual syntax used by <EM>Alpine</EM> for a folder that uses a Mail Drop is:
709 <CENTER><SAMP>#move&lt;DELIM&gt;&lt;MailDropFolder&gt;&lt;DELIM&gt;&lt;DestinationFolder&gt;</SAMP></CENTER>
711 The brackets are not literal.
713 <CENTER><SAMP>&lt;DELIM&gt;</SAMP></CENTER>
715 is a single character which does not appear in the <CODE>MailDropFolder</CODE> name.
716 If the name doesn't contain spaces then it can be a space character.
717 The two folder names are full technical
718 <A HREF="#server-name-syntax"><EM>folder names</EM></A>
719 as used by <EM>Alpine</EM>.
720 Here are a couple examples to give you an idea what is being talked about:
723 <CENTER><SAMP>#move&nbsp;{popserver.example.com/pop3}inbox&nbsp;localfolder</SAMP></CENTER>
725 <CENTER><SAMP>#move+{nntpserver.example.com/nntp}#news.comp.mail.pine+local&nbsp;folder</SAMP></CENTER>
728 A #move folder may only be used as an
729 <A HREF="config.html#enable-incoming-folders"><EM>Incoming folder</EM></A> or
730 an Inbox.
731 When you are in the FOLDER LIST of Incoming Message Folders (after turning
732 on the Enable-Incoming-Folders option)
733 the Add command has a subcommand &quot;Use Mail Drop&quot;
734 which may be helpful for defining the folder in your <EM>Alpine</EM> configuration.
735 The same is true when you edit the
736 <A HREF="config.html#inbox-path"><EM>Inbox-Path</EM></A>
737 option in Setup/Config.
738 </CODE>
739 if it doesn't already exist.
740 If you are having problems, make sure the <CODE>DestinationFolder</CODE> exists.
743 <HR>
745 <H2><A NAME="sorting">Sorting a Folder</A></H2>
747 The mail index may be sorted by arrival, date, subject,
748 from, size, score, to, or cc order.
749 Each sort order can also be reversed. The <EM>$</EM> command will
750 prompt the user for the sort order. The sort order can also be specified
751 on the command line with the <EM>-sort</EM> flag or (equivalently) with
752 the <A HREF="config.html#sort-key"><EM>sort-key</EM></A> variable in
753 the <EM>pinerc</EM> file.
754 When a user changes folders, the sort order will go back to the original
755 sort order.
756 The command line (<EM>-sort</EM>) or configuration file sort specification
757 (<EM>sort-key</EM>) changes the original sort order. <P>
759 When a folder is sorted and new mail arrives in the folder it will be
760 inserted in its properly sorted place. This can be a little odd when the
761 folder is sorted by something like the subject. It can also be a little
762 slow if you are viewing a large, sorted <EM>INBOX</EM>,
763 since the <EM>INBOX</EM> will have
764 to be re-sorted whenever new mail arrives. <P>
766 The sorts are all independent of case and ignore leading or trailing white
767 space. There are actually two forms of subject sort. One called
768 <EM>Subject</EM> and the other called <EM>OrderedSubj</EM>.
769 They both ignore "Re:" at
770 the beginning and "(fwd)" at the end of the subjects.
771 <EM>Subject</EM> sorts all the subjects alphabetically.
772 <EM>OrderedSubj</EM> sorts by subjects alphabetically,
773 groups messages with the same subject (pseudo-threads),
774 then sorts the groups by the date of the first message of the group.
775 Sorting by <EM>Thread</EM> was added after <EM>OrderedSubj</EM>
776 and is usually a better method.
777 Thread sorting uses information in the message headers References,
778 Message-ID, and Subject.
779 It is possible the sort will be slightly slower with a Thread sort than
780 with an OrderedSubj sort.
782 sort by sender sorts by the user-id (part before the "@"), not the full name.
783 The arrival sort is no sort at all and the date
784 sort depends on the format of the date.
785 Some dates are in strange formats and are unparsable.
786 The time zone is also taken into account. <P>
788 Sorting large mail folders can be very slow since it requires fetching all
789 the headers of the mail messages.
790 With UNIX <EM>Alpine</EM>, only the first sort is slow since <EM>Alpine</EM>
791 keeps a copy of all the headers. One exception is sorting
792 in reverse arrival order. This is fast because no headers have to be
793 examined. <EM>Alpine</EM> will show progress as it is sorting. <P>
795 <HR>
797 <H2><A NAME="alt-ed">Alternate Editor</A></H2>
799 In the <EM>Alpine</EM> composer you can use any text editor,
800 such as <EM>vi</EM> or <EM>emacs,</EM> for composing the message text.
801 The addresses and subject still must be edited using the standard
802 <EM>Alpine</EM> composer.
803 If you include the feature
804 <A HREF="config.html#enable-alt-ed"><EM>enable-alternate-editor-cmd</EM></A>
805 in your <EM>pinerc</EM> you can type <EM>^_</EM> while in the body of
806 the message in the composer and be prompted for the editor.
807 If you also set the <A HREF="config.html#editor"><EM>editor</EM></A> variable
808 in your <EM>pinerc</EM> then <EM>^_</EM> will invoke the configured
809 editor when you type it. <P>
811 Turning on the feature
812 <A HREF="config.html#enable-alt-imp"><EM>enable-alternate-editor-implicitly</EM></A>
813 will automatically invoke the editor you have defined with the <EM>editor</EM>
814 variable whenever you enter the body of a message you are composing. For
815 example, when you move out of the last header line and into the body of
816 the message, the alternate editor will be automatically invoked. <P>
818 We know that many people would like to use the alternate editor to edit
819 the mail header as well. We considered several designs for this and
820 didn't come up with one that we liked and that was easy to implement. One
821 of the main problems is that you lose access to the address book. <P>
823 <HR>
825 <H2><A NAME="signature">Signatures and Signature Placement</A></H2>
827 If the file <EM>~/.signature</EM> (UNIX) or
828 <EM>&lt;PINERC</EM>directory&gt;\PINE.SIG (PC) exists, it will be included
829 in all outgoing messages. It is included before composition starts so
830 that the user has a chance to edit it out if he or she likes. The file
831 name for the signature can be changed by setting the
832 <A HREF="config.html#sig-file"><EM>signature-file</EM></A>
833 variable in the <EM>pinerc</EM>.
834 If the feature <A HREF="config.html#sig-dash"><EM>enable-sigdashes</EM></A>
835 is turned on then the line consisting of the
836 three characters "<CODE>-- "</CODE> is prepended to the signature file.
837 When Replying or Forwarding a message different signatures my be automatically
838 included by configuring them in the
839 <A HREF="config.html#role-config"><EM>Roles</EM></A>
840 setup screen.
841 It's easy to include different signatures by hand, by having multiple
842 signature files (<EM>.sig1, .sig2, .sig3, etc</EM>) and choosing to
843 include (^R in the composer) the correct one for the message being sent.
846 <EM>Alpine</EM>'s default behavior encourages
847 a user to put his or her contribution
848 before the inclusion of the original text of the message being forwarded
849 or replied to, This is contrary to some conventions, but makes the
850 conversation more readable when a long original message is included in a
851 reply for context. The reader doesn't have to scroll through the original
852 text that he or she has probably already seen to find the new text. If
853 the reader wishes to see the old message(s), the reader can scroll further
854 into the message. Users who prefer to add their input at the end of a
855 message should set
856 the <A HREF="config.html#sig-at-bot"><EM>signature-at-bottom</EM></A> feature.
857 The signature will then be appended to the end of
858 the message after any included text.
859 This feature applies when <EM>Reply</EM>ing, not when <EM>Forward</EM>ing. <P>
861 <HR>
863 <H2><A NAME="feature-list">Feature List Variable</A></H2>
865 <EM>Alpine</EM> used to have <EM>feature levels</EM> for
866 users with different amounts of experience.
867 We found that this was too restrictive. <EM>Alpine</EM> now has a
868 <A HREF="config.html#feat-list"><EM>feature-list</EM></A> instead.
869 Each user may pick and choose which
870 features they would like enabled (simple to do in the <EM>Setup/Config</EM>
871 screen). There is a short description of each in <A HREF="config.html#features-conf"><EM>Configuration Features</EM></A>. There is also a short on-line
872 help explaining the effect of each of
873 the features in the <EM>Setup/Config</EM> screen.
874 When the cursor is highlighting
875 a feature, the <EM>?</EM> command will show the help text for that feature.
876 Features don't have values, they are just turned on or off. They are all
877 off by default. <P>
879 The <EM>feature-list</EM> variable is different from all other
880 configuration variables in that its value is additive. That is, the
881 system-wide configuration file can have some features turned on by
882 default. The user can select other features in their personal
883 configuration file and those features will be <STRONG>added</STRONG> to
884 the set of features turned on in the system-wide configuration file.
885 (With all other configuration variables, the user's values
886 <STRONG>replace</STRONG> the system-wide values.) Likewise, additional
887 features may be set on the command-line with the argument
888 "-feature-list=". These will be added to the others. <P>
890 The treatment of <EM>feature-list</EM> in the system-wide <EM>fixed</EM>
891 configuration file is also different from other variables. The system
892 management can fix the value of individual features by placing them in the
893 fixed configuration file. Users will not be able to alter those features,
894 but will still be able to set the other non-restricted features the way
895 they like. <P>
897 Because <EM>feature-list</EM> is additive, there is a way to turn features
898 off as well as on. Prepending the prefix "no-" to any feature sets it to
899 off. This is useful for over-riding the system-wide default in the
900 personal configuration file or for over-riding the system-wide default or
901 the personal configuration value on the command line. For example, if the
902 system-wide default configuration has the <EM>quit-without-confirm</EM>
903 feature set, the user can over-ride that (and turn it off) by including
904 <EM>no-quit-without-confirm</EM> in the personal configuration file or by
905 giving the command line argument
906 <EM>-feature-list=no-quit-without-confirm.</EM> More features (options)
907 will no doubt continue to be added. <P>
909 <HR>
911 <H2><A NAME="config-inheritance">Configuration Inheritance</A></H2>
913 We start with an explanation of how configuration works in hopes of making
914 it easier to describe how inheritance works.
916 <EM>Alpine</EM> uses a hierarchy of configuration values from different locations.
917 There are five ways in which each configuration option (configuration
918 variable) can be set.
919 In increasing order of precedence they are:
921 <OL>
922 <LI> the system-wide configuration file.
924 <LI> the personal configuration file
926 <LI> the personal exceptions file
928 <LI> a command line argument
930 <LI> the system-wide <EM>fixed</EM> configuration file (Unix <EM>Alpine</EM> only)
931 </OL>
933 The fixed configuration file is normally
934 <CODE>/usr/local/lib/pine.conf.fixed</CODE>.
936 The system-wide configuration file is normally
937 <CODE>/usr/local/lib/pine.conf</CODE> for Unix <EM>Alpine</EM> and is normally not
938 set for <EM>PC-Alpine</EM>.
939 For <EM>PC-Alpine</EM>, if the environment variable <EM>$PINECONF</EM> is set, that
940 is used for the system-wide configuration.
941 This location can be set or changed on the command line with the -P flag.
942 The system-wide configuration file can be either a local file or a
943 remote configuration folder.
945 For Unix <EM>Alpine</EM>, the personal configuration file is normally the file
946 <CODE>.pinerc</CODE> in the user's home directory.
947 This can be changed with the -p command line flag.
948 For <EM>PC-Alpine</EM>, the personal configuration file is in
949 <CODE>$PINERC</CODE> or <CODE>&lt;PineRC registry value&gt;</CODE> or
950 <CODE>${HOME}&#92;ALPINE&#92;PINERC</CODE> or
951 <CODE>&lt;ALPINE.EXE </CODE>dir<CODE>&gt;&#92;PINERC</CODE>.
952 This can be changed with the -p command line flag.
953 If -p or <CODE>$PINERC</CODE> is used, the configuration data may be in
954 a local file or a remote config folder.
956 For Unix <EM>Alpine</EM>, the personal exceptions configuration file is
957 specified with the &quot;-x exceptions_config&quot; command line argument.
958 &quot;Exceptions_config&quot; may be either a local file or a remote
959 configuration folder.
960 If there is no &quot;-x&quot; command line option,
961 <EM>Alpine</EM> will look for the file &quot;<CODE>.pinercex</CODE>&quot;
962 in the same local directory that the regular config file is located in.
963 If the regular config file is remote then Unix <EM>Alpine</EM> looks in the home
964 directory for &quot;<CODE>.pinercex</CODE>&quot;.
966 For <EM>PC-Alpine</EM>, the personal exceptions configuration file is
967 specified with the &quot;-x exceptions_config&quot; command line argument.
968 If there is no &quot;-x&quot; command line argument the environment
969 variable <CODE>$PINERCEX</CODE> may be set to the name of the
970 &quot;exceptions_config&quot; instead.
971 &quot;Exceptions_config&quot; may be either a local file or a remote
972 configuration folder.
973 If there is no &quot;-x&quot; command line option and <CODE>$PINERCEX</CODE>
974 is not set,
975 <EM>PC-Alpine</EM> will look for the file &quot;<CODE>PINERCEX</CODE>&quot;
976 in the same local directory that the regular config file is located in.
977 If the regular config file is remote then <EM>PC-Alpine</EM> looks in the
978 local directory specified by the &quot;-aux local_directory&quot; command
979 line argument, or the directory <CODE>${HOME}&#92;ALPINE</CODE>, or
980 in <CODE>&lt;ALPINE.EXE </CODE>directory<CODE>&gt;</CODE> for a file named
981 &quot;<CODE>PINERCEX</CODE>&quot;.
983 To reiterate, the value of a configuration option is taken from the
984 last location in the list above in which it is set.
985 Or, thinking about it slightly differently, a default value for an option
986 is established in the system-wide configuration file (or in the source
987 code if there is no value in the system-wide file).
988 That default remains in effect until and unless it is overridden by a value in a
989 location further down the list, in which case a new &quot;default&quot;
990 value is established.
991 As we continue down the list of locations we either retain the
992 value at each step or establish a new value.
993 The value that is still set after going through the whole list of
994 configuration locations is the one that is used.
996 So, for example, if an option is set in the system-wide configuration
997 file and in the personal configuration file, but is not set in the
998 exceptions, on the command line, or in the fixed file; then the value
999 from the personal configuration file is the one that is used.
1000 Or, if it is set in the system-wide config, in the personal config, not
1001 in the exceptions, but is set on the command line; then the value
1002 on the command line is used.
1004 Finally we get to inheritance.
1005 For configuration options which are lists, like &quot;smtp-server&quot; or
1006 &quot;incoming-folders&quot;,
1007 the inheritance mechanism makes it possible to <EM>combine</EM>
1008 the values from different locations instead of <EM>replacing</EM> the value.
1009 This is true of all configuration lists other than the &quot;feature-list&quot;,
1010 for which you may already set whatever you want at
1011 any configuration location (by using the &quot;no-&quot; prefix if
1012 necessary).
1014 To use inheritance, set the first item in a configuration list to the
1015 token &quot;INHERIT&quot;.
1016 If the first item is &quot;INHERIT&quot;,
1017 then instead of replacing the default value established so far, the rest of
1018 the list is appended to the default value established so far and that is
1019 the new value.
1021 Here is an example which may make it clearer. Suppose we have:
1023 <PRE>
1024 System-wide config : smtp-server = smtp1.corp.com, smtp2.corp.com
1025 Personal config : smtp-server = INHERIT, mysmtp.home
1026 Exceptions config : smtp-server = &lt;No Value Set&gt;
1027 Command line : smtp-server = &lt;No Value Set&gt;
1028 Fixed config : smtp-server = &lt;No Value Set&gt;
1029 </PRE>
1032 This would result in an effective smtp-server option of
1034 <PRE>
1035 smtp-server = smtp1.corp.com, smtp2.corp.com, mysmtp.home
1036 </PRE>
1038 The &quot;INHERIT&quot; token can be used in any of the configuration files
1039 and the effect cascades.
1040 For example, if we change the above example to:
1042 <PRE>
1043 System-wide config : smtp-server = smtp1.corp.com, smtp2.corp.com
1044 Personal config : smtp-server = INHERIT, mysmtp.home
1045 Exceptions config : smtp-server = INHERIT, yoursmtp.org
1046 Command line : smtp-server = &lt;No Value Set&gt;
1047 Fixed config : smtp-server = &lt;No Value Set&gt;
1048 </PRE>
1051 This would result in:
1053 <PRE>
1054 smtp-server = smtp1.corp.com, smtp2.corp.com, mysmtp.home, yoursmtp.org
1055 </PRE>
1057 Unset variables are skipped over (the default value is carried forward) so
1058 that, for example:
1060 <PRE>
1061 System-wide config : smtp-server = smtp1.corp.com, smtp2.corp.com
1062 Personal config : smtp-server = &lt;No Value Set&gt;
1063 Exceptions config : smtp-server = INHERIT, yoursmtp.org
1064 Command line : smtp-server = &lt;No Value Set&gt;
1065 Fixed config : smtp-server = &lt;No Value Set&gt;
1066 </PRE>
1069 produces:
1071 <PRE>
1072 smtp-server = smtp1.corp.com, smtp2.corp.com, yoursmtp.org
1073 </PRE>
1076 If any later configuration location has a value set (for a particular list
1077 option) which does <EM>not</EM> begin with &quot;INHERIT&quot;,
1078 then that value replaces whatever value has been defined up to that point.
1079 In other words, that cancels out any previous inheritance.
1081 <PRE>
1082 System-wide config : smtp-server = smtp1.corp.com, smtp2.corp.com
1083 Personal config : smtp-server = INHERIT, mysmtp.org
1084 Exceptions config : smtp-server = yoursmtp.org
1085 Command line : smtp-server = &lt;No Value Set&gt;
1086 Fixed config : smtp-server = &lt;No Value Set&gt;
1087 </PRE>
1090 results in:
1092 <PRE>
1093 smtp-server = yoursmtp.org
1094 </PRE>
1097 For some configuration options, like &quot;viewer-hdr-colors&quot; or
1098 &quot;patterns-roles&quot;, it is
1099 difficult to insert the value &quot;INHERIT&quot; into the list of values
1100 for the option using the normal Setup tools.
1101 In other words, the color setting screen (for example) does not
1102 provide a way to input the text &quot;INHERIT&quot; as the first
1103 item in the viewer-hdr-colors option.
1104 The way to do this is to either edit the pinerc file directly and manually
1105 insert it, or turn on the &quot;expose-hidden-config&quot; feature and insert it
1106 using the Setup/Config screen.
1109 <HR>
1111 <H2><A NAME="env-variables">Using Environment Variables</A></H2>
1113 The values of <EM>Alpine</EM> configuration options may include environment variables
1114 which are replaced by the value of the variable at the time <EM>Alpine</EM> is run
1115 (and also at the time the config option is changed).
1116 The syntax to use environment variables is a subset of the common Unix
1117 shell dollar-syntax.
1118 For example, if
1120 <P><CENTER><SAMP>$VAR</SAMP></CENTER><P>
1122 appears in the value of a <EM>Alpine</EM> configuration option it is looked up in the
1123 environment (using getenv(&quot;VAR&quot;)) and its
1124 looked-up value replaces the <SAMP>$VAR</SAMP> part of the option value.
1125 To include a literal dollar sign you may precede the dollar sign with another
1126 dollar sign.
1127 In other words, if the text
1129 <P><CENTER><SAMP>$$text</SAMP></CENTER><P>
1131 is the value of a configuration option, it will be expanded to
1133 <P><CENTER><SAMP>$text</SAMP></CENTER><P>
1135 and no environment lookup will be done.
1136 For Unix <EM>Alpine</EM> it will also work to use a backslash character to
1137 escape the special meaning of the dollar sign, but $$ is preferable since
1138 it works for both <EM>PC-Alpine</EM> and Unix <EM>Alpine</EM>, allowing the configuration option
1139 to be in a shared configuration file.
1142 This all sounds more complicated than it actually is.
1143 An example may make it clearer.
1144 Unfortunately, the way in which environment variables are set is OS-dependent
1145 and command shell-dependent.
1146 In some Unix command shells you may use
1148 <P><CENTER><SAMP>PERSNAME="Fred Flintstone"</SAMP></CENTER><P>
1149 <CENTER><SAMP>export PERSNAME</SAMP></CENTER><P>
1151 Now, if you use <EM>Alpine</EM>'s Setup/Config screen to set
1153 <P><CENTER><SAMP>personal-name=$PERSNAME</SAMP></CENTER><P>
1155 the <SAMP>$PERSNAME</SAMP> would be replaced by <SAMP>Fred Flintstone</SAMP>
1156 so that this would be equivalent to
1158 <P><CENTER><SAMP>personal-name=Fred Flintstone</SAMP></CENTER><P>
1160 Note, environment variable substitution happens after configuration
1161 options which are lists are split into the separate elements of the list,
1162 so a single environment variable can't contain a list of values.
1165 The environment variable doesn't have to be the only thing
1166 after the equal sign.
1167 However, if the name of the variable is not at the end of the line or
1168 followed by a space (so that you can tell where the variable name ends),
1169 it must be enclosed in curly braces like
1171 <P><CENTER><SAMP>${VAR}</SAMP></CENTER><P>
1173 It is always ok to use the braces even if you don't need to.
1175 It is also possible to set a default value for an environment variable.
1176 This default value will be used if the environment variable is not
1177 set (that is, if getenv(&quot;VAR&quot;) returns NULL).
1178 The syntax used to set a default value is
1180 <P><CENTER><SAMP>${VAR:-default value}</SAMP></CENTER><P>
1182 If the config file contains
1184 <P><CENTER><SAMP>personal-name=${VAR:-Fred Flintstone}</SAMP></CENTER><P>
1186 then when <EM>Alpine</EM> is run <SAMP>VAR</SAMP> will be looked up in the environment.
1187 If <SAMP>VAR</SAMP> is found then <SAMP>personal-name</SAMP> will have
1188 the value that <SAMP>VAR</SAMP> was set to, otherwise,
1189 <SAMP>personal-name</SAMP> will be set to <SAMP>Fred Flintstone</SAMP>,
1190 the default value.
1193 An example where an environment variable might be useful is the
1194 variable <SAMP>inbox-path</SAMP> in the global configuration file.
1195 Suppose most users used the server
1197 <P><CENTER><SAMP>imapserver.example.com</SAMP></CENTER><P>
1199 but that there were some exceptions who used
1201 <P><CENTER><SAMP>altimapserver.example.com</SAMP></CENTER><P>
1203 In this case, the system manager might include the following line in
1204 the systemwide default <EM>Alpine</EM> configuration file
1206 <P><CENTER><SAMP>inbox-path=${IMAPSERVER:-imapserver.example.com}</SAMP></CENTER><P>
1208 For the exceptional users adding
1210 <P><CENTER><SAMP>IMAPSERVER=altimapserver.example.com</SAMP></CENTER><P>
1212 to their environment should work.
1214 Another example might be the case where a user has to use a different
1215 SMTP server from work and from home.
1216 The setup might be something as simple as
1218 <P><CENTER><SAMP>smtp-server=$SMTP</SAMP></CENTER><P>
1220 or perhaps a default value could be given.
1221 Note that, as mentioned above, the variable <SAMP>SMTP</SAMP> cannot contain
1222 a list of SMTP servers.
1225 <HR>
1227 <H2><A NAME="smtp-server">SMTP Servers</A></H2>
1229 It is sometimes desirable to set <CODE>smtp-server=localhost</CODE>
1230 instead of setting
1231 <A HREF="config.html#sendmail-path"><EM>sendmail-path</EM></A>
1232 to overcome the inability to
1233 negotiate ESMTP options when <EM>sendmail</EM> is invoked with the
1234 <EM>-t</EM> option. Sendmail can also be subject to unacceptable delays
1235 due to slow DNS lookups and other problems. <P>
1237 It is sometimes desirable to configure an SMTP server on a port other
1238 than the default port 25. This may be used to provide an alternate
1239 service that is optimized for a particular environment or provides
1240 different features from the port 25 server. An example would be a program
1241 that negotiates ESMTP options and queues a message, but does not attempt
1242 to deliver messages. This would avoid delays frequently encountered when
1243 invoking <EM>sendmail</EM> directly. <P>
1245 A typical configuration would consist of
1247 <UL>
1249 <LI> A program that implements the SMTP or ESMTP protocol via stdio.
1251 <LI> An entry in <CODE>/etc/services</CODE> for the alternate service.
1253 <LI> An entry in <CODE>/etc/inetd.conf</CODE> for the alternate service.
1255 <LI> An entry in <CODE>/usr/local/lib/pine.conf</CODE>,
1256 <CODE>/usr/local/lib/pine.conf.fixed</CODE> or <CODE>~/.pinerc</CODE>.
1258 </UL>
1260 <HR>
1262 <H2><A NAME="mime.types">MIME.Types file</A></H2>
1264 <EM>Alpine</EM>'s MIME-TYPE support is based on code contributed by Hans Drexler
1265 &LT;drexler@mpi.nl&GT;. <EM>Alpine</EM> assigns MIME Content-Types according
1266 to file name extensions found in the system-wide files
1267 <CODE>/usr/local/lib/mime.types</CODE> and <CODE>/etc/mime.types</CODE>,
1268 and a user specific <CODE>~/.mime.types</CODE> file. <P>
1270 In Windows,
1271 <EM>Alpine</EM> looks in the same directory as the PINERC file and
1272 the same dir as ALPINE.EXE. This is similar to the UNIX situation with
1273 personal config info coming before potentially shared config data. An
1274 alternate search path can be specified by setting the
1275 <A HREF="config.html#mimetype-search-path"><EM>mimetype-search-path</EM></A>
1276 variable in the user or system-wide
1277 configuration or by setting the <CODE>MIMETYPES</CODE> environment
1278 variable. <P>
1280 These files specify file extensions that will be connected to a mime type.
1281 Lines beginning with a '<CODE>#</CODE>' character are treated as comments
1282 and ignored. All other lines are treated as a mime type definition. The
1283 first word is a <EM>type/subtype</EM> specification. All following words
1284 are file <EM>extensions</EM> belonging to that type/subtype. Words are
1285 separated by whitespace characters. If a file extension occurs more than
1286 once, then the first definition determines the file type and subtype.
1287 A couple sample lines from a mime.types file follow: <P>
1289 <PRE>
1290 image/gif gif
1291 text/html html htm
1292 video/mpeg mpeg mpg mpe<BR>
1293 </PRE>
1295 <HR>
1297 <H2><A NAME="color-config-notes">Color Details</A></H2>
1299 UNIX <EM>Alpine</EM> may display color if the terminal or terminal emulator you
1300 are using is capable of displaying colors.
1301 If the terminal supports ANSI color escape sequences you will be able to
1302 turn color on using the <A HREF="config.html#color-style">color-style</A>
1303 option and setting it to the value <EM>force-ansi-8color</EM> or
1304 <EM>force-ansi-16color</EM>.
1305 If instead you'd like <EM>Alpine</EM> to automatically detect whether or not
1306 you are on a color terminal, set <EM>color-style</EM> to <EM>use-termdef</EM>
1307 <EM>and</EM> configure the termcap entry to describe your terminal's
1308 color capabilities.
1311 If the <EM>color-style</EM> option is set to <EM>use-termdef</EM>,
1312 <EM>Alpine</EM> looks in
1313 the terminal capabilities database, TERMINFO or TERMCAP, depending on
1314 how <EM>Alpine</EM> was compiled, to decide whether or not your terminal is
1315 capable of color.
1316 For TERMINFO compiled <EM>Alpine</EM>s, the capabilities that are used for
1317 color are
1318 &quot;colors&quot;, &quot;setaf&quot;, &quot;setab&quot;,
1319 &quot;op&quot;, and &quot;bce&quot;.
1320 If you have a terminal with color capabilities described by
1321 the &quot;scp&quot; capability, <EM>Alpine</EM> does not support it.
1322 The capabilities
1323 &quot;setf&quot; and &quot;setb&quot; may be used instead of
1324 &quot;setaf&quot; and &quot;setab&quot;.
1325 The capability &quot;bce&quot; is optional and is used as an optimization,
1326 the other capabilities are required.
1327 For TERMCAP compiled <EM>Alpine</EM>s, the capabilities that are used for
1328 color are
1329 &quot;Co&quot;, &quot;AF&quot;, &quot;AB&quot;, &quot;op&quot;,
1330 and &quot;ut&quot;.
1331 The capabilities
1332 &quot;Sf&quot; and &quot;Sb&quot; may be used instead of
1333 &quot;AF&quot; and &quot;AB&quot;, though this isn't a useful feature.
1336 Here are some short descriptions of the capabilities listed
1337 above.
1338 The TERMINFO name is listed, followed by the TERMCAP name in parentheses.
1339 <DL COMPACT>
1341 <DT> <EM>colors</EM> (<EM>Co</EM>)
1343 <DD> The number of different colors.
1346 <DT> <EM>setaf</EM> (<EM>AF</EM>)
1348 <DD> Set ANSI foreground color.
1351 <DT> <EM>setab</EM> (<EM>AB</EM>)
1353 <DD> Set ANSI background color.
1356 <DT> <EM>setf</EM> (<EM>Sf</EM>)
1358 <DD> Set foreground color. Alternate form of <EM>setaf</EM>.
1361 <DT> <EM>setb</EM> (<EM>Sb</EM>)
1363 <DD> Set background color. Alternate form of <EM>setab</EM>.
1366 <DT> <EM>op</EM> (<EM>op</EM>)
1368 <DD> Set default pair to its original value.
1371 <DT> <EM>bce</EM> (<EM>ut</EM>)
1373 <DD> Screen is erased with current background color instead
1374 of default background.
1378 </DL>
1380 A standard ANSI terminal which supports color will have
1381 a TERMINFO entry which contains:
1382 <PRE>
1383 colors#8
1384 setaf=\E[3%p1%dm
1385 setab=\E[4%p1%dm
1386 op=\E[39;49m
1388 </PRE>
1390 or the TERMCAP equivalent:
1391 <PRE>
1392 Co#8
1393 AF=\E[3%dm
1394 AB=\E[4%dm
1395 op=\E[39;49m
1397 </PRE>
1400 If there are eight colors, the program uses colors 0, 1, ..., 7.
1401 For an ANSI terminal, the foreground color is set by sending the escape
1402 sequence &quot;Escape LeftBracket 3 color_number m&quot; to the terminal.
1403 The background color is set by sending the sequence
1404 &quot;Escape LeftBracket 4 color_number m&quot;.
1405 ANSI colors zero through seven are defined to be &quot;black&quot;,
1406 &quot;red&quot;, &quot;green&quot;, &quot;yellow&quot;, &quot;blue&quot;,
1407 &quot;magenta&quot;, &quot;cyan&quot;, and &quot;white&quot;.
1408 Some terminal emulators will swap blue and red and swap yellow and cyan.
1409 The capabilities &quot;setf&quot; and &quot;setb&quot; are usually designed
1410 for those terminals so that they will flip the color numbers 1 and 4 and
1411 the numbers 3 and 6 to compensate for this.
1412 <EM>Alpine</EM> will use the ANSI versions of the capabilities if they exist,
1413 and will use the non-ANSI versions (setf and setb) if the ANSI versions
1414 don't exist.
1415 Here's a version which does the flipping.
1416 This can only be used with TERMINFO <EM>Alpine</EM>s, because of the arithmetic,
1417 which is not supported by TERMCAP.
1418 <PRE>
1419 colors#8
1420 setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m
1421 setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m
1422 op=\E[39;49m
1424 </PRE>
1427 Some terminal emulators are capable of displaying eight more colors when
1428 the foreground colors 30-37 are replaced with 90-97 and the background
1429 colors 40-47 are replaced with 100-107.
1430 These terminals require a fancy termcap entry which can take foreground
1431 colors 0, 1, ..., 15 and map that into 30, 31, ..., 37, 90, 91, ..., 97,
1432 and similarly for the background colors.
1433 Here is a terminfo entry which will do just that:
1434 <PRE>
1435 colors#16
1436 setaf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%dm
1437 setab=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%dm
1438 op=\E[39;49m
1440 </PRE>
1441 and here is the termcap equivalent:
1442 <PRE>
1443 Co#16
1444 AF=\E[%i%i%>\001\034%>\045\064%dm
1445 AB=\E[%i%i%>\001\046%>\057\064%dm
1446 op=\E[39;49m
1448 </PRE>
1450 This is a terminfo entry for 16 colors that also does the color flipping:
1451 <PRE>
1452 colors#16
1453 setf=%p1%{8}%/%{6}%*%{3}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m
1454 setb=%p1%{8}%/%{6}%*%{4}%+\E[%d%p1%{8}%m%Pa%?%ga%{1}%=%t4%e%ga%{3}%=%t6%e%ga%{4}%=%t1%e%ga%{6}%=%t3%e%ga%d%;m
1455 op=\E[39;49m
1457 </PRE>
1460 If you are always using the same display it probably won't matter to you
1461 if the color pairs red/blue and cyan/yellow are flipped, since you'll
1462 always be seeing them flipped.
1463 You will get different defaults than on a display with them not flipped,
1464 but that's about all.
1465 If you are trying to use the same pinerc file from displays with different
1466 color characteristics, or from <EM>Alpine</EM> and <EM>PC-Alpine</EM>, you will
1467 have to be more careful.
1468 The colors numbered 0 through 7 may be used portably between different
1469 systems if you are careful to make them correspond to the ANSI order mentioned
1470 above.
1471 You can check this by looking at a color configuration screen for one of the
1472 colors.
1473 The first eight colors should be in the order above.
1474 If they aren't, you could fix that by modifying your termcap entry on
1475 the UNIX system.
1476 This is not possible if your system uses TERMCAP instead of TERMINFO.
1478 <HR>
1480 <H2><A NAME="smime-general">S/MIME Overview</A></H2>
1482 UNIX <EM>Alpine</EM> only.
1484 S/MIME is a standard for the public key encryption and signing of email.
1485 UNIX <EM>Alpine</EM> contains a basic implementation of S/MIME based on
1486 the <A HREF="http://www.openssl.org/">OpenSSL</A> libraries.
1488 Some limitations:
1489 <UL>
1490 <LI> There is no <EM>PC-Alpine</EM> implementation.
1491 <LI> There is no provision for checking for CRLs
1492 (Certificate Revocation Lists) in <EM>Alpine</EM>.
1493 <LI> This built-in S/MIME implementation is not compatible with and does not help with PGP.
1494 <LI> There is no mechanism available for feeding either an entire incoming
1495 or an entire outgoing message to an external
1496 filter and using that external filter to do S/MIME or PGP processing.
1497 <LI> Because the implementation currently uses OpenSSL, there is only a very
1498 limited integration with the Mac OS Keychain (the storing and access of
1499 public certificates).
1500 <LI> There is no way to view or manipulate the lists of certificates from
1501 within <EM>Alpine</EM>.
1502 </UL>
1504 The S/MIME configuration screen is reached by going to the Main Menu and typing
1505 the &quot;S&nbsp;Setup&quot; command followed by &quot;M&nbsp;S/MIME&quot;.
1508 <H3>S/MIME BASICS</H3>
1510 In order to digitally sign messages you send you must have a public/private key-pair.
1511 This may be obtained from a public Certificate Authority (CA) such as Thawte, Verisign, Comodo,
1512 or GoDaddy; or from a smaller CA such as a university which provides certificates for its
1513 users or a company which provides certificates for its workers.
1514 These certificates are bound to an email address, so the identity being verified is the
1515 email address not a person's name.
1517 Mail is signed by using the sender's private key, which only the owner of the private key
1518 has access to.
1519 The signature is verified using the signer's public key, which anyone can
1520 have access to.
1521 With <EM>Alpine</EM>, the first time you receive a signed message the public key of the
1522 sender will be stored for future use.
1525 Mail is encrypted using the recipient's public key and decrypted by
1526 the recipient with their private key.
1529 You need a key of your own in order to sign outgoing messages and to have others
1530 encrypt messages sent to you.
1531 You do not need a key of your own to verify signed messages sent by others or to
1532 encrypt messages sent to others.
1534 <H3>ALPINE S/MIME CERTIFICATE STORAGE</H3>
1536 By default UNIX <EM>Alpine</EM> stores the certificates it uses in a directory in your
1537 home directory.
1538 The directory name is
1540 <CENTER><SAMP>.alpine-smime</SAMP></CENTER>
1542 Within that directory are three subdirectories.
1543 Each of the three subdirectories contains files with PEM-encoded contents,
1544 the default format for OpenSSL.
1545 The &quot;<SAMP>public</SAMP>&quot; directory contains public certificates.
1546 The files within that directory have names that are email addresses with the
1547 suffix &quot;<SAMP>.crt</SAMP>&quot; appended.
1548 An example filename is
1550 <CENTER><SAMP>user@example.com.crt</SAMP></CENTER>
1552 The &quot;<SAMP>private</SAMP>&quot; directory contains private keys, probably just one for
1553 your private key.
1554 These are also email addresses but with the suffix &quot;<SAMP>.key</SAMP>&quot; instead.
1555 The third directory is &quot;<SAMP>ca</SAMP>&quot; and it contains certificates for any Certificate
1556 Authorities that you want to trust but that aren't contained in the set of system CAs.
1557 Those files may have arbitrary names as long as they end with the
1558 suffix &quot;<SAMP>.crt</SAMP>&quot;.
1560 <H3>HOW TO SIGN AND ENCRYPT</H3>
1562 If you have a certificate you may sign outgoing messages.
1563 After typing the Ctrl-X command to send a message you will see the prompt
1565 <CENTER><SAMP>Send message?</SAMP></CENTER>
1567 Available subcommands include &quot;G&nbsp;Sign&quot; and &quot;E&nbsp;Encrypt&quot;.
1568 Typing the &quot;G&quot; command will change the prompt to
1570 <CENTER><SAMP>Send message (Signed)?</SAMP></CENTER>
1572 Typing the &quot;E&quot; command will change the prompt to
1574 <CENTER><SAMP>Send message (Encrypted)?</SAMP></CENTER>
1576 You may even type both to get
1578 <CENTER><SAMP>Send message (Encrypted, Signed)?</SAMP></CENTER>
1581 <H3>HOW TO READ SIGNED OR ENCRYPTED MESSAGES</H3>
1583 The reading of a signed message should not require any special action on
1584 your part.
1585 There should be an editorial addition at the start of the message which
1586 says either
1588 <CENTER><SAMP>This message was cryptographically signed.</SAMP></CENTER>
1592 <CENTER><SAMP>This message was cryptographically signed but the signature could not be verified.</SAMP></CENTER>
1594 If an encrypted message is sent to you the encrypted text will not
1595 be shown.
1596 You will have to type the &quot;Ctrl-D&nbsp;Decrypt&quot; command (from the screen where
1597 you are viewing the message) and supply your passphrase when asked.
1599 For a signed or encrypted message there is also a &quot;Ctrl-E&nbsp;Security&quot; command
1600 which gives you some information about the certificate used to sign or encrypt the message.
1602 <H3>MISCELLANEOUS</H3>
1604 You may have access to a private certificate in the PKCS12 format,
1605 which would sometimes be in a file with a &quot;.p12&quot; suffix.
1606 The UNIX shell command
1608 <CENTER><SAMP>openssl pkcs12 -in file.p12 -out file.pem</SAMP></CENTER>
1610 may work to convert that from the PKCS12 format to the PEM format.
1611 Then that file could be placed in the &quot;<SAMP>private</SAMP>&quot;
1612 directory with a filename of your email address followed by the
1613 suffix &quot;<SAMP>.key</SAMP>&quot;.
1615 <HR>
1617 <H2><A NAME="pc-notes">Additional Notes on PC-Alpine</A></H2>
1619 Below are a few odds and ends worth mentioning about <EM>PC-Alpine</EM>. They have
1620 to do with DOS-specific behavior that is either necessary or useful (and
1621 sometimes both!). <P>
1623 As <EM>PC-Alpine</EM> runs in an environment with limited access control, accounting
1624 or auditing, an additional line is automatically inserted into the header
1625 of mail messages generated by <EM>PC-Alpine</EM>:
1627 <PRE>
1628 X-Sender: &lt;userid&gt;@&lt;imap.host&gt;<BR>
1629 </PRE>
1632 By popular demand of system administrators, <EM>PC-Alpine</EM> has been modified to
1633 prevent sending messages until the user has successfully logged into a
1634 remote mail server. Even though <EM>PC-Alpine</EM> cannot prevent users from
1635 changing the apparent identity of the sender of a message, the IMAP server
1636 login name and host name included in the <EM>X-Sender</EM> line
1637 provide some level of traceability by the recipient.
1638 However, this should not be considered a
1639 rigorous form of authentication. It is extremely lightweight, and is not
1640 a replacement for true authentication. <P>
1642 Hand in hand with authentication and accounting is user information.
1643 Since <EM>PC-Alpine</EM> has no user database to consult for <EM>user-id</EM>,
1644 <EM>personal-name</EM>, etc., necessary information must be provided by
1645 the user/installer before <EM>PC-Alpine</EM> can properly construct the "From"
1646 address required for outbound messages. <EM>PC-Alpine</EM> will, by default, prompt
1647 for the requisite pieces as they are needed. This information corresponds
1648 to the <EM>PINERC</EM> variables
1649 <A HREF="config.html#user-id"><EM>user-id</EM></A>,
1650 <A HREF="config.html#personal-name"><EM>personal-name</EM></A>,
1651 <A HREF="config.html#user-domain"><EM>user-domain</EM></A>,
1652 and <A HREF="config.html#smtp-server"><EM>smtp-server</EM></A>. <P>
1654 The user is then asked whether or not this information should
1655 automatically be saved to the <EM>PINERC</EM>. This is useful behavior in
1656 general, but can lead to problems in a lab or other shared environment.
1657 Hence, these prompts and automatic saving of configuration can be turned
1658 off on an entry by entry basis by setting any of the above values in the
1659 <EM>PINERC</EM> to the null string (i.e., a pair of double quotes). This
1660 means that the user will be prompted for the information once during each
1661 <EM>Alpine</EM> session, and no opportunity to save them in the <EM>PINERC</EM> will
1662 be offered. <P>
1664 Another feature of DOS is the lack of standard scratch area for temporary
1665 files. During the course of a session, <EM>PC-Alpine</EM> may require numerous
1666 temporary files (large message texts, various caches, etc.). Where to
1667 create them can be a problem, particularly when running under certain
1668 network operating systems. <EM>PC-Alpine</EM> observes the
1669 <EM>TMPDIR</EM>, <EM>TMP</EM>, and
1670 <EM>TEMP</EM> environment variables, and creates temporary files in the
1671 directory specified by either. In their absence, <EM>PC-Alpine</EM> creates these
1672 files in the root of the current working drive.
1673 Some temporary files have to be created in the same directory as the file
1674 they are a temporary copy of. For example, a pinerc file or a address book
1675 file.
1678 <!-- pnuts -->
1680 </BODY>
1681 </HTML>