San Diego State University logo

  ROHAN Academic Computing

The Elm Mail System
*The Elm Reference Guide - Part 4*

------------------------------------------------------------

A comprehensive list of all commands, options and such to the Elm mail system

Introduction
The .elm/elmrc File
The Command Line Options
Multi-Media Capabilities of Elm
Special Outgoing Mail Processing
Customized header lines
Commands
Using Elm with ``editor = none''
The Alias System
Elm and Signals
Expert Mail Users and Debugging the Mailer

----------------------------------------------------------------------

Using Elm with ``editor = none''

The Elm program also supports a builtin editor for simple message composition that is very (very) similar to the simple line editor available from the Berkeley Mail system.

To access it, you need merely to specify ``editor=none'' in your .elm/elmrc file. With that, any messages to be composed that don't already have text in the buffer (e.g. no reply with the text included, etc), will use this editor.

From the builtin editor, the following options are available for use. Each command here is prefixed with a `~'. You can specify a different ``escape'' character in your .elm/elmrc file, if you desire (see above).

~?
Print a brief help menu.
~b
Change the Blind-Carbon-Copy list.
~c
Change the Carbon-Copy list.
~e
Invoke the Emacs editor on the message, if possible.
~f
Add the specified message or current message.
~h
Change all the available headers (To, Cc, Bcc, and Subject).
~m
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
Include (read in) the contents of the specified file.
~s
Change the Subject line.
~t
Change the To list.
~v
Invoke the Vi visual editor on the message.
~<
Execute the specified UNIX command, entering the output of the command into the editor buffer upon completion. (For example ``~< who'' will include the output of the who command in your message.)
~!
Execute a UNIX command if one is given (as in ``~!ls'') or give the user a shell (either from their shell setting in their .elm/elmrc file or the default).
~~
Add a line prefixed by a single `~' character.

A useful note is that the `~f' and `~m' commands invoke the readmsg command, so you can pass parameters along too. For example, if we wanted to include a message from Joe, without any headers, prefixed, we could use:

~m -n Joe

to accomplish the task.

To learn more about how they work, try 'em!

Return to Index of Sections

----------------------------------------------------------------------

The Alias System

As mentioned previously, there exists in the elm system a set of aliases that associate an arbitrary word (such as a persons name) to a complex address or group. The advantages are readily apparent; rather than remembering an address of the form:

host1!host2! ... !hostN!user

the user merely has to remember a single word.

Two alias tables are available for a each user within elm, namely the system alias file and the user's alias file. The system alias file is created and maintained (by the system administrator) by editing the file SYSTEMALIASES as defined in the `sysdefs.h' file (see The Elm Configuration Guide) and as described in the documentation with the newalias command, then running the newalias program.

An individual user can also have an alias file which works in conjunction with the system aliases. To do this, he needs merely to enter the alias menu system and create aliases with the `a' (Alias current message) or `n' (Make new alias) commands. Alternatively, the user can peruse the documentation for the newalias command and create a file as indicated therein. After executing the program, the aliases will be available for use from within elm.

Please refer to The Elm Alias Users Guide for more helpful hints and so on.

Within elm, however, the alias system acts as an entirely different program, with its own display, own commands, and own mini-menu. The aliases are presented in a list similar to the main screen. The menu replaces the standard mini-menu with:


Alias commands: ?=help, <n>=set current to n, /=search pattern
a)lias current message, c)hange, d)elete, e)dit aliases.text, f)ully expand,
l)imit display, m)ail, n)ew alias, r)eturn, t)ag, u)ndelete, or e(x)it

Alias: @


The commands are:

?
Help. This command used once puts you in the help mode, where any key you press will result in a one-line description of the key. Pressed again at this point will produce a two page summary listing each command available. `.' will leave the help mode and return you to the alias menu level.

<space> or <return> or v

Display the current alias address. The alias address is displayed below the alias menu. This command allows you to verify the address for a person or the contents of a group alias.

/
Pattern match. This command allows the user to search through all the alias and username entries for the alias list starting at the current alias and continuing through the end. If the first character of the pattern is a `/', then the program will also include the comment and the fully expanded address fields in the search. The search is case insensitive. This allows the user to find a specific alias in the situation where there are a large number of aliases.

a
Alias current message. This allows the user 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. If the alias name is not unique, you will be asked if you wish to replace the existing alias. For further information, please see The Elm Alias System Users Guide.

c
Change current user alias. This will prompt for changes to the current names and address. If other aliases are tagged you will be asked if you want to create a group alias from the tagged aliases. The original alias will be replaced with the new information in your individual aliases.text file ($HOME/.elm/aliases.text) and then added to the database (upon the next alias resync). Aliases that have been changed are marked with an 'N' (for new) until the database is updated.

d, u
Delete or undelete an alias. This allows the user to mark an alias for deletion in the same fashion as on the main menu. The deletions are not actually made until the user r)eturns to the main menu or resyncs the display (with the `$' command). Deletions on system aliases are not allowed. These commands (plus the <control>-D and <control>-U versions) behave identically to their main menu counterparts.

e
Edit the .elm/aliases.text file. The user alias file is edited using the editor defined in editor in your .elm/elmrc file. newalias is run after the edit.

f
Display fully expanded alias. The currently highlighted alias is fully expanded and displayed to the user. This is most useful when working with group alias in the alias database.

l
Limit the display. You can limit the display by alias type (person/group or user/system) or by search pattern on name or alias. Otherwise, this works exactly like the limit command on the main menu.

m
Send mail to the current alias. A new mail message will be sent to the person or group specified by the selected alias. If aliases are currently tagged the message will be mailed to the person(s) and/or group(s) specified by the tagged aliases. Tags are cleared after mailing the message.

n
Make a new user alias. This will prompt for a unique alias name and then for an address. If the alias name is not unique, you will be asked if you wish to replace the existing alias. If aliases are tagged you will be asked if you want to create a group alias from the tagged aliases. The information provided will be added to your individual aliases.text file ($HOME/.elm/aliases.text) and then added to the database (upon the next alias resync).

r or q or i
Return. Return to the main level of the elm program. Any pending deletions are processed and newalias is run to update the database. New additions are handled at this time as well.

R or Q
Quick return. This behaves like the `r' command except that you are never prompted for answers to alias disposition questions. Elm will dispose of aliases according to the values you have set for alwaysdelete in your .elm/elmrc file.

t
Tag. Tag the current alias for a later operation. (Note: Currently only mail, change, and new alias support this.)

x
Exit alias menu. Exits the alias menu without processing any deletions. Aliases marked for deletion are unmarked. Additionally, newalias is not run, even if alias additions have been made.

Additionally, the movement keys (`j', `k', `+', `-', etc.) work in the same fashion as on the main menu. (See the previous section on Commands in this guide.)

Return to Index of Sections

----------------------------------------------------------------------

Elm and Signals

Elm can handle several standard UNIX signals to do some special processing. Signals are interrupt messages sent from one program to another. No detailed messages are sent, but a properly configured program (such as elm) can watch for and handle these signals.

In particular, elm watches for the following signals and takes these actions:

ALRM
This is the alarm clock signal or time warning. Elm uses this to wake itself up periodically and check for new mail.

HUP
This is the hangup notice. It means that the terminal/modem/whatever which you have been using with elm has become detached from the system where elm was running. When elm gets this signal, it aborts all the pending operations and exits leaving your mailbox unchanged.

USR1
This is the first user-definable signal. When elm gets this signal, it receives any pending mail, performs all the pending operations (deletes), and exits leaving all unread mail marked as new. This is the same as giving the $ and X commands.

USR2
This is the second user-definable signal. When elm gets this signal, it receives any pending mail, performs all the pending operations (deletes), and exits leaving all unread mail marked as old. This is the same as giving the $ and Q commands.

You would only use these signals yourself under the most unusual circumstances. For example, suppose you were using elm to read mail on host 1. You have many messages, most of which have been read and filed (and therefore deleted), or simply deleted. You have not yet resynchronized your mailbox ($ command). Now you go to lunch. On your return, you're stopped at the door and told to take care of an emergency. You go to another part of the building, and want to read your mail to see what the emergency is - but you can't, because elm is still running at your desk.

What you really want is one of the scenarios given in the description of HUP, USR1 or USR2. Use your local ps command to find out what the process number of your elm session is. Then give the command

kill -XXX process_number
where XXX is either HUP, USR1 or USR2 and process_number is the process number for your remote elm session. Your remote session will terminate with the actions noted above.

Return to Index of Sections

----------------------------------------------------------------------

Expert Mail Users and Debugging the Mailer

There are some additional facilities available in the elm mailer for those people who are knowledgeable about mail protocols, or trying to debug/track down a problem.

The `h' headers command at the outermost level of the mailer will display the current message ignoring the current setting of the `weed' option. This is most useful for answering questions of the form "I wonder what this guy put in his header?" and such. This command does not show up on the mini-menu because it is somewhat esoteric, but it does appear on the `?' help screen (can you find it there, though?).

The `@' command at the outermost level of the mailer will output a screen of debugging information, including the number of lines and offsets of each of the messages in the current mailbox.

The `#' command at the outermost level of the mailer will display the entire stored `record structure' for the current message.

The `%' command will display the full computed return address of the current message.

Starting up elm with the "-d" debug option will create a file called ELM:debug.info in your home directory and contain a wealth of useful information (to me, at least!) to aid in tracking down what errors are occurring and why.

If there are any problems with the mailer, please try to recreate the error with the debug option enabled and set to the highest level (11) before sending defect reports my way.

One final note: all error names reported by the program are documented in the AT&T System V Interface Definition Reference Manual in errno(2).

Return to Index of Sections

----------------------------------------------------------------------


BACK The Elm Reference Guide | Academic Computing Handouts, Manuals, and Help Files

This page last modified: December 20, 2002
Send comments/suggestions about this web page to webmaster@rohan.sdsu.edu

SDSU Faculty and Students may send questions about software on ROHAN or ROHAN UNIX problems to problems@rohan.sdsu.edu