Mail In Linux
In Multi-user system, it is often necessary for one user to know what the other is doing. When there are a hundred odd users sharing the system resources, some of them are invariably located quite a distance apart. Communication through the system seems quite natural and necessary the system administrator also requires sending messages to some, and sometimes to all of them.
The mail command is a quick and easy way to email someone. Just type mail and the address of the person we want to mail. We will then be prompted for a subject and any cc’s. Then just type our message and control-d on a line by itself to send the mail
Mail headers have the following construction
Subject: Title describing the message (optional)
Cc: List of people to receive a carbon copy (optional)
Bcc: List of people to receive blind carbon copy (they do not see user names in the received message. Optional)
UNIX uses two mailboxes to hold mail messages
system mailbox (/vsr/spool/mail/) user mail box (..../.../mbox)
Mail arrives in the system mailbox, and is saved in our user mail box after we have read it. The user mail box is normally located in their $HOME directory. To list all mails which he got say command only mail with out any arguments Type
The mail program displays a title message and lists all available mail headers,
SCO System V Mail (version 3.2) Type ? for help. "/usr/spool/mail/brianb": 3 messages 3 new N 3 brianb Mon May 31 15:02 10/299 My message3 N 2 brianb Mon May 31 15:01 9/278 >N 1 brianb Mon May 31 15:00 12/415 My first message &
This initial screen displays the subject fields of messages which have arrived. The format of the display is,
Type Message_number From_User Date/Time Subject N denotes a new message > denotes the current message & mail prompt symbol
Note how message number 2 does not have a subject heading. This is because the mail message was sent from a file, and the -s option was not specified on the command line when the mail program was invoked.
To read message type number associated to that mail. To quit from this mail prompt say
Sending Mail to People at Other Host Machines or Sites
We send mail to other people at remote sites by specifying their specific mail address.
The write command is used to send on-line messages to another user on the same machine. The format of the write command is as follows:
write username text of message ^D
After typing the command, we enter our message, starting on the next line, terminating with the end-of-file character. The recipient will then hear a bleep, then receive our message on screen, with a short header attached. The following is a typical exchange. User UserRavi types:
write UserRavi Hi there - want to go to lunch? ^D
User lnp8zz will hear a beep and the following will appear on his/her screen:
Message from UserRavi on sun050 at 12:42 Hi there - want to go to lunch? EOF
If UserAjay wasn’t logged on, the sender would see the following:
write UserAjay UserAjay not logged in.
The command talk creates a two-way, screen-oriented communication program. It allows users to type simultaneously, with their output displayed in separate regions of the screen. To send a talk request, type talk and then
talk <username> talk username@<their machinename> [to send a message to remote user]
Note: The mesg command may, of course, be used to disable write,talk access to a terminal.
wall is a Unix command line utility. That would only invoked by Administrator, it displays the contents of a file or standard input to all logged-in users. Invocation wall is invoked as follows:
raju@wilshiresoft:# wall <filename>
To take standard input as the file, omit the filename.
When invoked, wall displays the following output:
# Broadcast Message from raju@wilshiresoft # (/dev/pts/0) at 01:23 ...
Pine (e-mail client)
Pine is a powerful freeware e-mail client: the University of Washington’s
Program for Internet News & Email. Many people believe that Pine stood for
Pine is not Elm. However, its original author, Laurence Lundblade