From jrouilla Tue Nov 12 10:33:52 2002
Received: (from jrouilla@localhost)
	by corp-15-45.corp.harris.com (8.9.3+Sun/8.9.3) id KAA24103
	for jrouilla; Tue, 12 Nov 2002 10:33:52 -0500 (EST)
From: John Rouillard (K-Force) <jrouilla>
Date: Tue, 12 Nov 2002 10:33:52 -0500
To: jrouilla
Subject: [issue96] test attachment email to roundup
Message-ID: <3DD11F60.nailILI1921@tiger>
User-Agent: nail 10.1 10/14/02
MIME-Version: 1.0
Content-Type: multipart/mixed;
 boundary="1PC2X182OW-=-3CLMFD33J8-CUT-HERE-BJEZO6KVDA-=-1OX4860FO6"
Content-Length: 43442

This is a multi-part message in MIME format.

--1PC2X182OW-=-3CLMFD33J8-CUT-HERE-BJEZO6KVDA-=-1OX4860FO6
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

here is a second sample entry for roundup

--1PC2X182OW-=-3CLMFD33J8-CUT-HERE-BJEZO6KVDA-=-1OX4860FO6
Content-Type: text/plain;
 charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="nail.1"

.\" Copyright (c) 1980, 1990, 1993
.\"     The Regents of the University of California.  All rights reserved.
.\" Copyright (c) 2000
.\"     Gunnar Ritter.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"     This product includes software developed by the University of
.\"     California, Berkeley and its contributors.
.\"     This product includes software developed by Gunnar Ritter
.\"     and his contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS '\fIAS IS\fR' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     Sccsid: @(#)nail.1	2.7 (gritter) 10/14/02
.\"
.TH NAIL 1 "10/14/02" "nail 10.1" "User Commands"
.SH NAME
nail \- send and receive MIME conformant mail
.SH SYNOPSIS
.ad l
\fBnail\fR [\fB\-BFinv~\fR]
[\fB\-s\fI\ subject\fR] [\fB\-a\fI\ attachment\fR ]
[\fB\-c\fI\ cc-addr\fR] [\fB\-b\fI\ bcc-addr\fR] [\fB\-r\fI\ from-addr\fR]
[\fB\-h\fI\ hops\fR] \fIto-addr\fR ...
.sp
\fBnail\fR [\fB\-BeHiInNv~\fR] [\fB\-T\fI\ name\fR] \fB\-f\fR [\fIname\fR]
.sp
\fBnail\fR [\fB\-BeinNv~\fR] [\fB\-u\fI\ user\fR]
.br
.ad b
.SH DESCRIPTION
\fINail\fR is an intelligent mail processing system, which has
a command syntax reminiscent of
.IR ed (1)
with lines replaced by messages.
It is based on Berkeley Mail 8.1,
is intended to provide the functionality of the
.SM POSIX.2
.B mailx
command,
and offers some extensions
for MIME messages.
.SH OPTIONS
.TP
.BI \-a \ file
Attach the given file to the message.
.TP
.B \-B
Make standard input and standard output line-buffered.
.TP
.BI \-b \ address
Send blind carbon copies to list.
List should be a comma-separated
list of names.
.TP
.BI \-c \ address
Send carbon copies to list of users.
.TP
.B \-e
Just check if mail is present in the system mailbox.
If yes, return an exit status of zero,
else, a non-zero value.
.TP
\fB\-f\fR [\fIfile\fR]
Read in the contents of your mbox
(or the specified file)
for processing;
when you quit, \fInail\fR writes
undeleted messages back
to this file.
.TP
.B \-F
Save the message to send
in a file named after the local part
of the first recipient's address.
.TP
.B \-H
Print header summaries for all messages and exit.
.TP
\fB\-h\fI hops\fR
Invoke sendmail with the specified hop count.
This option has no effect when SMTP is used for sending mail.
.TP
.B \-i
Ignore tty interrupt signals.
This is
particularly useful when using
\fInail\fR on noisy phone lines.
.TP
.B \-I
Shows the `Newsgroup:' or `Article-Id:' fields
in the header summary.
Only applicable in combination with
.BR \-f .
.TP
.B \-n
Inhibits reading /etc/nail.rc upon startup.
.TP
.B \-N
Inhibits the initial display of message headers when reading mail
or editing a mail folder.
.TP
.BI \-q \ file
Start the message with the contents of the specified file.
May be given in send mode only.
.TP
.BI \-r \ address
Sets the
.I From
address. Overrides any
.I from
variable specified in environment or startup files.
Tilde escapes are disabled.
The \fB\-r\fI address\fR options are passed to the mail transfer agent
unless SMTP is used.
.TP
.BI \-s \ subject
Specify subject on command line (only the first argument after the
\-s flag is used as a subject; be careful to quote subjects
containing spaces).
.TP
.BI \-T \ name
Writes the `Message-Id' and `Article-Id' header fields
of each message read in the file
.IR name .
Implies
.BR \-I .
.TP
.BI \-u \ user
Reads the mailbox of the given user name.
.TP
.B \-v
Verbose mode.
The details of
delivery are displayed on the user's terminal.
.TP
.B \-V
Print \fInail\fR's version and exit.
.TP
.B \-~
Enable tilde escapes even if not in interactive mode.
.SH USAGE
.SS "Sending mail"
To send a message to one or more people,
\fInail\fR can be invoked with arguments
which are the names of people
to whom the mail will be sent.
You are then expected to type in your message,
followed by an 'control-D' at the beginning of a line.
The section below Replying to
or originating mail,
describes some features of \fInail\fR
available to help you compose your letter.
.SS "Reading mail"
In normal usage \fInail\fR is given no arguments
and checks your mail out of the post office,
then prints out a one line header
of each message found.
The current message is initially
the first message (numbered 1)
and can be printed using the print command
which can be abbreviated 'p').
You can move among the messages
much as you move between lines in
.IR ed (1),
with the commands '+' and '\-' moving backwards and forwards,
and simple numbers.
.SS "Disposing of mail"
After examining a message
you can delete 'd') the message
or reply 'r') to it.
Deletion causes the \fInail\fR program
to forget about the message.
This is not irreversible;
the message can be undeleted 'u')
by giving its number,
or the \fInail\fR session can be aborted
by giving the exit 'x') command.
Deleted messages will, however,
usually disappear never to be seen again.
.SS "Specifying messages"
Commands such as print and delete
can be given a list of message numbers
as arguments to apply to a number of messages at once.
Thus '\fIdelete 1 2\fR' deletes messages 1 and 2,
while '\fIdelete 1-5\fR' deletes messages 1 through 5.
The following special message names exist:
.TP
.B :n
All new messages.
.TP
.B :o
All old messages.
.TP
.B :u
All unread messages.
.TP
.B :d
All deleted messages.
.TP
.B :r
All read messages.
.TP
.BI / string
All messages that contain
.I string
in the subject field (case ignored).
.TP
.I address
All messages from
.IR address .
.TP
.B .
The current message.
.TP
.B -
The previous message.
.TP
.B +
The next message.
.TP
.B ^
The first message.
.TP
.B $
The last message.
.TP
.B *
All messages.
.SS "Replying to or originating mail"
You can use the reply command
to set up a response to a message,
sending it back to the person who it was from.
Text you then type in,
up to an end-of-file,
defines the contents of the message.
While you are composing a message,
\fInail\fR treats lines beginning with the character '~' specially.
For instance, typing '~m' (alone on a line)
will place a copy of the current message into the response
right shifting it by a tabstop
(see indentprefix variable, below).
Other escapes will set up subject fields,
add and delete recipients to the message,
attach files to it
and allow you to escape to an editor
to revise the message
or to a shell to run some commands.
(These options are given in the summary below.)
.SS "Ending a mail processing session"
You can end a \fInail\fR session
with the quit 'q') command.
Messages which have been examined
go to your mbox file
unless they have been deleted
in which case they are discarded.
Unexamined messages go back
to the post office.
(See the \-f option above).
.SS "Personal and systemwide distribution lists"
It is also possible to create
a personal distribution lists so that,
for instance, you can send mail
to '\fIcohorts\fR' and have it go
to a group of people.
Such lists can be defined by placing a line like
.nf
        alias cohorts bill ozalp jkf mark kridle@ucbcory
.fi
in the file .mailrc in your home directory.
The current list of such aliases
can be displayed with the alias command in \fInail\fR.
System wide distribution lists can be created
by editing /etc/aliases, see
.IR aliases (5)
and
.IR sendmail (8);
these are kept in a different syntax.
In mail you send,
personal aliases will be expanded
in mail sent to others so that
they will be able to reply to the recipients.
System wide aliases are not expanded when the mail is sent,
but any reply returned to the machine
will have the system wide alias expanded
as all mail goes through sendmail.
.SS "Network mail (Internet / ARPA, UUCP, Berknet)"
See
.IR mailaddr (7)
for a description of network addresses.
\fINail\fR has a number of options
which can be set in the .mailrc file
to alter its behavior;
thus '\fIset askcc\fR' enables the askcc feature.
(These options are summarized below).
.SS "MIME types"
For any outgoing attachment,
\fInail\fR tries to determine the content type.
It does this by reading MIME type files
whose lines have the following syntax:
.nf

        type/subtype      extension [extension ...]

.fi
where type/subtype are strings describing the file contents,
and extension is the part of a filename starting after the last dot.
Any line not immediately beginning with an ASCII alphabetical character is
ignored by \fInail\fR.
If there is a match with the extension of the file to attach,
the given type/subtype pair is used.
Otherwise, or if the filename has no extension,
the content types text/plain or application/octet-stream are used,
the first for text or international text files,
the second for any file that contains formatting characters
other than newlines and horizontal tabulators.
.SS "MIME conformance"
\fINail\fR is intended to be
a MIME-conformant mail user agent,
with the following exception:
No special handling of "multipart/alternative" messages is performed.
All parts with content types of "text" or "message" are shown.
This is done because the user should see as much information as possible.
.SS "Locale"
\fINail\fR uses the LC_CTYPE locale setting
to determine whether a character is printable.
Thus, its value has to match
the character set of the terminal
\fInail\fR runs on.
.SS "Character sets"
If a message contains non-ASCII characters,
the character set being used
must be declared within the header.
Its value can be declared
using the \fIcharset\fR variable.
It is normally assumed
that this is the terminal character set, too.
If the latter differs from the one
that should be used in outgoing mail,
the \fIttycharset\fR variable can be used
for its declaration.
An outgoing message is then converted,
resulting in errors when this process
cannot be done for the entire text;
if the message contains
.SM NUL
characters,
it is not converted.
Attachments are never converted.
Any message that is displayed on a terminal
is tried to convert, too,
with characters not in the terminal character set
replaced by question marks.
.SS "Commands"
Each command is typed on a line by itself,
and may take arguments following the command word.
The command need not be typed in its entirety \(en
the first command which matches the typed prefix is used.
For commands which take message lists as arguments,
if no message list is given,
then the next message forward which satisfies
the command's requirements is used.
If there are no messages forward of the current message,
the search proceeds backwards,
and if there are no good messages at all,
\fInail\fR types '\fIapplicable messages\fR' and aborts the command.
If the command begins with a \fI#\fR sign,
the line is ignored.
.TP
.B \-
Print out the preceding message.
If given a numeric argument n,
goes to the n'th previous message and prints it.
.TP
.B ?
Prints a brief summary of commands.
.TP
.B !
Executes the shell (see
.IR sh (1)
and
.IR csh (1))
command which follows.
.TP
.B |
A synonym for the \fIpipe\fR command.
.TP
.B alias
(a) With no arguments,
prints out all currently-defined aliases.
With one argument, prints out that alias.
With more than one argument,
creates a new alias or changes an old one.
.TP
.B alternates
(alt) The alternates command is useful
if you have accounts on several machines.
It can be used to inform \fInail\fR
that the listed addresses are really you.
When you reply to messages,
\fInail\fR will not send a copy of the message
to any of the addresses
listed on the alternates list.
If the alternates command is given
with no argument,
the current set of alternate names is displayed.
.TP
.B cd
Same as chdir.
.TP
.B chdir
(ch) Changes the user's working directory to that specified,
if given.
If no directory is given,
then changes to the user's login directory.
.TP
.B copy
(c) The copy command does the same thing that
.B save
does,
except that it does not mark the messages
it is used on for deletion when you quit.
.TP
.B Copy
(C) Similar to
.BR copy ,
but saves the messages in a file named after the local part
of the sender address of the first message.
.TP
.B delete
(d) Takes a list of messages as argument
and marks them all as deleted.
Deleted messages will not be saved in mbox,
nor will they be available for most other commands.
.TP
.B discard
Same as ignore.
.TP
.BR dp \ or \ dt
Deletes the current message
and prints the next message.
If there is no next message,
\fInail\fR says '\fIat EOF\fR'.
.TP
.B echo
Echoes its arguments,
resolving special names
as documented for the folder command.
.TP
.B edit
(e) Takes a list of messages
and points the text editor
at each one in turn.
On return from the editor,
the message is read back in.
.TP
.B else
Marks the end of the then-part
of an if statement
and the beginning of the part
to take effect if the condition
of the if statement is false.
.TP
.B endif
Marks the end of an if statement.
.TP
.B exit
(ex or x) Effects an immediate return to the Shell
without modifying the user's system mailbox,
his mbox file,
or his edit file in \-f.
.TP
.B file
(fi) The same as folder.
.TP
.B folders
List the names of the folders in your folder directory.
.TP
.B folder
(fold) The folder command switches
to a new mail file or folder.
With no arguments, it tells you
which file you are currently reading.
If you give it an argument,
it will write out changes
(such as deletions) you have made
in the current file and read in
the new file.
Some special conventions are recognized for the name.
# means the previous file,
% means your system mailbox,
%user means user's system mailbox,
& means your mbox file,
and +folder means a file in your folder directory.
.TP
.B Followup
(F) Similar to
.BR Respond ,
but saves the message in a file
named after the local part of the first recipient's address.
.TP
.B followup
(fo) Similar to
.BR respond ,
but saves the message in a file
named after the local part of the first recipient's address.
.TP
.B followupall
Similar to
.BR followup ,
but responds to all recipients regardless of the
.B flipr
and
.B Replyall
variables.
.TP
.B followupsender
Similar to
.BR Followup ,
but responds to the sender only regardless of the
.B flipr
and
.B Replyall
variables.
.TP
.B Forward
(For) Like forward,
but does not add any header lines.
This is not a way to hide the sender's identity,
but useful for sending a message again
to the same recipients.
.TP
.B forward
(for) Takes a list of messages and a user name
and sends each message to the named user.
.TP
.B from
(f) Takes a list of messages
and prints their message headers.
.TP
.B headers
(h) Lists the current range of headers,
which is an 18-message group.
If a '+' argument is given,
then the next 18-message group is printed,
and if a '\-' argument is given,
the previous 18-message group is printed.
.TP
.B help
A synonym for ?.
.TP
.B hold
(ho, also preserve) Takes a message list
and marks each message therein to be saved
in the user's system mailbox
instead of in mbox.
Does not override the delete command.
.TP
.B if
Commands in \fInail\fR's startup files
can be executed conditionally
depending on whether you are sending
or receiving mail with the if command.
For example, you can do:
.nf
        if receive
                \fIcommands ...\fR
        endif
.fi
An else form is also available:
.nf
        if receive
                \fIcommands ...\fR
        else
                \fIcommands ...\fR
        endif
.fi
Note that the only allowed conditions are receive and send.
.TP
.B ignore
Add the list of header fields named to the ignored list.
Header fields in the ignore list are not printed
on your terminal when you print a message.
This command is very handy for suppression
of certain machine-generated header fields.
The Type and Print commands can be used
to print a message in its entirety,
including ignored fields.
If ignore is executed with no arguments,
it lists the current set of ignored fields.
.TP
.B inc
Same as
.BR newmail .
.TP
.B list
Prints the names of all available commands.
.TP
.B Mail
(M) Similar to
.BR mail ,
but saves the message in a file
named after the local part of the first recipient's address.
.TP
.B mail
(m) Takes as argument login names
and distribution group names
and sends mail to those people.
.TP
.B mbox
Indicate that a list of messages be sent
to mbox in your home directory when you quit.
This is the default action for messages
if you do not have the hold option set.
.TP
.B newmail
Checks for new mail in the current folder
without commiting any changes before.
If new mail is present, a message is printed.
If the
.B header
variable is set,
the headers of each new message are also printed.
.TP
.B next
(n) like + or CR) Goes to the next message
in sequence and types it.
With an argument list, types the next matching message.
.TP
.B New
Same as
.BR unread .
.TP
.B new
Same as
.BR unread .
.TP
.B preserve
(pre) A synonym for hold.
.TP
.B Pipe
(Pi) Like pipe but also
pipes ignored header fields.
.TP
.B pipe
(pi) Takes a message list and a shell command
and pipes the messages through the command.
Without an argument,
the current message is piped
through the command given by the \fIcmd\fR variable.
If the \fI page\fR variable is set,
every message is followed by a formfeed character.
.TP
.B Print
(P) Like print but also
prints out ignored header fields.
See also print, ignore and retain.
.TP
.B print
(p) Takes a message list and types out each message
on the user's terminal.
If the message is a MIME multipart message,
all parts with a content type of "text" or "message" are shown,
the other are hidden except for their headers.
.TP
.B quit
(q) Terminates the session, saving all undeleted,
unsaved messages in the user's mbox file in his login directory,
preserving all messages marked with hold or preserve
or never referenced in his system mailbox,
and removing all other messages from his system mailbox.
If new mail has arrived during the session,
the message '\fIYou have new mail\fR' is given.
If given while editing a mailbox file with the \-f flag,
then the edit file is rewritten.
A return to the Shell is effected,
unless the rewrite of edit file fails,
in which case the user can escape
with the exit command.
.TP
.B Reply
(R) Reply to originator.
Does not reply to other recipients
of the original message.
.TP
.BR reply
(r) Takes a message list and sends mail
to the sender and all recipients of the specified message.
The default message must not be deleted.
.TP
.B replyall
Similar to
.BR reply ,
but responds to all recipients regardless of the
.B flipr
and
.B Replyall
variables.
.TP
.B replysender
Similar to
.BR Reply ,
but responds to the sender only regardless of the
.B flipr
and
.B Replyall
variables.
.TP
.B Respond
Same as
.BR Reply .
.TP
.B respond
Same as
.BR reply .
.TP
.B respondall
Same as
.BR replyall .
.TP
.B respondsender
Same as
.BR replysender .
.TP
.B retain
Add the list of header fields named to the retained list.
Only the header fields in the retain list are shown
on your terminal when you print a message.
All other header fields are suppressed.
The Type and Print commands can be used
to print a message in its entirety.
If retain is executed with no arguments,
it lists the current set of retained fields.
.TP
.B Save
(S)
Similar to
.BR save ,
but saves the messages
in a file named after the local part
of the sender of the first message
instead of taking a filename argument.
.TP
.B save
(s) Takes a message list and a filename
and appends each message
in turn to the end of the file.
The filename in quotes,
followed by the line count and character count
is echoed on the user's terminal.
.TP
.B set
(se) With no arguments, prints all variable values,
piped through the pager if the output does not fit on the screen.
Otherwise, sets option.
Arguments are of the form option=value
(no space before or after =)
or option.
Quotation marks may be placed around any part of the
assignment statement to quote blanks
or tabs, i.e. '\fIset indentprefix="\->"\fR'.
If an argument begins with
.BR no ,
as in `\fBset no\fIsave\fR',
the effect is the same as invoking the
.B unset
command with the remaining part of the variable
(`\fBunset \fIsave\fR').
.TP
.B savediscard
Same as saveignore.
.TP
.B saveignore
Saveignore is to save what ignore is to print and type.
Header fields thus marked are filtered out
when saving a message by save
or when automatically saving to mbox.
This command should only be applied to header fields
that do not contain content information.
.TP
.B saveretain
Saveretain is to save what retain is to print and type.
Header fields thus marked are the only ones
saved with a message when saving by save
or when automatically saving to mbox.
Saveretain overrides saveignore.
The use of this command is strongly discouraged
since it may strip header fields
that are needed to decode the message correctly.
.TP
.B shell
(sh) Invokes an interactive version of the shell.
.TP
.B size
Takes a message list and prints out
the size in characters of each message.
.TP
.B source
The source command reads commands from a file.
.TP
.B top
Takes a message list and prints the top few lines of each.
The number of lines printed is controlled
by the variable toplines
and defaults to five.
.TP
.B touch
Takes a message list
and marks the messages for saving in the
.I mbox
file.
.TP
.B Type
(T) Identical to the Print command.
.TP
.B type
(t) A synonym for print.
.TP
.B unalias
Takes a list of names defined by alias commands
and discards the remembered groups of users.
The group names no longer have any significance.
.TP
.B undelete
(u) Takes a message list and marks each message as not being deleted.
.TP
.B unignore
Removes the header field names
from the list of ignored fields.
.TP
.B Unread
Same as
.BR unread .
.TP
.B unread
(U) Takes a message list and marks each message
as not having been read.
.TP
.B unretain
Removes the header field names
from the list of retained fields.
.TP
.B unsaveignore
Removes the header field names
from the list of ignored fields for saving.
.TP
.B unsaveretain
Removes the header field names
from the list of retained fields for saving.
.TP
.B unset
Takes a list of option names and discards their remembered
values;
the inverse of set.
.TP
.B visual
(v) Takes a message list and invokes the display editor
on each message.
.TP
.B write
(w) For conventional messages,
the body without all headers is written.
The output is converted
to its native format, if necessary.
If a message is in MIME multipart format,
its first part is written to the specified file,
and the user is asked for a filename
to save each other part.
In non-interactive mode, only the parts of the multipart message
that have a filename given in the part header are written,
the other are discarded.
The original message is never marked for deletion
in the originating mail folder.
The contents of the destination file are overwritten
if the file previously existed.
.TP
.B xit
(x) A synonym for exit.
.TP
.B z
\fINail\fR presents message headers in windowfuls
as described under the headers command.
The z command scrolls to the next window of messages.
If an argument is given,
it specifies the window to use.
A number prefixed by '+' or '\-' indicates
that the window is calculated in relation
to the current position.
A number without a prefix specifies an
absolute window number,
and a '$' lets \fInail\fR scroll
to the last window of messages.
.SS "Tilde escapes"
Here is a summary of the tilde escapes,
which are used when composing
messages to perform special functions.
Tilde escapes are only recognized
at the beginning of lines.
The name '\fItilde escape\fR' is somewhat of a misnomer
since the actual escape character can be set
by the option escape.
.TP
.BI ~! command
Execute the indicated shell command,
then return to the message.
.TP
.B ~.
Same effect as typing the end-of-file character.
.TP
.BI ~< filename
Identical to ~r.
.TP
.BI ~<! command
Command is executed using the shell.
Its standard output is inserted into the message.
.TP
\fB~@\fR [\fIfilename\fR ... ]
With no arguments, edit the attachment list.
First, the user can edit all existing attachment data.
If an attachment's file name is left empty,
that attachment is deleted from the list.
When the end of the attachment list is reached,
.B nail
will ask for further attachments,
until an empty file name is given.
If \fIfilename\fP arguments are specified,
all of them are appended to the end of the attachment list.
.TP
.B ~A
Inserts the string contained in the
.B Sign
variable
(same as `~i Sign').
.TP
.B ~a
Inserts the string contained in the
.B sign
variable
(same as `~i sign').
.TP
.BI ~b "name ..."
Add the given names to the list of carbon copy recipients
but do not make the names visible in the Cc: line
("blind" carbon copy).
.TP
.BI ~c "name ..."
Add the given names to the list of carbon copy recipients.
.TP
.B ~d
Read the file '\fIdead.letter\fR' from your home directory
into the message.
.TP
.B ~e
Invoke the text editor on the message collected so far.
After the editing session is finished,
you may continue appending text
to the message.
.TP
.BI ~f messages
Read the named messages into the message being sent.
If no messages are specified,
read in the current message.
Message headers currently being ignored
(by the ignore or retain command)
are not included.
.TP
.BI ~F messages
Identical to ~f,
except all message headers are included.
.TP
.B ~h
Edit the message header fields
by typing each one in turn
and allowing the user to append text
to the end or modify the field
by using the current terminal erase and kill characters.
.TP
.BI ~i string
Insert the value of the variable specified by string
into the message adding a newline character at the end.
If the variable is unset or empty,
the message remains unaltered.
.TP
.BI ~m messages
Read the named messages into the message being sent,
indented by a tab or by the value of indentprefix.
If no messages are specified,
read the current message.
Message headers currently being ignored
(by the ignore or retain command)
are not included.
.TP
.BI ~M messages
Identical to ~m, except all message headers are included.
.TP
.B ~p
Print out the message collected so far,
prefaced by the message header fields
and followed by the attachment list, if any.
If the message text is longer than the screen size,
it is piped through the pager.
.TP
.B ~q
Abort the message being sent,
copying the message to
"\fIdead.letter\fR" in your home directory
if save is set.
.TP
.BI ~r filename
Read the named file into the message.
.TP
.BI ~s string
Cause the named string to become the current subject field.
.TP
.BI ~t "name ..."
Add the given names to the direct recipient list.
.TP
.B ~v
Invoke an alternate editor
(defined by the VISUAL option)
on the message collected so far.
Usually, the alternate editor
will be a screen editor.
After you quit the editor,
you may resume appending text
to the end of your message.
.TP
.BI ~w filename
Write the message onto the named file.
.TP
.B ~x
Same as ~q,
except that the message is not saved to the dead.letter file.
.TP
.BI ~| command
Pipe the message through the command as a filter.
If the command gives no output or terminates abnormally,
retain the original text of the message.
The command
.IR fmt (1)
is often used
as command to rejustify the message.
.TP
.BI ~: nail-command
Execute the given \fInail\fR command.
Not all commands, however, are allowed.
.TP
.BI ~_ nail-command
Identical to ~:.
.TP
.BI ~~ string
Insert the string of text in the message
prefaced by a single ~.
If you have changed the escape character,
the you should double that character
in order to send it.
.SS "Variable options"
Options are controlled via set and unset commands,
see their entries for a syntax description.
An option is also set
if it is passed to \fInail\fR
as part of the environment,
but a value given in a startup file
overrides this.
Options may be either binary,
in which case it is only significant
to see whether they are set or not;
or string, in which case the actual value is of interest.
.SS "Binary options"
.PP
The binary options include the following:
.TP
.B allnet
Causes only the local part to be evaluated
when comparing addresses.
.TP
.B append
Causes messages saved in mbox to be appended to the end
rather than prepended.
This should always be set.
.TP
.BR ask \ or \ asksub
Causes \fInail\fR to prompt you for the subject
of each message you send.
If you respond with simply a newline,
no subject field will be sent.
.TP
.B askattach
If set, \fInail\fR asks for files to attach at the end of each message.
Responding with a newline indicates not to include an attachment.
.TP
.B askcc
Causes you to be prompted
for additional carbon copy recipients
at the end of each message.
Responding with a newline
indicates your satisfaction with the current list.
.TP
.B askbcc
Causes you to be prompted
for additional blind carbon copy recipients
at the end of each message.
Responding with a newline
indicates your satisfaction with the current list.
.TP
.B autoinc
Same as
.BR newmail .
.TP
.B autoprint
Causes the delete command to behave like dp \-
thus, after deleting a message,
the next one will be typed automatically.
.TP
.B bang
Enables the substitution of `\fB!\fR'
by the contents of the last command line
in shell escapes.
.TP
.B bsdcompat
Sets some cosmetical features to traditional
.SM BSD
style;
affects the default prompt,
the order of header fields,
the format of the header summary,
the output format of the
.B set
command,
and the default pager.
.TP
.B debug
Prints debugging messages and disables the actual delivery of messages.
.TP
.B dot
The binary option dot causes \fInail\fR to interpret
a period alone on a line
as the terminator of a message you are sending.
.TP
.B emptybox
If set, an empty mailbox file is not removed.
This may improve the interoperability with other MUAs
when using a common folder directory.
.TP
.B emptystart
If the mailbox is empty,
\fInail\fR normally prints \fI'No mail for user'\fR
and exits immediately.
If this option is set,
\fInail\fR starts even with an empty mailbox.
.TP
.B flipr
Exchanges the
.B Respond
with the
.B respond
commands and vice-versa.
.TP
.B header
Causes the header summary to be written at startup;
enabled by default.
.TP
.B hold
This option is used to hold messages
in the system mailbox by default.
.TP
.B ignore
Causes interrupt signals from your terminal
to be ignored and echoed as @'s.
.TP
.B ignoreeof
An option related to dot is ignoreeof
which makes \fInail\fR refuse to
accept a control-d as the end of a message.
Ignoreeof also applies to \fInail\fR command mode.
.TP
.B keep
This option causes \fInail\fR to truncate your system mailbox
instead of deleting it when it is empty.
This should always be set,
since it prevents malicious users
from creating fake mail folders
in a world-writable spool directory.
.TP
.B keepsave
When you save a message,
\fInail\fR usually discards it
from the originating folder
when you quit.
To retain all saved messages,
set this option.
.TP
.B metoo
Usually, when a group is expanded
that contains the sender,
the sender is removed from the expansion.
Setting this option causes
the sender to be included in the group.
.TP
.B newmail
Checks for new mail in the current folder
each time the prompt is printed.
.TP
.B noheader
Setting the option noheader is the same
as giving the \-N flag on the command line.
.TP
.B outfolder
Causes the filename given in the
.B record
variable to be interpreted relative to the directory given in the
.B folder
variable rather than to the current directory
unless it is an absolute pathname.
.TP
.B page
If set, each message the \fIpipe\fR command prints out
is followed by a formfeed character.
.TP
.B quiet
Suppresses the printing of the version when first invoked.
.TP
.B Replyall
Reverses the sense of reply and Reply commands.
.TP
.B save
When you abort a message
with two RUBOUT (interrupt characters)
\fInail\fR copies the partial letter
to the file '\fIdead.letter\fR' in your home directory.
This option is set by default.
.TP
.B searchheaders
If this option is set, then
a message-list specifier in the form '\fI/x:y\fR'
will expand to all messages containing
the substring '\fIy\fR' in the header field '\fIx\fR'.
The string search is case insensitive.
.TP
.B sendwait
When sending a message,
wait until the mail transfer agent exits
before accepting further commands.
.TP
.B showlast
Setting this option causes \fInail\fR to start at the
last message instead of the first one when opening a mail folder.
.TP
.B showto
Causes the recipient of the message to be shown in the header summary
if the message was sent by the user.
.TP
.B stealthmua
Inhibits the generation of
the \fI'Message-Id:'\fR and \fI'User-Agent:'\fR
header fields that include obvious references to \fInail\fR.
There are two pitfalls associated with this:
First, the message id of outgoing messages is not known anymore.
Second, an expert may still use the remaining information in the header
to track down the originating mail user agent.
So this option should only be set if there is a good reason to do that.
.TP
.B verbose
Setting the option verbose is the same
as using the \-v flag on the command line.
When \fInail\fR runs in verbose mode,
the actual delivery of messages
is displayed on the user's terminal.
.SS "String Options"
.PP
The string options include the following:
.TP
.B charset
The name of the character set used by \fInail\fR.
If unset, \fIiso-8859-1\fR is the default.
The character set
of all outgoing messages
that contain non-ASCII characters
is declared using its value.
.TP
.B cmd
The default value for the \fIpipe\fR command.
.TP
.B crt
The valued option crt is used as a threshold
to determine how long a message must be
before PAGER is used to read it.
If crt is set without a value,
then the height of the terminal screen stored in the system
is used to compute the threshold (see
.IR stty (1)).
.TP
.B DEAD
The name of the file to use
for saving aborted messages.
This defaults to '\fIdead.letter\fR'
in the user's home directory.
.TP
.B EDITOR
Pathname of the text editor to use
in the edit command and ~e escape.
If not defined,
then a default editor is used.
.TP
.B encoding
The default MIME encoding to use
in outgoing text messages and message parts.
Valid values are \fI8bit\fR or \fIquoted-printable\fR.
The default is \fI8bit\fR.
In case the mail transfer system
is not ESMTP compliant,
\fIquoted-printable\fR should be used instead.
If there is no need to encode a message,
\fI7bit\fR transfer mode is used,
without regard to the value of this variable.
Binary data is always encoded in \fIbase64\fR mode.
.TP
.B escape
If defined, the first character of this option
gives the character to use in the place of ~ to denote escapes.
.TP
.B folder
The name of the directory to use
for storing folders of messages.
If this name begins with a '/',
\fInail\fR considers it to be an absolute pathname;
otherwise, the folder directory is found
relative to your home directory.
.TP
.B from
The address to put into the \fI'From:'\fR field of the message header.
If replying to a message,
this address is handled as if it were in the alternates list.
If this variable is set,
a \fI'Sender:'\fR field containing the user's name
is also generated,
unless the variable \fIsmtp\fR is set
and its value differs from \fIlocalhost\fR.
If the machine's hostname is not valid at the Internet
(for example at a dialup machine),
you have to set this variable
to get correct Message-ID header fields.
.TP
.B indentprefix
String used by the '\fI~m\fR' and '\fI~M\fR' tilde escapes
and by the \fIquote\fR option
for indenting messages,
in place of the normal tab character (^I).
Be sure to quote the value
if it contains spaces or tabs.
.TP
.B LISTER
Pathname of the directory lister
to use in the folders command.
Default is /bin/ls.
.TP
.B MAILX_HEAD
A string to put at the beginning of each new message.
.TP
.B MAILX_TAIL
A string to put at the end of each new message.
.TP
.B MBOX
The name of the mbox file.
It can be the name of a folder.
The default is '\fImbox\fR'
in the user's home directory.
.TP
.B ORGANIZATION
The value to put into the \fI'Organization:'\fR field of the message header.
.TP
.B PAGER
Pathname of the program to use
in the more command
or when crt variable is set.
The default paginator
.IR pg (1)
or, in
.SM BSD
compatibility mode,
.IR more (1)
is used
if this option is not defined.
.TP
.BI pipe- content/subcontent
When a MIME message part of
.I content/subcontent
type is displayed or it is replied to,
its text is filtered through the value of this variable
interpreted as a shell command.
For example,
.nf
        set pipe-text/html="w3m -dump -T text/html"
.fi
will format HTML text using the
.B w3m
web browser.
Special care must be taken when using such commands
as e-mail viruses may be distributed by this method;
if messages of type
.I application/x-sh
were filtered through the shell, for example,
a message sender could easily execute arbitrary code
on the system
.B nail
is running on.
.TP
.B prompt
The string printed when a command is accepted.
Defaults to "\fB? \fR",
or to "\fB& \fR" if the
.B bsdcompat
variable is set.
.TP
.B quote
If set, \fInail\fR starts a replying message with the original message prefixed
by the value of the variable \fIindentprefix\fR.
Normally, a heading consisting of 'Fromheaderfield wrote:' is printed
before the quotation.
If the string \fInoheading\fR is assigned to the \fIquote\fR variable,
this heading is omitted.
If the string \fIheaders\fR is assigned,
the headers selected by the ignore/retain commands
are printed above the message body,
thus \fIquote\fR acts like an automatic ~m command then.
If the string \fIallheaders\fR is assigned,
all headers are printed above the message body,
thus \fIquote\fR acts like an automatic ~M command then.
.TP
.B screen
When \fInail\fR initially prints the message headers,
it determines the number to print
by looking at the speed of your terminal.
The faster your terminal, the more it prints.
This option overrides this calculation
and specifies how many message headers
you want printed.
This number is also used
for scrolling with the z command.
.TP
.B sendmail
To use an alternate mail delivery system,
set this option to the full pathname
of the program to use.
This should be used with care.
.TP
.B SHELL
Pathname of the shell to use
in the ! command and the ~! escape.
A default shell is used
if this option is not defined.
.TP
.TP
.B Sign
A string for use with the
.B ~A
command.
.TP
.B sign
A string for use with the
.B ~a
command.
.TP
.B smtp
Normally, \fInail\fR invokes
.IR sendmail (8)
directly to transfer messages.
If \fIsmtp\fR is set, a SMTP connection to
the server specified by the value of this variable
is used instead.
If the SMTP server does not use the standard port,
a value of \fIserver:port\fR can be given,
with \fIport\fR as a name or as a number.
.TP
.B record
If defined, gives the pathname of the file
used to record all outgoing mail.
If not defined,
then outgoing mail is not so saved.
.TP
.B replyto
The address to put into the \fI'Reply-To:'\fR field of the message header.
If replying to a message, this address is handled
as if it were in the alternates list.
.TP
.B signature
Must correspond to the name of a readable file if set.
The file's content is then appended to each singlepart message
and to the first part of each multipart message.
Be warned that there is no possibility
to edit the signature for an individual message.
.TP
.B toplines
If defined, gives the number of lines
of a message to be printed out
with the top command;
normally, the first five
lines are printed.
.TP
.B ttycharset
The character set of the terminal \fInail\fR operates on.
There is normally no need to set this variable
since \fInail\fR can determine this automatically
by looking at the LC_CTYPE locale setting;
if this succeeds, the value is assigned at startup
and will be displayed by the \fIset\fP command.
Note that this is not necessarily a character set name
that can be used in Internet messages.
If unset, its default is the value of the charset variable.
.TP
.B VISUAL
Pathname of the text editor to use
in the visual command and ~v escape.
.SH ENVIRONMENT VARIABLES
Besides the variables described above, \fInail\fR uses
the following environment strings:
.TP
.B HOME
The user's home directory.
.TP
\fBLANG\fR, \fBLC_ALL\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR
See
.IR locale (7).
.TP
.B MAIL
Is used as the user's mailbox, if set.
Otherwise, a system-dependent default is used.
.TP
.B MAILRC
Is used as startup file instead of ~/.mailrc if set.
.TP
.B NAILRC
If this variable is set and
.B MAILRC
is not set,
it is read as startup file.
.TP
.B TMPDIR
Used as directory for temporary files instead of /tmp, if set.
.SH FILES
.TP
~/.mailrc
File giving initial commands.
.TP
/etc/nail.rc
System wide initialization file.
.TP
~/.mime.types
Personal MIME types.
.TP
/etc/mime.types
System wide MIME types.
.SH "SEE ALSO"
fetchmail(1),
fmt(1),
newaliases(1),
pg(1),
procmail(1),
more(1),
vacation(1),
aliases(5),
locale(7),
mailaddr(7),
sendmail(8)
.SH NOTES
.PP
Variables in the environment passed to nail cannot be unset.
.PP
The character set conversion relies heavily
on the
.IR iconv (3)
function.
Its functionality differs widely
between the various system environments
\fInail\fR runs on.
.PP
A \fImail\fR command appeared in Version 1 AT&T Unix.
.SM BSD
Mail was written in 1978 by Kurt Shoens.
This man page is derived from
from The Mail Reference Manual
originally written by Kurt Shoens.
A revision for \fInail\fR was done by Gunnar Ritter.

--1PC2X182OW-=-3CLMFD33J8-CUT-HERE-BJEZO6KVDA-=-1OX4860FO6--


 	  	 
