* Implement a different way to delete a password from the cache.
[alpine.git] / doc / tech-notes / background.html
blobad3c9f2fbc2c0d099542e411be6d593e9e0066fa
1 <HTML><HEAD><TITLE>Alpine Technical Notes: Background Details</TITLE></HEAD><BODY>
2 <H1>Background Details</H1>
4 <H2><A NAME="DNS">Domain Names</A></H2>
6 <BR><P>
8 Domain names are used to uniquely name each host on the Internet. A
9 domain name has a number of parts separated by periods. Each label
10 represents a level in the hierarchy. An example of a name is:
12 <BLOCKQUOTE><CODE>
13 olive.cac.washington.edu
14 </CODE></BLOCKQUOTE>
16 In this domain name the top-level label is <EM>edu</EM>, indicating it is
17 at an educational institution, the second-level label is
18 <EM>washington</EM>, indicating the University of Washington.
19 <EM>cac</EM> is a specific department within the University of Washington,
20 and <EM>olive</EM> is the host name. The top-level names are assigned by
21 Internet organizations, and other names are assigned at the appropriate
22 level. The Domain Name Service, DNS, is the distributed database used to
23 look up these names. <P>
25 <EM>Alpine</EM> relies on domain names in multiple places.
26 A domain name is embedded
27 into the message-id line generated for each piece of email. A domain name
28 is needed to contact an IMAP server to get access to remote INBOXes and
29 folders. Most importantly, domain names are needed to construct the From:
30 line of your outgoing messages so that people on the Internet will be able
31 to get email back to you. <P>
33 On UNIX systems, you can set the domain via the <A
34 HREF="config.html#user-domain"><EM>user-domain</EM></A>
35 variable in the <EM>Alpine</EM> configuration file, or rely on the file
36 <CODE>/etc/hosts</CODE> which usually sets the name of the local host.
37 While <EM>Alpine</EM> can often deliver email without the domain name
38 being properly
39 configured, it is best to have this set correctly. Problems can usually be
40 solved by adjusting the system's entry in the <CODE>/etc/hosts</CODE>
41 file. The fully-qualified name should be listed before any abbreviations.
42 For example,
44 <BLOCKQUOTE><CODE>
45 128.95.112.99 olive.cac.washington.edu olive
46 </CODE></BLOCKQUOTE>
48 is preferred over
50 <BLOCKQUOTE><CODE>
51 128.95.112.99 olive olive.cac.washington.edu
52 </CODE></BLOCKQUOTE>
53 <P>
55 On PCs, the task of configuring the domain name is a bit different. Often
56 times PCs do not have domain names-they have <EM>IP addresses</EM>. IP
57 addresses are the numbers which uniquely identify a computer on the
58 network. The way you configure your IP address depends on the networking
59 software which you use on the PC. You can refer to the documentation
60 which came with your networking software or see the <A
61 HREF="installation.html#install-pc">PC specific installation notes</A> for
62 help configuring the IP address with your network software. <P>
64 With PCs, it is vital that users set the variable <A
65 HREF="config.html#user-domain"><EM>user-domain</EM></A> in the <EM>Alpine</EM>
66 configuration file (<CODE>PINERC</CODE>). <P>
68 Details on configuring <EM>Alpine</EM> with correct domain names can be
69 found in the <A HREF="config-notes.html#domain">Domain Settings</A>
70 section of this document. <P>
72 <HR>
74 <H2><A NAME="rfc2822">RFC 2822 Compliance</A></H2>
76 <EM>Alpine</EM> tries to adhere
77 to <A HREF="ftp://ftp.isi.edu/in-notes/rfc2822.txt">RFC 2822</A>
78 fairly strictly. <P>
80 As far as outgoing email is concerned, <EM>Alpine</EM> fully-qualifies addresses
81 whenever possible. They are even displayed in fully-qualified form on the
82 terminal as the user composes a message. This makes addresses more clear
83 and gives a hint to the user that the network extends beyond the local
84 organization.
85 <EM>Alpine</EM> implements fully-qualified domain names by tacking on
86 the local domain to all unqualified addresses which a user types in. Any
87 address which does not contain an "@" is considered unqualified. <P>
89 The format for addresses allows for spaces and special characters in
90 the full name of an address. For this reason, commas are required to
91 separate addresses. If any special characters as defined in RFC 2822
92 appear in the full name, quotes are required around the address. <EM>Alpine</EM>
93 will insert the quotes automatically if needed. The common cases where this happens
94 are with periods after initials and parentheses. <P>
96 <EM>Alpine</EM> expects dates to be in the standard RFC 822 format
97 which is something like:
99 <PRE>
100 [www, ] dd mmm yy hh:mm[:ss] [timezone]
101 </PRE>
103 It will attempt to parse dates that are not in this format. When an
104 unparsable date is encountered it is shown as question marks
105 in the FOLDER INDEX screen. <P>
107 <HR>
109 <H2><A NAME="SMTP">SMTP and Sendmail</A></H2>
111 <EM>Alpine</EM> is a <EM>user agent</EM> not a <EM>message transfer agent</EM> (MTA). In
112 plain English, that means <EM>Alpine</EM> does not know how to interact with other
113 computers on the Internet to deliver or receive email. What <EM>Alpine</EM> does
114 know how to do is help users read, organize and create email. The "dirty
115 work" of delivering and accepting email is handled by other programs. <P>
117 All outgoing email is delivered to an SMTP server
118 or to a mail transfer agent.
119 A common mail transfer agent is <CODE>sendmail</CODE>.
120 The usual method of delivery used by <EM>Alpine</EM> is to use either a
121 local or a remote SMTP server.
123 <P> The selection of which MTA to use depends on the settings of
124 <A HREF="config.html#smtp-server"><EM>smtp-server</EM></A>,
125 <A HREF="config.html#sendmail-path"><EM>sendmail-path</EM></A>,
126 and compile-time options.
127 The first MTA specified in the following list is used:
129 <OL>
131 <LI><EM>sendmail-path</EM> in
132 <CODE>/usr/local/lib/pine.conf.fixed</CODE>
134 <LI><EM>smtp-server</EM> in <CODE>/usr/local/pine.conf.fixed</CODE>
136 <LI><EM>sendmail-path</EM> specified on the command line.
138 <LI><EM>smtp-server</EM> specified in a role being used.
140 <LI><EM>smtp-server</EM> specified on the command line.
142 <LI><EM>sendmail-path</EM> in the user's <CODE>.pinerc</CODE> file.
144 <LI><EM>smtp-server</EM> in the user's <CODE>.pinerc</CODE> file.
146 <LI><EM>sendmail-path</EM> in <CODE>/usr/local/lib/pine.conf</CODE>
148 <LI><EM>smtp-server</EM> in <CODE>/usr/local/pine.conf</CODE>
150 <LI><CODE>DF_SENDMAIL_PATH</CODE> defined at compile time.
152 <LI><CODE>SENDMAIL</CODE> and <CODE>SENDMAILFLAGS</CODE> defined at
153 compile time.
155 </OL><P>
157 If the <EM>sendmail-path</EM> form is used, a child process is forked,
158 and the specified command is executed with the message passed on standard
159 input. Standard output is then passed back and displayed for the user.
160 <EM>NOTE: The program MUST read the message to be posted on standard
161 input, AND operate in the style of sendmail's "-t" option. This
162 method is not recommended unless there are special reasons you
163 want to do this. </EM><P>
165 If an <EM>smtp-server</EM> is specified,
166 <EM>Alpine</EM> operates as an SMTP client. SMTP stands for <EM>Simple Mail
167 Transfer Protocol</EM>; it specifies the rules by which computers on the
168 Internet pass email to one another. In this case, <EM>Alpine</EM> passes outgoing
169 email messages to a designated SMTP server instead of to a mail transfer
170 program on the local machine. A program on the server then takes care of
171 delivering the message. To make <EM>Alpine</EM> operate as an SMTP client, the
172 <A HREF="config.html#smtp-server"><EM>smtp-server</EM></A> variable
173 must be set to the IP address or
174 host name of the SMTP server within your organization. This variable accepts a
175 comma separated list of servers, so you can specify multiple alternate SMTP servers.
176 <EM>PC-Alpine</EM> only runs as an SMTP client so the <EM>smtp-server</EM>
177 option is mandatory. <P>
179 For UNIX <EM>Alpine</EM>,
180 if neither <EM>smtp-server</EM> or <EM>sendmail-path</EM> is set,
181 the default <CODE>sendmail</CODE> program is
182 invoked with the "<CODE>-bs -odb -oem</CODE>" flags, and the message
183 is sent using the SMTP protocol.
186 <HR>
188 <H2><A NAME="IMAP">Internet Message Access Protocol (IMAP)</A></H2>
190 IMAP is a remote access protocol for message stores. <EM>Alpine</EM> uses IMAP to get
191 at messages and folders which reside on remote machines. With IMAP,
192 messages are kept on the server. An IMAP client (such as <EM>Alpine</EM>) can
193 request specific messages, headers, message structures, message parts, etc. The client
194 can also issue commands which delete messages from folders on the server.
195 IMAP's closest kin is POP, the Post Office Protocol, which works by
196 transferring an entire mailbox to the client where all the mail is kept.
197 For a comparison of IMAP and POP, see the paper "<A
198 HREF="http://www.imap.org/imap.vs.pop.brief.html">Comparing Two Approaches
199 to Remote Mailbox Access: IMAP vs. POP</A>" by Terry Gray. A more
200 detailed exploration of message access may be found in the paper "<A
201 HREF="http://www.imap.org/imap.vs.pop.html"> Message Access Paradigms and
202 Protocols</A>."
205 IMAP Features:
207 <UL>
209 <LI> Allows access to mail folders from more than one client computer.
211 <LI> Works well over low-bandwidth lines because information is sent in
212 small pieces as needed by the user. For example, only header information
213 is sent to build index lists, and if someone sends a large audio file via
214 MIME, you can choose when (or if) you want to get that part of the
215 message.
217 <LI> Email can be delivered and stored on a well-maintained and reliable
218 server which is "always-up".
220 <LI> Folders can be accessed and manipulated from anywhere on the
221 Internet.
223 <LI> Users can get to messages stored in different folders within the same
224 <EM>Alpine</EM> session.
226 <LI> Allows use of IMAP server for searching and parsing.
228 <LI> The latest revision of IMAP (IMAP4) also provides for disconnected
229 operation, including resynchronization of message state between mail
230 servers and message caches on clients. <EM>Alpine</EM> does not support this
231 capability, however.
233 </UL>
235 IMAP4rev1 is described in <A
236 HREF="ftp://ftp.isi.edu/in-notes/rfc3501.txt">RFC 3501</A>. Further
237 information about IMAP may be obtained from the University of Washington's
238 <A HREF="http://www.washington.edu/imap/">IMAP Information Center</A>.<P>
240 <EM>Alpine</EM> is an IMAP4rev1 client.
243 <HR>
245 <H2><A NAME="MIME">Multipurpose Internet Mail Extensions (MIME)</A></H2>
247 MIME is a way of encoding a multipart message structure into a standard
248 Internet email message. The parts may be nested and may be of seven
249 different types: Text, Audio, Image, Video, Message, Application and
250 Multipart (nested). The MIME specification allows email programs such as
251 <EM>Alpine</EM> to reliably and simply exchange binary data (images, spreadsheets,
252 etc.). MIME includes support for international character sets, tagging each
253 part of a message with the character set it is written in, and providing
254 7-bit encoding of 8-bit character sets. <P>
256 The MIME standard was officially published in June of 1992 as <A
257 HREF="ftp://ftp.isi.edu/in-notes/rfc1341.txt">RFC 1341</A> and subsequently
258 revised in <A HREF="ftp://ftp.isi.edu/in-notes/rfc2045.txt">RFC 2045</A>
259 when it became a full Internet Standard. <EM>Pine</EM> 3.0 was one of the first
260 email programs to Implement MIME. Now, there are dozens of commercial and
261 freely available MIME-capable email programs. In addition, MIME is being
262 added to newsreaders so MIME messages can be posted and read in USENET
263 newsgroups. <P>
265 The MIME standard also includes support for non-ASCII text in message
266 headers through the extensions described in <A
267 HREF="ftp://ftp.isi.edu/in-notes/rfc1342.txt">RFC 1342</A> and subsequently
268 revised in <A HREF="ftp://ftp.isi.edu/in-notes/rfc2047.txt">RFC 2047</A>. <P>
270 An actual MIME message looks something like this:
272 <PRE>
273 Date: Tue, 12 Mar 1996 15:39:35 -0800 (PST)
274 From: David L Miller &lt;dlm@cac.washington.edu&gt;
275 To: David L Miller &lt;dlm@cac.washington.edu&gt;
276 Subject: =?iso-8859-1?Q?Test_MIME_message_with_RFC-1522_headers_=28=E1?= =?iso-8859-1?Q?=E2=E3=29?=
277 Message-Id: &lt;Pine.ULT.3.92.960312150851.21583I-101000@shiva2.cac.washington.edu&gt;
278 Mime-Version: 1.0
279 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1737669234-826673975=:21583"
280 Content-Id: &lt;Pine.ULT.3.92.960312153928.21583O@shiva2.cac.washington.edu&gt;
282 This message is in MIME format. The first part should be readable text,
283 while the remaining parts are likely unreadable without MIME-aware tools.
284 Send mail to mime@docserver.cac.washington.edu for more info.
286 --0-1737669234-826673975=:21583
287 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
288 Content-ID: &lt;Pine.ULT.3.92.960312153104.21583L@shiva2.cac.washington.edu&gt;
290 The text of the message would go here. It is readable if
291 one doesn't mind wading around a little bit of the MIME
292 formatting. After this is a binary file in base 64
293 encoding.
295 |\ | |\/| David L. Miller dlm@cac.washington.edu (206) 685-6240
296 |/ |_ | | Software Engineer, Pine Development Team (206) 685-4045 (FAX)
297 University of Washington, Networks & Distributed Computing, JE-20
298 4545 15th Ave NE, Seattle WA 98105, USA
300 --0-1737669234-826673975=:21583
301 Content-Type: APPLICATION/ZIP; NAME="test.zip"
302 Content-Transfer-Encoding: BASE64
303 Content-ID: &lt;Pine.ULT.3.92.960312153638.21583N@shiva2.cac.washington.edu&gt;
304 Content-Description: Test Attachment
306 UEsDBBQAAAAIAGh8bCBbZKT4ygIAAHgFAAAEAAAAdGVzdIVUX2vbMBB/16c4
307 9rSBNyjsYX1UHSUROLInycv2qNhKI5ZYxlLa5dvvpDRLw6CFgJF09/t3Rxo3
308 WDBDD43rPJjJQpxMbw9m+h3AbyHuLLSDe7JTcPGUbtYm7NzwGP3wBYQnnT8c
309 7NQ5s4djsC8t4QbmYE6wsfjpLTy7uPPHCOPk/ATPk4vRDmS008GF4PzwPich
310 zY3m4LfxOQlPNy4GcEO3P/a2h2j/xGyp9ONpco+7CHf33+4/393ff4XNibzL
311 c1UVfXJXQIdIBRx877b4TYy9C3Fym2NEyzsX/pNDet8dD3aIJiagLbo2wwnG
312 4zT6cK66ZLK1NhH9J4tcZQEy7OxkNyd4nMwQbV9glP7JZb87E3O32fgnm7We
313 XQ8+us4SM47WTCkgMPt9enc2ZAW5c+Pj7o32l0IXXk/r8pSRE3A4jqOfIqqF
314 G+PFlSdRDOaQduXNESTwtDcYfJ8191gWXUjYmOJ43Oxdh11JTzRuSPcY37+B
315 vNqmf0O5RB1G27mt64rLCp4X8pW1L6BvxunCeYHNk3F7s9lb+GAwyvAhOyNE
316 Lxm0gv9gUnH9C+o5rKlacrHQtYAZV2VF+UoBrSp8kJIKzZkqgP1sJFMKagl8
317 1VSczQqy5noJki2onIGuQS+5AlXPNfaxArgoq3aGwJDq6lZDxVdcU82RKMG/
318 4JArTVKzYrJc4pE+8CoJpGIGc65FIp8jO4WGSs3LtqISmlY2tUKyVMUFETWw
319 H0xoUMvE8KbXB4aC6EPFzrDiF6iGlZxWBeFixiUrdXJb1kKx7y2C4hPM6Iou
320 WI4hdVyO6yXVqkZqiXmottLJ9lzWK1LVKttqk8oZ1TS1NrJGS5jqeslQI0aK
321 ieCvzNlgNZJqiccCc5WafLxmKdii4gsmSvYpISkteamzkRwXJiG5SoUpcERK
322 8xIE8QQ7o+eh5WAUy1qYRP8rioip/maI+OfyF1BLAQIUAxQAAAAIAGh8bCBb
323 ZKT4ygIAAHgFAAAEAAAAAAAAAAEAAACkgQAAAAB0ZXN0UEsFBgAAAAABAAEA
324 MgAAAOwCAAAAAA==
325 --0-1737669234-826673975=:21583--
327 </PRE>
329 For details about <EM>Alpine</EM>'s implementation of MIME, see the two MIME sections
330 "<A HREF="low-level.html#MIME-read">MIME: Reading a Message</A>" and
331 "<A HREF="low-level.html#MIME-send">MIME: Sending a Message</A>" later
332 in this document. <P>
334 <HR>
336 <H2><A NAME="collections">Folder Collections</A></H2>
338 Folder Collections are <EM>Alpine</EM>'s way of dealing with more than a single group
339 of folders. <P>
341 For a more complete description of Folder Collections, see the section on
342 "<A HREF="config-notes.html#collections">Syntax for Collections</A>." <P>
344 The <EM>Alpine</EM> distribution is designed to require as little configuration and
345 effort at compile time as possible. Still, there are some <EM>Alpine</EM> behaviors
346 which are set at the time you compile <EM>Alpine</EM>. For each of these, there is a
347 reasonable (our opinion) default built into the code, so most systems
348 administrators will have no need for these steps. <P>
350 <!-- pnuts -->
351 </BODY>
352 </HTML>