elm(1)
NAME
elm − process mail through screen-oriented interface
SYNOPSIS
elm [-akKmz] [-f folder]
elm [-s subject] address-list
elm -h
DESCRIPTION
elm is a screen-oriented electronic mail processing system. In interactive use, the main header index and mini-menu of commands are displayed upon initial invocation and at any point when the program is waiting for input.
There are three main ways to use elm:
• Explicitly send a single message by invoking elm with a list of mail addresses; elm then prompts for the subject, message body, and so on.
• Conveniently send files or the output of commands via command line redirection.
• Use elm as an interactive mail interface program (see EXAMPLES).
Options
The following options are recognized:
-a Arrow − force the arrow cursor (instead of the inverse bar).
−f folder File − read specified folder file rather than the incoming mailbox.
−h Help − give a list of starting options.
-k Softkeys off − disable use of softkeys (function keys).
-K Keypad and softkeys off − disable use of softkeys and arrow cursor keys. If your terminal does not have HP 2622 function key protocols, this option is required.
-m Menu off − Use the extra lines for more message headers.
−s subject Subject − specify subject for message being sent.
-z Zero − do not enter elm if no mail is pending.
INTERACTIVE (Command Mode) OPERATION
When elm is invoked without an address-list, it activates an interactive screen-oriented interface and enters command mode. In command mode, elm executes each user command on the message corresponding to the current message pointer (an inverse-video bar or arrow). Some commands can also operate on “tagged” messages. To execute a command, use the j and k keys to move the pointer to the appropriate message, then type the character for the desired command (Commands are discussed later in this entry).
Message Status
The header index list always displays the status of each message. The status field is composed of three separate character fields, the first of which indicates temporary status:
D Indicates a deleted message.
E Identifies an expired message. This flag is set according to the header field Expires:. If the date of this field is older than the today, this flag appears. elm accepts the following date formats:
• Mon, 11 Jun 90
• Jun 11, 90
• 11 Jun, 90
• 900611HHMMZ(ISO X.400 format)
N Identifies a new message.
The second character field indicates permanent status:
C For confidential mail. If Sensitivity: 3 of the user-defined header field is attached, this can appear and the message is considered company confidential, as specified by the ISO X.400 standard.
U For urgent mail. This flag is set if the message contains a Priority: header field.
P For private mail. This flag is also associated with the Sensitivity: header field and is set if the header field contains Sensitivity: 2.
A For messages that have an explicit action associated with them through inclusion of the Action: header field.
F For a form letter.
When a message has more than one status flag of a particular type set, the highest-precedence indicator is displayed on the index page. For example, if a form letter is also marked as company confidential, the C rather than the F status character is displayed.
A + in the third status-character field indicates that the message is tagged (see Commands later in this entry)
Sending Messages
When sending a message, elm uses the editor specified in your .elm/elmrc file (see CUSTOMIZATION), the editor listed as $EDITOR in your environment, or vi as a default if neither is defined. If builtin is specified as your editor, a large set of commands is available while composing your message (see Tilde Escapes).
If the file $HOME/.elm/elmheaders exists, elm automatically reads in the contents of the file and adds it to the headers of all outbound mail (useful for adding an Organization: field, Phone: field, etc). elm also supports the use of backquotes in the elmheaders file, so an entry of the form:
Operating System: ‘uname -srv‘
can be used. Lines in the elmheaders file should contain a header string, followed by a colon, followed by a contents string.
Aliases
elm has its own alias system that supports both personal and system-wide aliases. Personal aliases are specific to a single user; system aliases are available to everyone on the system where the alias resides (see elmalias(1)). To enter the elm alias mode, use the A or a (alias) command at the main command prompt. You can then create and save an alias for the current message, check personal and system-wide aliases, and access other options (see Alias Commands).
When invoked, elm reads customized variables from file $HOME/.elm/elmrc (if it exists) to initialize parameters. This file can be saved from within elm and some of these variables can also be modified by the O or o (option) command (see CUSTOMIZATION).
FORMS MODE
One feature that is unique to elm is the ability to compose and reply to form letters and other types of forms.
To create a form message, first enable forms mode by adding forms=ON to file $HOME/.elm/elmrc (see CUSTOMIZATION). Also set the userlevel to intermediate (level 1) or advanced (level 2). This can be done either in the elmrc file or via the options command. As you compose the message, each field to be filled in by recipient should have a colon (:) followed by either the number of spaces allowed for the field, or a newline which indicates fields through the end of the line. Additionally, if a colon appears on a line by itself, the recipient is prompted for multi-line input. After the message has been created, select the make form option before sending the message.
Upon receipt of a form message, the user can reply (but not group reply), at which time elm prompts the user for each field, with any text present between the fields displayed as appropriate.
Here is an example of a simple form message:
----
On-Line Phone and Address Database
Please fill out and return as
Name:
Manager:
Department: Division:
Your home address
...
home phone number:
Thank you for your cooperation.
----
MAILER COMMANDS
elm recognizes the following keyboard commands:
? Help. Press ? once to enter explain key mode where pressing any key produces a one-line description of what the key does. Press ? again to obtain a summary listing for each command available. To return to the main menu level, press ESC or type a period (.).
! Shell Escape. Used to send a command to the shell without leaving elm.
| Pipe. Pipes the current message or the set of tagged messages through other filters as desired. The shell used for the entire command is either the one specified in file .elm/elmrc if it exists, or /bin/sh otherwise.
+ Next index page. Displays the next header index page, when applicable.
- Previous index page. Displays previous header index page, if applicable.
= Set current to 1. Sets current message pointer to first message.
* Set current to last. Sets current message pointer to last message.
$ Resync. You can decide whether or not to actually delete messages previously marked for deletion without quitting elm.
/pattern Pattern match. On the top level, this command allows you to search through all the from and subject lines of the current mailbox. If the first character of pattern is also a /, elm tries to match pattern against any line in the mailbox. Both searches treat uppercase and lowercase as equivalent.
n Specify new current message. Typing the message number causes elm to produce the prompt Set current to: n, where n is the message number typed. Note that changing the current message to a message not on the current page of headers results in a new page being displayed.
Return Read current message. When the Return key is pressed, the screen is cleared and the current message is displayed by the pager specified by the user environment variable $PAGER, by pager in file .elm/elmrc, or the system default (see CUSTOMIZATION).
< Scan message for calendar entries. A rather novel feature of the elm mailer is its ability to automatically incorporate calendar or agenda information from a mail message into the user’s calendar file. This is done quite simply; any message that contains the pattern
-> calendar entry
or
- multi-line
- calendar entry
is automatically added to the user’s calendar file after stripping the -> or - if the < command is used (see CUSTOMIZATION).
a Alias. The alias command is a means by which more complex mail addresses can be shortened for the mail user. In alias mode, it provides the a command for creating an alias for the current message, p for checking an alias, e for checking an alias with full expanded addresses, s for checking system aliases, u for checking user aliases, m for making a new alias, and d for deleting an alias (see also Alias Commands).
b Bounce mail. This “remails” mail to someone else in such a way as to make the return address the original sender rather than you (as opposed to the forward command, which makes the return address you rather than the original sender).
c Change mailbox. This command is used to change the mailbox file that is currently being read. As with the save command, this command expands filenames with ~ being your home directory and = being your maildir directory, if defined (see CUSTOMIZATION). This command also recognizes the special character ! which can be used to change the default incoming mailbox.
d, u Delete and Undelete. Neither of these commands has any prompt. Action is indicated by either adding a D to the current message index entry (indicating deletion pending) or removing the D (indicating that the message is not marked for deletion).
Ctrl-D This command marks all messages that contain a specific from or subject pattern for deletion. When Ctrl-D is pressed, elm prompts for the string to match in either the from or subject line of each message).
Ctrl-U This is the direct opposite Ctrl-D. This command removes any mark for deletion from all messages that match the specified pattern.
f Forward. This command is used to forward the current message to another person. The message is copied into the edit buffer where you can add your own message before sending if you desire to do so (also see bounce above).
g Group reply. Identical to reply below, except that the response is mailed to all recipients of the original message (see CUSTOMIZATION alternatives)
h Same as Return, except that the message is displayed with all headers.
j, k Similar to j and k commands in vi and other screen-oriented programs. j key moves the current message pointer down to the next message; k key moves the message pointer to the previous message.
Uppercase J and K behave in the same manner as their lowercase counterparts, even when the skipdeleted option is ON (see CUSTOMIZATION).
l (ell) Limit. This specifies a subset of the existing messages to be dealt with. It is valid for subject, from, and to fields. To set the criteria, type "subject string", "from string", or "to string". To clear all the criteria and restore the normal display, type "all" as the limiting criteria.
Ctrl-L Rewrite the screen. If the screen is confused, you can redraw screen with this command (same as in vi editor).
m Mail. Send mail to a specified user.
n Next message. Advances pointer to next message, clears the screen, and displays the message (see also Return).
o Options. Used to alter the settings of a number of option values (see CUSTOMIZATION).
p Print. Used to print out the current message or the tagged messages to a previously defined printing method print (see CUSTOMIZATION).
q Quit. Gracefully terminate elm and perform message cleanup according to defined personal preference. You can choose to keep undeleted mail in the incoming mailbox or move it to an mbox file specified by maildir in file $HOME/.elm/elmrc. You can also decide whether or not to actually delete messages previously marked for deletion (see CUSTOMIZATION).
Ctrl-Q or DEL Exit (abort). Same as x. Aborts elm immediately without any changing the mailbox.
r Reply. Reply to the author of the current message. If autocopy is not specified (see CUSTOMIZATION), you can specify whether or not a copy of the source message is to be copied into the edit buffer. If copied in, all lines from the message are preceded by the prefix character sequence defined as prefix (see CUSTOMIZATION).
s Save to file. This command copies the current message or set of tagged messages into a user-specified file or folder. After saving a file, each message is marked for deletion and, if saving just one message, the current message pointer is incremented.
t Tag. Tag the current message for operation |, p, or s. Use of this command on a tagged message removes the tag.
Ctrl-T Tag all messages containing the specified pattern. Since tagging messages can occur on screens other than the one being viewed, elm first checks to see if any messages are currently tagged and asks if the tags should be removed. After that, it , similar to Ctrl-D, sets criteria (see Ctrl-D).
x Exit. This is the quickest way to exit elm without changing the mailbox.
Tilde Escapes
Tilde escape sequences are used to alter current or previously defined elm behavior:
~? Print a brief help menu.
~b Change the Blind-Carbon-Copy list.
~c Change the Carbon-Copy list.
~e Invoke the editor specified by the $EDITOR environment variable on the message, if possible.
~f options Add the specified list of messages or the current message. This uses readmail which means that all readmail options are available (see readmail(1)).
~h Change all the available headers (To, Cc, Bcc, and Subject)
~m options Same as ~f, but with the current prefix.
~o Invoke a user specified editor on the message.
~p print out the message as typed in so far.
~r filename Include (read in) the contents of the specified file.
~s Change the Subject line.
~t Change the To list.
~v Invoke $VISUAL in your environment on the message if possible.
~< command Execute the specified shell command, entering the output of the command into the editor buffer upon completion (for example ~< who includes the output of the who command in your message)
~! command Execute a shell command if one is given (as in ~!ls) or give you a shell (either your shell setting as a shell (see CUSTOMIZATION) or $SHELL in your environment).
~~ Add a line prefixed by a single ~ character.
Alias Commands
The following alias commands are used to manipulate user-defined mail aliases:
a Alias current message. This allows you to create an alias that has the return address of the current message as the address field of the alias. It prompts for a unique alias name.
d Delete user alias. This prompts for alias name to be deleted. The alias is deleted from your alias_text file ($HOME/.elm/aliases.text).
e Check personal alias with full expanded addresses. This is the same as p, except that this key fully expands aliases in the list of addresses.
m Make user alias. elm prompts for a unique alias name, then for an address. The information provided is added to your individual alias_text file ($HOME/.elm/aliases.text), then added to the database.
p Check personal alias. This is a simple way of checking what is in the alias database. It prompts for an alias name, and returns the address or the list of addresses associated with that name or the error message alias not found as appropriate.
s Check system aliases. This is for checking what aliases are currently installed as system aliases. This command lists all current system aliases.
u List user aliases. This is for checking what aliases are currently installed as user aliases. This command lists all current user aliases.
r Return. Return to the main level of elm program.
CUSTOMIZATION
Like many HP-UX programs, elm supports automatic configuration by means of an rc file. The file must be named $HOME/.elm/elmrc and can contain any combination of the string, numeric, and boolean variables described below. If directory $HOME/.elm does not exist, elm asks whether you want to create it or not. If the answer is yes, elm creates $HOME/.elm automatically.
String Variables
alternatives This string lists other machine and user name combinations that you receive forwarded mail from. elm uses this information when a group reply is being processed to ensure that a reply message is not sent to a user and/or machine address that would simply forward the reply message back to the originator. No default.
calendar Name of calendar file. This is used in conjunction with the < command which scans messages for calendar entries. Default is $HOME/calendar.
editor Specifies which editor to use when creating new mail. Choices also include none or builtin for the built-in editor. The built-in editor is available for all mail that does not already have text in the buffer (in replying, mailing with a signature, etc). Default is the editor defined by the current environment variable $EDITOR, or vi if $EDITOR is not defined.
escape Escape character used in built-in editor. Default is tilde (~).
fullname This is the name the mailer will use when sending mail from you. Default is the "gecos" field from the /etc/passwd file.
mailbox This is where to put incoming mail after you’ve read it. When you answer no (n) to the keep messages in incoming mailbox? prompt, this is where the messages go. Default is $HOME/mbox.
maildir This is the default mail directory, and is used to expand filenames in elm when specified using the = metacharacter. For example, if you save to file =/archive, the = is expanded to the current value of maildir. Default is $HOME/Mail. If the directory specified by maildir does not exist, elm asks whether you want to create it or not. If the answer is yes, elm creates the specified directory automatically, setting access permissions mode to 700.
pager This defines the program to be used to display each message. This can be changed while within the elm program by selecting the appropriate entry in the Option Menu. Default is builtin.
prefix Value of prefix for included line. When you reply to a message or forward a message to another person, you can optionally include the original message. This prefix indicates the included line. Default is > followed by a space character.
print The command to run when p)rintcommandisexecuted. This indicates how to print out a message. There are two possible formats for this string, either a command that can have a filename affixed to it (as a suffix) then sent to the system for execution, or a string that contains the meta-sequence %s which will be replaced by the name of the message file and also sent to the shell. Default is pr %s | lp.
savemail This is where outgoing mail will have a copy silently saved. This will only be used if the copy flag is turned on. Also note that if the savename feature is enabled, this filename may be ignored since the program first looks for a mailbox that has the same name as the login of the person you are sending to, using that instead if found. Default is $HOME/mbox.
shell This defines the shell to use when doing ! escapes and such. Default is $SHELL in your current environment.
signature This file, if defined, will be automatically appended to all outbound mail before the editor is invoked. Furthermore, if you’d like a different "signature" file for local mail and remote mail (remote being via other hosts), you can alternatively define two variables, localsignature and remotesignature, to have the same functionality. No default.
sortby When reading mailboxes, either incoming or specified, you can have them sorted by any number of different ways. This can be changed without leaving elm by changing the S)ortingcriteriafield in o)ption mode, but it can also be predefined to any of from, sent, received, subject, lines, or status. Each of these fields can also optionally be prefixed with the sequence reverse- to reverse the order of the sort. Default is received.
weedout When specifying this option, you can then list headers that you don’t want to see when you are reading mail. This is effective with weed is ON. This list can continue for as many lines as desired, as long as the continued lines all have leading indentation. Default is >From, In-Reply-To:, References:, Newsgroups:, Received:, Apparently-To:, Message-Id:, Content-Type:, From, and Mailer:.
Numeric Variables
timeout This is the interval, in seconds, between resynchronizing. elm internally resynchronizes every timeout seconds. Default is 600 seconds (10 minutes).
userlevel elm uses this value to determine the relative level of user’s sophistication. Acceptable values are 0 for new users (default), 1 for moderately experienced elm users, and 2 for experts.
Boolean Variables
alwaysdelete When set, this changes the default answer of the prompt Delete messages? to the indicated value. Default is ON for YES.
alwaysleave This changes the default answer on the keep mail in incoming mailbox? prompt to the value indicated. Default is ON for YES.
arrow This is identical in function to the -a command line option. Default is OFF.
ask This is used to tell elm that you would rather not be asked Delete message? and such each time you leave the program, and instead elm should just use the values of alwaysdelete and alwaysleave without prompting. Default is ON.
askbcc If turned on, the prompt Blind-Copies-To: appears for each message. If askbcc is OFF, you can add a "bcc" list by ~b in the built-in editor or by using the header editor. Default is OFF.
askcc If turned off, this allows you to send mail without being presented the Copies-To: prompt for each message. This still allows you to explicitly include addresses in the “cc” list via either ~c in the built-in editor, or via using the screen-oriented header editor. Default is ON.
autocopy This is a boolean flag, and if set automatically copies the text of the message you are replying to into the edit buffer. Default is OFF.
copy This, in combination with the savemail option, allows you to have silent copies of all outgoing mail made on the outbound step. Default is OFF.
expand If this flag is on, tabs in your message written are expanded to spaces. This ensures that your message is displayed in its original layout when displayed on a terminal screen having different tab settings. This flag can be changed without leaving elm by changing the T )abs-to-spaces field in o)ption mode. Default is OFF.
forms This allows you to mail forms. Default is OFF.
keep By default, the mail system deletes mailboxes when you have removed everything from them. With this option ON, it instead preserves them as zero-length files. Default is OFF.
keypad If on, this tells elm that you have an HP terminal and enables the Next, Prev, Home, and Shift-Home keys. Default is ON.
menus If turned off, this inhibits the menu display on all elm program screen displays. Default is ON.
movepage If enabled, commands that move through the mailbox by pages (the + and - keys) also move the current message pointer to the top of that page of messages. If turned off, moving through the pages does not alter the current message pointer location. Default is OFF.
names Show only the user names when expanding aliases, rather than the name and electronic mail address on the To: field when sending mail. Default is OFF.
noheader This tells the mailer not to include the headers of messages when copying a message into a file buffer for replying to or forwarding. Default is ON.
pointnew If this is turned on, the mailer is automatically pointing to the first new message in your mailbox when started, instead of at message #1. This is only used for the incoming mailbox since other mailboxes are assumed not to have ‘new’ and ‘old’ mail. Default is ON.
resolve If this option is enabled, as soon as mail is ‘dealt with’, elm moves to the next message in the mailbox, after deletion, undeletion, saving a message, or forwarding a message. Default is ON.
savename When the user saves the messages, elm constructs the filename from the login name of the person who sent the message rather than savemail value. Similarly, when sending mail out, instead of just blindly saving it to the savemail file, elm first tries to save it to a file based on the login name of the person who is to receive the mail. If the needed outbound mail file does not already exist, the message is saved in the savemail file. Default is ON.
skipdeleted If this flag is on, current message pointer skips the message with deleted flag D when the j or k command is used. If J or K is used, flagged messages are not skipped. Default is OFF.
softkeys If on, this tells elm to recognize HP2622 terminal function-key protocol when interacting with your terminal. Default is ON.
titles Used with the flag weed, this flag allows you to have the first line of a message titled with:
Message N/M from username date at time
where all the information has been previously extracted from the message. Default is ON.
warnings elm normally warns you when you send mail to a machine that cannot be directly accessed. Setting this flag allows you to disable such warning messages. Default is ON.
weed This is a boolean flag that, in combination with the weedout list, allows you to custom define the set of headers you would like to not have displayed while reading messages. Default is ON.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
When set, the TMPDIR environment variable specifies a directory to be used for temporary files, overriding the default directory /tmp.
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
To send a message without loading the main elm mail-processing program, use the simple command form consisting of the name of the program followed by the recipient’s login name and optional address. elm prompts for Subject, Copies, and Blind-Copies, then starts an editor so you can compose the message (user responses are in boldface type):
$ elm j_doe
To: doe (John Doe)
Subject: this is a test
Copies To: [Return]
Blind-Copies To: [Return]
...invokes editor, message composed, then...
Your options now are:
S)end the message, E)dit it again, change/add H)eaders or F)orget it
What is your choice? s
mail sent!
To send files or output from commands by use of command-line redirection, use command resembling:
$ elm j_doe < help.c
Which reads file help.c and transmits it to the specified recipient.
To add a subject line to the message, use -s subject in the command line:
$ elm −s "File help.c transmission" j_doe < help.c
WARNINGS
Using two separate mail programs to access the same mail file simultaneously (usually inadvertently from two separate windows) can cause unpredictable results.
AUTHOR
elm was developed by Hewlett-Packard Company.
FILES
/usr/mail directory for incoming mail
(mode 755, group ID mail)
/usr/mail/username.lock lock for mail directory
/usr/mail/username incoming mailbox for user.
(mode 660, group ID mail)
/usr/lib/nls/C/elm.cat location of the message catalogue
$HOME/.elm directory for elm
$HOME/.elm/elmrc personal customized file
$HOME/.elm/elmheaders contents of additional headers
/usr/lib/elm/elm_help.0 help file for main screen
/usr/lib/elm/elm_help.1 help file for alias screen
/usr/lib/elm/elm_help.2 help file for option screen
/usr/lib/elm/elmrc-info comment file for .elm/elmrc file
/usr/mail/.elm directory for elm mailer system aliases
/usr/mail/.elm/aliases.hash system alias hash table
/usr/mail/.elm/aliases.data system alias data table
/usr/mail/.elm/aliases.text system alias text file
$HOME/.elm/aliases.hash user alias hash table
$HOME/.elm/aliases.data user alias data table
$HOME/.elm/aliases.text user alias text file
/tmp/snd.pid and sndh.pid outgoing mail edit buffer
/tmp/form.pid editor buffer for form message
/tmp/print.pid temporary file for printing message
/tmp/alias.pid temporary file for deleting alias
$HOME/.elm/readmail used by readmail
/tmp/mbox.logname temporary mbox for user logname
$HOME/Cancelled.mail cancelled message of non-interactive use.
SEE ALSO
elmalias(1), mailfrom(1), newmail(1), readmail(1), vi(1).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992