Electronic mail is one of the fastest and easiest ways to communicate with someone in Australia or someone down the hall. You can send almost anything: notes, manuscripts, even images and sounds. (Smells and tastes are coming.) You tell mail.sas who you want to send mail to and what you want to send and mail.sas (with the help of other computers) will deliver that mail.
If the mail is undeliverable, you'll get a message back saying so. If there is no such error message, then you know that the mail you sent out got to it destination. This makes it much more robust than US mail. Moreover, if a message is undeliverable, mail.sas will keep trying to send it for some period of time and then inform you when it has given up.
To send a mail message to another user you must first know that recipient's "email address". This "email address" consists of a username, followed by an @ sign, then the name of the user's system, with no space between the three parts. It is essential that "address" be correct or the mail message will be returned. If you are sending mail to a user on mail.sas, you can omit the @ and the system name, since it would be the same as your own. If you are sending mail to someone at Penn, you can omit "upenn.edu" from the address (when you use mail.sas to send mail).
Mail messages that you have read are typically stored in a
file called mbox unless you specify something else.
Please put files somewhere when you have read them. Do not leave
them in the spool file that holds incoming messages. Also, if
you are going to stop reading your mail, it is best to set up a
forwarding address, and, eventually, close your account.
Etiquette
This section is not about how to begin and end an email message.
Nope. It is mostly about the format of the email. You can call
someone "Herr Doktor Professor," but if you send an unreadable
email, you give the dear Herr Doktor a pain in the neck. Senders
of email tend to assume that receivers use the same mailer. This
is rarely true, and mailers differ.
Readable email has lines that are 70 characters or less. This allows someone to re-send your message with little marks at the beginning of the line and still get it within the 80 characters that are standard in terminal windows, still. The simplest way to do this is to type in a terminal window and put the line breaks in by hand. If you are old enough, you may remember that this is what you had to do with a typewriter. (You can even configure xterm to ring a bell when you get near the end. See man xterm.)
Another way is to use Emacs to write your message, and add something like the following to your .emacs file:
(add-hook 'text-mode-hook '(lambda () (auto-fill-mode 1))) (setq default-fill-column 65) ;Right margin 65 in all modes
It is very difficult to do this if you write email in a word processor. There is almost no reason to use a word processor for writing email (or, really, for anything). But, if you must, use a fixed font (like Courier) and set the margins fairly narrow. Even then, some word processors (such as Microsoft Word) do not produce line breaks within paragraphs by default.
Other rules:
Many people like to use their desktop or laptop computers (PCs) for mail, instead of mail.sas. The programs used are called POP mailers (Post-office protocol), and they include Eudora, Pegasus, Netscape, Outlook, Outlook Express, and Microsoft Messaging. These mailers store incoming messages on your PC rather than in some file on mail.sas. They use less of mail.sas's disk, and more of your PC's disk. (Either way, you can't just let things pile up forever.) An advantage is that you can work on your mail without connecting to mail.sas. Some people like the graphical interface, and, best of all, POP mailers deal automatically with many forms of encoded messages such as Word files sent as attachments.
If you use a POP mailer, you must configure it properly. The important thing is to put in the correct SMTP server. For example, in Netscape, this is under Edit/Preference/Mail_and_newsgroups/Mail_servers. If you connect directly to Penn (e.g., from a Penn office) you can write username@psych.upenn.edu when you are asked for your SMTP server. Here "username" should be replaced with your own user name, the name you use for logging in on cattell.
POP readers have some real drawbacks of which you need to be aware. If you want to take my word for it that these drawbacks are serious and easily avoided, stop reading here and proceed to the discussion of IMAP, which essentially solves all the problems. But here are the problems in case you want to hear them.
First, by default, pop readers delete mail from the server (mail.sas). Eudora does not necessarily wait until after the mail has been successfully downloaded on your Mac or PC (*). Netscape is more careful about this, but I'm not sure that it is foolproof. As a result, under some circumstances your messages are deleted from mail.sas but have not been copied to your PC. In other words, the messages are lost. To avoid this loss, select "leave mail on server" in the options for both programs (you should then use elm or mail to "clean up" your incoming mailbox every now and then). Note, however, that this is still not absolutely safe. Many people have claimed to lose mail with POP mailers, without doing anything wrong. Although mail is backed up periodically, it is time consuming to retrieve backups, and they may not contain what was lost.
Secondly, pop readers can access ONLY your incoming mailbox (/var/mail/username, where "username" is your userame). They can NOT access your folders in your home directory, or your Mail or any other subdirectory.
Thirdly, if you access your mail from different locations, you can end up with messages downloaded on several machines, and different notions of what messages are unread. Fourthly, mail on mail.sas gets backed up daily (M-F), but backing up mail messages on your Mac or PC is something you'll need to do.
If two programs access one's incoming mailbox (or any other mail
folder) at the same time, messages can disappear and then
reappear, and messages can get lost or corrupted because the two
programs can overwrite each other's changes. There are thus
mechanisms to automatically prevent two "pop" mail readers (e.g,
Eudora or Netscape Mail), or two server-based mail readers (e.g.,
elm or mail) from accessing one's incoming mailbox at the same
time. However, there are no mechanisms to prevent one pop reader
and one server-based reader from accessing one's incoming mailbox
at the same time. Thus, you need to make sure that you do not
use elm (or mail) and Eudora (or Netscape Mail) at the same time.
Note that if you've ve set Eudora (or Netscape Mail) to check
your email regularly, then as long as you don't quit from it, it
keeps on accessing your incoming mailbox. Hence, Eudora
(Netscape Mail) can cause messages to disappear or get corrupted
even though you don't select "check mail" ("Get new mail") from
the file menu or top bar.
Finding email addresses at Penn
If you want the email address of someone at Penn, one way is to use the
directory.
But various mail clients are supposed to be able to use Penn's LDAP server (lightweight directory access protocol). This allows the mail client to get the email address from the name. For Mozilla/Netscape/Thunderbird, in something like Preferences/Compose (from here):
In the "Directory Server Properties" complete the fields as follows:
Mail.sas supports four mailers (mailing programs), mutt, elm,
pine, and mail.
Mutt
Mutt is similar to elm but better. It is described
here>.
Elm
Elm is the standard program for many people at
Penn. It is mostly covered in
http://www.sas.upenn.edu/Help/Elm-guide/elm.html.
But that does not say much about the creation of group aliases in
elm, so here is a discussion of that (by V. Hurtubise), followed
by discussion of the "mail" program.
The easiest way to make a group alias is to edit your aliases.text file. You usually do this by entering 'e' on the elm alias screen. he format for a group alias is alias_name = = email addresses separated by a comma For example, group1 = = john, mary, joe@company.com, robert@university.edu If you have many email addresses, you can either leave them all on one very long line (but some editors, e.g., pico, break a long lines as you type it, so you have to put it back together), or put them on several lines as follows group1 = = john, mary, joe@company.com, robert@university.edu Note that each line, except the last, ends with a comma, and that each line, except the first, must have at least one blank at the begining. The space between the two equal signs can be used for a comment and the first and last names entered as last name; first name; comment Since first and last names don't make sense for a group alias, most people just leave a blank.
The version of mail to use is /usr/ucb/mail, also called mailx. Your .cshrc file should specify this version, e.g., with a line that says alias m '/usr/ucb/mail', which will then let you use m for mail. The command m -f, for example, will then give you the messages in your mbox. Help on commands is available by typing ? at the mail prompt (?). One useful command, for which elm has no equivalent, is e, which allows you to edit any message (e.g., when you want to save only part of it). Here is the list you will see (which sometimes scrolls by too fast). Most commands cay be abbreviated by the first letter.
alias,group user ... declare alias for user names alternates user declare alternate names for your login cd,chdir [directory] chdir to directory or home if none given !command shell escape copy [msglist] file save messages to file without marking as saved delete [msglist] delete messages discard,ignore header discard header field when printing message dp,dt [msglist] delete messages and type next message echo string print the string edit [msglist] edit messages folder,file filename change mailboxes to filename folders list files in directory of current folder followup [msglist] reply to authors of messages and save copy Followup [message] reply to all recipients of message and save copy from [msglist] give header lines of messages header [message] print page of active message headers help,? print this help message hold,preserve [msglist] hold messages in mailbox inc incorporate new messages into current session list list all commands (no explanations) mail user mail to specific user Mail mail to specific user, saving copy mbox [msglist] messages will go to mbox when quitting next [message] goto and type next message pipe,| [msglist] shell-cmd pipe the messages to the shell command print,type [msglist] print messages Print,Type [msglist] print messages with all headers quit quit, preserving unread messages reply,respond [msglist] reply to authors (only) of the messages Reply,Respond [message] reply to the author and recipients of the msg save [msglist] file save (appending) messages to file Save [msglist] save messages to file named after author set variable[=value] set variable to value size [msglist] print size of messages source file read commands from file top [msglist] print top 5 lines of messages touch [msglist] force the messages to be saved when quitting undelete [msglist] restore deleted messages undiscard,unignore header add header field back to list printed unread,new [msglist] mark messages unread version print version visual [msglist] edit list with $VISUAL editor write [msglist] file write messages without headers xit,exit quit, preserving all messages z [+/-] display next [last] page of 10 headers [msglist] is optional and specifies messages by number, author, subject or type. The default is the current message.
Other commands are available when you are typing a messages. These are preceded with ~ at the beginning of the line. To list these commands, when you are typing a message, type ~? at the beginning of the line. To end a message, type . at the beginning of a line. Two of the most useful commands are ~e (edit the message) and ~q (quit, saving message in dead.letter). Here is the whole list:
-------------------- ~ ESCAPES ---------------------------- ~~ Quote a single tilde ~a,~A Autograph (insert 'sign','Sign' variable) ~b users Add users to Bcc list ~c users Add users to Cc list ~d Read in dead.letter file ~e Edit the message buffer ~f messages Read in messages, do not right-shift ~h Prompt for Subject and To, Cc and Bcc lists ~i variable Insert variable into message (~a := ~i sign) ~m messages Read in messages, right-shifted by a tab ~p Print the message buffer ~q,~Q Quit, save letter in $HOME/dead.letter ~r,~< file Read a file into the message buffer ~r,~< !command Read output from command into message ~R Mark message for return receipt ~s subject Set subject ~t users Add users to To list ~v Invoke display editor on message ~w file Write message onto file (no header) ~x Quit, do not save letter ~!command Run a shell command ~|,~^ command Pipe the message through the command ~:,~_ command Execute regular mailx command ~. end of input ~? print this help message -----------------------------------------------------------
Mail is controlled by a .mailrc file. Here is an example of part of one:
set EDITOR=/pkg/emacs/bin/emacs set PAGER="less -C -E" set crt=22 set indentprefix=">" unset replyall set alwaysignore ignore Content-Transfer-Encoding Content-Type Content-Length ignore Posted-Date Message-Id Date In-Reply-To Received Received-Date X-Mailer Mime-Version alias arkes arkes@oak.cats.ohiou.edu alias birnbaum mbirnbaum@ccvax.fullerton.edu alias mellers mellers.1@osu.edu # summer address mellers@violet.berkeley.edu alias jdmpubs baron arkes birnbaumNotice that you can make group aliases simply by adding a line to the file like the last one. Here "jdmpubs" is the alias, and the lists consists of the three names following that. If you edit this file with emacs, then it is a good idea to add names on the left side of the list, letting emacs push the rest of the names to the right. This insures that emacs will not insert a line break. When you send mail to a very long list, you might want to use ~b [alias], that is, a "blind carbon copy," so that the list itself is not sent to every recipient.
If you need large aliases, contact manager.
Recovering messages that you lose before you
send them.
Sometimes you are writing a message and get cut off. For
example, your power goes out, or your modem times out. If you
are using elm or mail, you cannot get back to the session you
were in.
One way to do this is to use the scroll-back or log feature of your telnet application. CRT, which Penn now supports and which is free to Penn people, has an excellent log facility. Under "Options/Session preferences/Files" there is a box called "Log file." Give this a name, like "psych.log", when you set up CRT at home. It is a good idea to check "Start log upon connect" and "Append to file" (unless you are very tight for disk space). Periodically you should remember to erase the log file. If you want to do it automatically, you can put del psych.log in your autoexec.bat. "Append to file" will save everything from old sessions. It is right there in the log, which you can edit with your favorite PC editor, such as Notepad (or probably Word, but this will turn it into something else). The log file is also good for recovering messages that you read and then accidentally deleted, etc.
Also, if you were using an editor like emacs or pico when you were writing the message, you usually can recover most or all of what you wrote. Here are instructions from Vince Hurtubise.
1) look for files created by your mail program (elm or 'mail') in the
"temp" directory that's used by your mail program. For almost all of
our elm users, this directory is /tmp. So, they should use
cd /tmp
ls -l | grep your_username
with "your_username" replaced by your actual user name. The files that
elm uses to store a message you compose is called snd.NNNN with "NNNN"
some number. To make sure it's the one you want (you may have severl
snd.NNNN files under some circumstances), use
more snd.NNNN
to check its contents.
2) Rename the file identified in step 1) to, say, "snd.NNN.back" or whatever
other name you like, using
mv snd.NNNN snd.NNNN.back
You won't be able to use a name used for another file in /tmp, so it's
best to go with something starting with snd.NNN.
3) Restart your mail reader (if you use elm, use 'elmrestart' for this --
see below) and one at the point where you are composing your message,
read in the file snd.NNNN.back (or whatever name you used in step 2). If
you use pico as your editor, enter control-R and you will be prompted for
the file name.
Elm users should use 'elmrestart'. Elmrestart checks for an elm
session that is still running, prompts whether to stop it (in almost
all cases, the answer should be "yes"), and it it removes the "lock"
file created by the previous elm session to prevent simultaneous access
by more than one elm session to the incoming mailbox. (This lockfile
may still exist if the previous elm session did not terminate normally).