\documentstyle[12pt,titlepage,twoside]{article}

\tolerance 1400

\pagestyle{headings}

\title{AM --- AmigaMail}
\author{(C) 1991 Christian Riede}
\date{V1.14beta}

\begin{document}

\maketitle

\tableofcontents

\newpage\part{General}
\section{Introduction}
AM (AmigaMail) is a completely Intuition controlled mail userinterface for
use with AmigaUUCP and AmigaUUCP plus. 

This manual contains a user's manual and a technical description of AM.

Use and distribute AM under the Terms of the GNU General Public License.


Although  AM  runs quite stable now, please note that AM V1.14beta is still
beta!   Do  not  use  it  unless  you  are  familiar with some internals of
AmigaUUCP(+).   Wait  for the first final release that will come out really
soon now!

AM requires 2.04 (KS 37.175)

\newpage
\section{\sf GNU GENERAL PUBLIC LICENSE}
\begin{center}
\large		    GNU GENERAL PUBLIC LICENSE\\
		     Version 1, February 1989
\end{center}
\begin{flushleft}
Copyright \copyright\ 1989 Free Software Foundation, Inc.\\
675 Mass Ave, Cambridge, MA 02139, USA\\
~\\
Everyone is permitted to copy and distribute verbatim copies\\
of this license document, but changing it is not allowed.\\
\end{flushleft}
\subsection*{Preamble}
The license agreements of most software companies try to keep users
at the mercy of those companies.  By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.

When we speak of free software, we are referring to freedom, not
price.  Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
software, that you receive source code or can get it if you want it,
that you can change the software or use pieces of it in new free
programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

For example, if you distribute copies of a such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must tell them their rights.

We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

The precise terms and conditions for copying, distribution and
modification follow.
\subsection*{TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION}
\begin{enumerate}
\setcounter{enumi}{0}
\item This License Agreement applies to any program or other work which
contains a notice placed by the copyright holder saying it may be
distributed under the terms of this General Public License.  The
"Program", below, refers to any such program or work, and a "work based
on the Program" means either the Program or any work containing the
Program or a portion of it, either verbatim or with modifications.  Each
licensee is addressed as "you".

\item You may copy and distribute verbatim copies of the Program's source
code as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
General Public License and to the absence of any warranty; and give any
other recipients of the Program a copy of this General Public License
along with the Program.  You may charge a fee for the physical act of
transferring a copy.

\item You may modify your copy or copies of the Program or any portion of
it, and copy and distribute such modifications under the terms of Paragraph
1 above, provided that you also do the following:

\begin{enumerate}
\item cause the modified files to carry prominent notices stating that
you changed the files and the date of any change; and

\item cause the whole of any work that you distribute or publish, that
in whole or in part contains the Program or any part thereof, either
with or without modifications, to be licensed at no charge to all
third parties under the terms of this General Public License (except
that you may choose to grant warranty protection to some or all
third parties, at your option).

\item If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.

\item You may charge a fee for the physical act of transferring a
copy, and you may at your option offer warranty protection in
exchange for a fee.
\end{enumerate}

Mere aggregation of another independent work with the Program (or its
derivative) on a volume of a storage or distribution medium does not bring
the other work under the scope of these terms.

\item You may copy and distribute the Program (or a portion or derivative of
it, under Paragraph 2) in object code or executable form under the terms of
Paragraphs 1 and 2 above provided that you also do one of the following:

\begin{enumerate}
\item accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of
Paragraphs 1 and 2 above; or,

\item accompany it with a written offer, valid for at least three
years, to give any third party free (except for a nominal charge
for the cost of distribution) a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of
Paragraphs 1 and 2 above; or,

\item accompany it with the information you received as to where the
corresponding source code may be obtained.  (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form alone.)
\end{enumerate}

Source code for a work means the preferred form of the work for making
modifications to it.  For an executable file, complete source code means
all the source code for all modules it contains; but, as a special
exception, it need not include source code for modules which are standard
libraries that accompany the operating system on which the executable
file runs, or for standard header files or definitions files that
accompany that operating system.

\item You may not copy, modify, sublicense, distribute or transfer the
Program except as expressly provided under this General Public License.
Any attempt otherwise to copy, modify, sublicense, distribute or transfer
the Program is void, and will automatically terminate your rights to use
the Program under this License.  However, parties who have received
copies, or rights to use copies, from you under this General Public
License will not have their licenses terminated so long as such parties
remain in full compliance.

\item By copying, distributing or modifying the Program (or any work based
on the Program) you indicate your acceptance of this license to do so,
and all its terms and conditions.

\item Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the original
licensor to copy, distribute or modify the Program subject to these
terms and conditions.  You may not impose any further restrictions on the
recipients' exercise of the rights granted herein.

\item The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of the license which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.

\item If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
\nopagebreak
\subsection*{NO WARRANTY}
\item BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

\item  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
\end{enumerate}
\subsection*{END OF TERMS AND CONDITIONS}
\subsection*{Appendix: How to Apply These Terms to Your New Programs}

  If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

  To do so, attach the following notices to the program.  It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
\begin{flushleft}\tt
{\rm$<$one line to give the program's name and a brief idea of what it does.$>$}
Copyright (C) 19yy  $<${\em name of author}$>$

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
\end{flushleft}

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
\begin{flushleft}\tt
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
\end{flushleft}

The hypothetical commands `show w' and `show c' should show the
appropriate parts of the General Public License.  Of course, the
commands you use may be called something other than `show w' and `show
c'; they could even be mouse-clicks or menu items--whatever suits your
program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here a sample; alter the names:
\begin{flushleft}\tt
Yoyodyne, Inc., hereby disclaims all copyright interest in the
program `Gnomovision' (a program to direct compilers to make passes
at assemblers) written by James Hacker.

$<${\em signature of Ty Coon}$>$, 1 April 1989\\
Ty Coon, President of Vice
\end{flushleft}
That's all there is to it!

\newpage\part{User's Manual}
\setcounter{section}{0}
\section{Installation of AM}

\begin{enumerate}
\item make sure that you are running under WB/KS~2.04 (Kickstart
37.175)

\item   Install   AmigaUUCP   (or  AmigaUUCP  Plus)  as  described  in  the
documentation  for this software.

\item  Create an entry in {\tt GETTY:passwd} for each user you want to read
mail for.  AM needs the fieds for the User- and Realname.  For details look
at documentation for the UUCP-Package).

\item run the script aminstall.  This will copy all the necessary binaries.
You will be asked whether you use AmigaUUCP or AmigaUUCP Plus.

\item  if  you  are  running  Matt  Dillons AmigaUUCP, add the following to
UULIB:Config:

\begin{verbatim}
AMFlags	DUUCP
\end{verbatim}

(Case is important!)

\item  backup  and  delete  all  old  mailfolders  in {\tt UUMAIL:}.  AM is
totally incompatible with dmail!  Mailforwarding will work as usual, so you
just have to remove the actual mailfolders.

\item  set  the  environment  variable USERNAME to your Username.  (You can
read  mail  for  other  users than specified in this variable, this will be
explaines later)

\item  make  sure  that the entries "NodeName", "DomainName" and "TimeZone"
are   set   correctly   in   {\tt   UULIB:Config}  (see  Documentation  for
UUCP-Package).

\item When using AM from Workbench, set ToolTypes USERNAME and CONFIG (name
of config file with full path, normally {\tt UULIB:AM.Config})

\item delete dmail from your path to avoid starting it accidentally

\item When using ARN, add the following to .arnrc
\begin{center}\tt
SENDMAIL sendm \%s $<${\em username}$>$
\end{center}
to have replies archived correctly.  (insert your username, of course)

\item  when  you  are  using Matt Dillons AmigaUUCP, then create a line for
each user on the system in UULIB:Aliases as following:

\begin{verbatim}
<username>:: "|uucp:c/lmail <username>"
\end{verbatim}

\item when you are using the AUUCP+ sendmail (included in the AM
distrubution), create a  file in UUMAIL: for each user named <username>
with contents

\begin{verbatim}
forward to |uucp:c/lmail <username>
\end{verbatim}

Do  {\em  not}  use  the  original  AUUCP+  sendmail, at least the included
1.02j21 (thanks, wusel).

\item Add the following line to your {\tt s:user-startup}:

{\tt setenv TZ {\em timezone}}\\

Timezone  is  GMT-01 for MET, GMT-02 for MET DST.  Please note the opposite
sign (MET really is GMT+1)

\item If you do not have GCC (Gnu-C) installed, add the following lines to
your {\tt s:user-startup}:

\begin{flushleft}
{\tt assign GCC20: SYS:}\\
{\tt assign LOCAL: GCC20:}\\
{\tt assign ETC: GCC20:}\\
{\tt assign USR: GCC20:}\\
{\tt assign LIB: GCC20:}\\
{\tt assign GCC: GCC20:}\\
{\tt assign TMP: GCC20:}\\
{\tt assign DEV: GCC20:}\\
\end{flushleft}

\item Reboot your system before using AM

\item After you've started AM sucessfully, edit the entries for Mail Editor,
Text Filter, in the config menu.

\item  Configuring  the  MIME-Stuff:   The text/plain, image/x-iff-ilbm and
image/gif   contents  types  are  properly  configured  in  the  file  {\tt
uulib:mailcap}  (copied  there by the installation script).  For a detailed
description see the metamail documentation.  Please note that text/richtext
content  type is not supported due to the lack of a richtext viewer for the
Amiga.  If you get in touch with souch a beast, please let me know.

\end{enumerate}


\subsection{Updating to a new Version}
Rerun  the  aminstall script and check if all things mentioned above are properly
done  (steps  may  differ  slightly  between  different  versions  of  AM).
Additionally do a
\begin{center}\tt 
makecontents $<${\em username}$>$
\end{center}
for each user on the machine to correct the contents files.  Attention:
this marks all mail as old/read!

The format of the addressbook has changed from 1.12 on.  Backup
old files first.  Conversion utilities are {\em not} provided.

\section{Starting AM}
AM can be started from CLI or from Workbench. From CLI the Syntax is:
\begin{flushleft}\tt
AM\\
AM $<${\em username}$>$\\
AM $<${\em username}$>$ $<${\em configfile}$>$\\
\end{flushleft}
Examples:

\begin{tabular}{lp{6cm}}
{\tt AM}&Start AM for user in environment variable USERNAME\\
{\tt AM foo}&Start AM for user "foo"\\
{\tt AM bar work:am.config}&Start AM for user "bar" using configfile {\tt
work:am.config}\\
\end{tabular}

When started from Workbench, you can optionally set the tooltypes USERNAME
(the name of the user you want to read mail for) and CONFIG (the name of
the config file).

If  something goes wrong during startup, AM will pop up a requester telling
you  the  reason.   Only  if  the intuition.library couldn't be opened (for
example  because  of  wrong  OS  version,  AM  requires  V37-libraries), no
requester  will pop up.  AM will tell you this via stdout if you've started
AM from CLI.

\section{How to get out of it}
Quit AM by clicking the close gadget of selecting the quit menu item in the
project  menu.  This will mark all mails as old.  Do not reboot or turn off
your  machine  immediately after quitting AM because although AM itself has
ended,  the  contentsserver  is still running and saving the contents file.
Wait for disk activity to end before rebooting or switching power off.  (If
this  causes  problems, AM could be changed not to quit before the contents
file  is  saved.   Please let me know about your opinion.  Most UUCP-People
leave their machine running all day)

If  a  requester  pops up, telling you that there are running subprocesses,
then you must first finish all pemding mail sending actions.

With  the  Exit choice in the Project menu you can leave AM without marking
all mails old.

\section{General}
When  AM  is  busy, it shows a busy-indicator in the titlebar of the screen
and  switches  the mousepointer into a clock, when the AM window is active.
If  AM  is in the Busy-state, AM will not recignize any user actions in the
main  window.  This will prevent queued events to be executed accidentally.
Requesters will work as normal in busy state.

\section{The Mailbox}
The AM Window shows the contents of your mailbox.  Per default only unread
mail is visible.  You can select the whole mailbox, the mail of the last
week, all mail you've written or all mail others have written to you with
the leftmost column of little gadgets by just ckicking the with the mouse.

You can also control the information that is displayed: 
\begin{itemize}
\item Show All: The real name of the sender (Fr:), the receiver (To:) and
the Subject (Subj:) is shown.
\item Show From: The whole address of the sender as found in the mailheader is shown
\item Show To: The whole address of the receiver as found in the mailheader is shown
\item Show Subject: Only the subject is shown.
\item Show Date: Show the date the mail was send in local time.
\item Show MsgId: The messageid of the mail is shown
\end{itemize}

Mail  can  be sorted by several criteria:  By the number of the file in the
maildirectory  (default),  the  realname of the sender or the receiver, the
subject  ("re:"  is  cut  off  first so that replies are displayed near the
original  mail)  or  by thread.  Sorting by thread is similar to sorting by
subject,  but  it  uses  the  Message-Id:   and In-Reply-To:  fields of the
mailheader.   Because  Mail  is internally stored as a list, sorting is not
very  efficient and may last quite a while with large numbers of mailfiles.
Please be patient.

When new mail arrives while AM is running, it will be added to the list
automaticlly.

\section{Actions}

\subsection{Read Mail}
Read mail by double clicking its line in the display.  You can also read
the actual selected mail with the "Read"-menu item.  The mail will be
displayed with the program denoted by "TextViewer" if it is a text mail or
with "ILBMFilter" if it is a ILBM file.  See section \ref{Config}.

\subsection{Send Mail}
To send mail to someone on the net, select the "Send" or the "Send ILBM"
menu item in the actions-menu.  "Send" will send a text message, "Send
ILBM" a picture in ILBM format.  You will be prompted for the name of the
ILBM file to send with the OS2.0 standart file requester.  Please note that
sending mail runs as a seperate process so that it is possible to use AM
while you are editing mail, selecting addresses etc.  It is also possible
to send (and edit) more than one mail at one time without having to start
AM twice.

\subsubsection{Address Requester}
In the address requester you must provide the address of the receiver ({\tt
To:},  addresses  for  carbon  copies and blind carbon copies (the receiver
will  not  see  who else got the mail) and a subject.  The entries for {\tt
To:} and {\tt Subject:} are required, the ones for {\tt Cc:} and {\tt Bcc:}
are  optional.   You  can  add  an  address from the listview gadget to the
current selected field by just clicking it.  AM will take the addresses and
subject  from  the string gadgets when you click the "OK"-gadget and invoke
the  editor  configured  in  "MailEditor"  in the config menu.  See section
\ref{Config}.  Cancel the sending with the "CANCEL"-Gadget.

\subsubsection{Editing the Mail}\label{editmail}
The Editor will display you the whole mail consisting of the header and the
body.  The header and the body are seperated by at least one blank line
(even no blanks or tabs!).  Each line in the Header consists of a Keyword,
followed by a ":" and a fieldbody.  Do {\em not} edit the Header except in
the following Fields (always leave a blank between the ":" and the
fieldbody!):

\begin{itemize}
\item  You  may  edit the {\tt To:} , {\tt Cc:} and {\tt Bcc:} field.

\item  If  you  provide  a valid email address in the "Reply-To:" line, the
receiver  will  be forced to send his reply to the address given instead to
your  address.  This might especially be useful if the receiver of the mail
has  problems  in  addressing  your  site;  that  way you can provide him a
working reply-address.

\end{itemize}

{\it Again:  Do not edit other header fields!!!} 

If  the  configured  signature-file  (see  config  menu)  exists,  it  will
automaticly   be  appended  to  your  mail.   Your  signature  may  contain
information about you (name, address, phone, etc.)

Please  note that the "From:"-line is not displayed in the editor.  It will
be  added  after  you've  finished editing, before the mail is sent because
this field should not be modified by the user under any circumstances.

Write your message between the header (remember to leave one empty line, no
blanks  and  tabs!)  and  the  signature  (if exists).  What you see on the
screen as the body of your mail is exactly the image the reveiver will get.
The  header may look different (Received:  fields are added by each machine
over  that  the  mail  was routed).  Avoid long lines in the body (not more
than 80 characters) as not all mailreaders wrap them automaticly.

Quit the editor with a command that will save the file, for example AMIGA-Q
in CygnusEd, ESC x CR in ED, etc..

\subsubsection{Confirm Send}
After  you've finished editing the message, you will be asked if you really
want  to  send  the  mail  by  a  requester.   Click "OK" to send the mail,
"CANCEL"  to  abort.   When  you click "CANCEL", the edited file is kept in
{\tt T:} with a filename like {\tt xxxxxxxx.AM}, where each x stands for an
arbitrary hex digit.

\subsection{Reply Mail}
You  can  reply  to  the  current  selected mail directly without having to
bother  about  addresses  and  subjects.   When you select the "Reply" menu
item,  AM  will  generate all necessary things for you:  The address of the
receiver  is  taken  from  the  address  of  the sender or, if present, the
"Reply-To"  address.   The  Subject  will be the old subject prepended with
"Re:   ",  if  it  is  not  already  there.  AM invokes the editor directly
without  asking  for  address and subject.  From now on everything works as
described in \ref{editmail}

\subsection{Print Mail}
You can print the currently selected mail by selecting the "Print" item in
the actions menu.  Printing will be done in background.  There is actually
no way to cancel the printing except with the CLI command break (find the
number of the printing process with the status command, the command of the
printing process is {\tt c:type}.  Then kill it with "break $<$number$>$)

\subsection{Delete Mail}
Messages can be deleted from the mailbox with the delete menu item in the
actions menu. This menu item deletes the currently selected message. A
requester will pop up to confirm the deletion.

Attention:   Mail  will be deleted immediately unlike other MUAs, that mark
mail only as deleted and delete them on exit.

\section{The Addressbook}
AM  maintains  an  addressbook  to  store  frequently  used addresses.  The
information  is  stored  in the file {\tt UULIB:addressbook}.  You can edit
the Addressbook with a menu item.

You  can  determine for each address whether a Return-Receipt-To line shall
be added to all outgoing mail or not.  This will work with replies, too, if
the address matches one entry in the addressbook exactly.

\section{The Config Menu}\label{Config}
\subsection{Return-Receipt-To}
If  the  Return-Receipt-To  line  is checked, AM will request the receiving
system  to  send  an  acknoledgement  back to you that it has received your
mail.   This  is  done by adding a line with title "Return-Receipt-To" into
the  headers of outgoing mail.  Not all systems support this feature, DUUCP
and the new AUUCP+ sendmail (included in the distribution) will handle it.

Attention:  This menu does {\em not} control, if your system will respond
to Return-Receipt-To in {\em incoming} mail requested by other systems (if
fact, AM does this always, no way to turn off), but only if the
Return-Receipt-To line is inserted automaticlly in all {\em outgoing} mail.

\subsection{Font}
With  a standart system Requester you can select the font that will be used
for all the gadgets in the AM window.

\subsection{Colors}
The colors of the AM screen may be adjusted only, if AM has it's own custom
screen  (see below).  AM uses its own color requester now (Thanks to Stefan
Sticht).

\subsection{Screen}
AM  can come up on several types of screens.  You can select any of the ECS
screen modes.  Selection of arbitrary public screens is also possible.  The
public  screen  can  be  selected  by entering it's name.  If the requested
screen  mode  is not availible or the public screen does not exists on your
system, AM will tell you that with a requester and come up on the Workbench
Screen.

\subsection{Signature}
You can set the name of your signature file with this menu item.  {\tt
UULIB:.Signature} is taken as default

\subsection{External programs to use for actions}
The "MailEditor" will be used to edit outgoing mail.  It must be given with
full path and is called with a filename as first parameter.

If you are using CygnusEd, you must create {\tt S:cygnus-ed} with the
following contents
\begin{verbatim}
------------------------------------------
.key filename
sys:utilities/ed "<filename>" -STICKY
------------------------------------------
\end{verbatim}
and set the s-bit of this file.  Then use {\tt S:cygnus-ed} as MailEditor
for AM.

The TextViewer is used for pure text mails.

\section{Keyboard shortcuts}
The following keyboard shortcuts do exist:

\begin{tabular}{ll}
Space, CR&Read mail, goto next\\
{\tt r}&Reply\\
{\tt R}&Reply (Quote)\\
{\tt f}&Forward\\
{\tt f}&Forward (Quote)\\
{\tt d}&Delete\\
{\tt s}&Send\\
{\tt p}&Print\\
Cursor Up/Down&Moving around in the listview gadget\\
\end{tabular}

\newpage\part{Technical information}\setcounter{section}{0}

This part is intended to give you a rough idea of how AM is working.  For
details please look into the source.

\section{The Screen}
If  AM doesn't have it's window on a foreign public screen, it makes it own
screen public.  The name of this public screen is then "AmigaMail".

\section{sendmail}
You  need  AM's  sendmail  only  if  your mailsystem doesn't support piping
incoming mail into programs (Original versions of AmigaUUCP Plus).   The
AM  sendmail  first  calls  the  original sendmail that was renamed as "sm"
during installation.  When mail was sent to local users, the mail stands in
{\tt  UUMAIL:}  with  username as filename.  sendmail looks for such a file
for each known user it can find in {\tt GETTY:passwd}.  When mail is found,
it  is  moved into a subdirectory with name $<${\em username}$>${\tt.mail}.
The  files  in  these subdirectories are numbered sequentially.  A contents
file  is maintained containing all intersting header fields from the stored
mails.   That  way  AM  doesn't  have  to parse the headers each time it is
called.

This solution is a very dirty hack, that does not always work properly.

\section{lmail}
lmail sends mail given on stdin to a local user with the first parameter as
name.  Is is actually used by sendm (see below), and can be used by
Matt Dillons AmigaUUCP. See documentation for the Aliases-file in
AmigaUUCP.

\section{sendm}
When sending mail from within ARN, the script {\tt sendm} is called.  It
archives the mail for the specified user using sendmail.  Versions of  ARN 
less than version 069 don't generate a Date:-line, all features of AM
that deal with the date of a mail (sort, select last week,...) will not
work properly with archived mails sent from within those versions of ARN.
This is fixed from version 0.71. See ARN's documentation for details.

\section{makecontents}
To create a new contents file in the mail directories makecontents is used.
It scans all mailfiles, looks, if they already are in the contents file and
creates  a  new  entry, if necessary.  It parses the header with a lex/yacc
parser.   To  avoid  interference  with  the contentsserver, this is killed
first  and needs to be restarted manually, after makecontents has finished.
If  the  contentsserver  does  not  shut  down for some reason (for example
because  there  are  programs that have locked contentsfiles), makecontents
won't do it's job!

\section{contentsserver}
All programs except makecontents access the contents file via tha
contentsserver.  That way it is ensured that all new items are stored
correctly and deleted items do not remain in the mailbox.  The server
creates a public port with name "AM-Server".  Clients like AM or lmail
send requests to this port.

\subsection{Actions performed by the contentsserver}
The contentsserver creates a public message port with name {\tt AM-Server}.
Clients  can send messages of type {\tt struct AMMessage} to let the server
work for them. The contentsserver will return the Message upon completion.
For details see {\tt client.c}

\subsubsection{{\tt ACT\_DIE}}
\begin{description}
\item[Description]Die, if there are no locks to Mailboxes left.
\item[Parameters] none
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_LOCKCONTENTS}}
\begin{description}
\item[Description]  Lock  mailbox  of given user.  The contentsfile will be
read, if not already locked
\item[Parameters] {\tt Msg->Username} contains the Username.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_UNLOCKCONTENTS}}
\begin{description}
\item[Description] Unlock Mailbox of given user. Save contentsfile if all
locks are released and changes were made.
\item[Parameters] {\tt Msg->Username} contains the Username.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_GETCONTENTS}}
\begin{description}
\item[Description] Provide a copy of the given user's mailbox.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Mailbox} the listheader for the copy. This list will be cleared first.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_MARK\_READ}}
\begin{description}
\item[Description] Mark Mail as read. All clients that asked for
notification will be notified about the change.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Number} the number of the desired mail.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_MARK\_UNREAD}}
\begin{description}
\item[Description] Mark Mail as unread. All clients that asked for
notification will be notified about the change.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Number} the number of the desired mail.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_MARK\_OLD}}
\begin{description}
\item[Description] Mark Mail as old. No notification will be done.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Number} the number of the desired mail.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_ADD\_ITEM}}
\begin{description}
\item[Description] Encorporate a neew item into the mailbox. The server
will parse the Header and add the information to the contents list.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Number} the number of the desired mail.
\item[Results] {\tt Msg->NewMail} is a pointer to a copy of the new item on
success (for insertion into the clients list), {\tt NULL} otherwise.
\end{description}

\subsubsection{{\tt ACT\_DELETE\_ITEM}}
\begin{description}
\item[Description] Delete a mail from the mailbox.
\item[Parameters] {\tt Msg->Username} contains the Username, {\tt
Msg->Number} the number of the desired mail.
\item[Results] {\tt Msg->Number} is {\tt TRUE} for success, else {\tt FALSE}.
\end{description}

\subsubsection{{\tt ACT\_NEW\_SEQ}}
\begin{description}
\item[Description] Get a number for a new file in the users mailbox.
\item[Parameters]  {\tt Msg->Username} contains the Username.
\item[Results] New sequential in {\tt Msg->Number}, 0 on fault.
\end{description}

\subsubsection{{\tt ACT\_NEW\_MSGID}}
\begin{description}
\item[Description] Get a new unique message-id for inclusion in
mailheaders.  Also used for temporary filenames.
\item[Parameters] none
\item[Results] New message id in {\tt Msg->MsgId}
\end{description}

\subsubsection{{\tt ACT\_NOTIFY\_ON}}
\begin{description}
\item[Description]
\item[Parameters]
\item[Results]
\end{description}

\subsubsection{{\tt ACT\_NOTIFY\_OFF}}
\begin{description}
\item[Description]
\item[Parameters]
\item[Results]
\end{description}

\subsubsection{{\tt ACT\_VERSION}}
\begin{description}
\item[Description] Determine version of the server.
\item[Parameters] none
\item[Results] {\tt Msg->MsgId} contains the version string from {\tt am.h}
\end{description}

\section{Compiling with GNU-C}
When  I  started using GCC I had to fiddle around with include files a bit.
Don't worry, it isn't difficult.

\end{document}
