Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bellmail(1) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

login

mail, Mail

uucp

sendmail, mailq, newaliases

write



BELLMAIL(1,C)               AIX Commands Reference                BELLMAIL(1,C)



-------------------------------------------------------------------------------
bellmail



PURPOSE

Sends messages to system users and displays messages to system users.

SYNTAX


              +--------+   +- -f $HOME/mbox -+
            +-| +----+ |---|                 |-+
            | +-| -q |-+   +- -f file -------+ |
            |  ^| -r ||                        |
bellmail ---|  || -p ||                        |---|
            |  |+----+|                        |
            |  +------+                        |
            +---- -e --------------------------+

   one of
+----------+   +------+
| bellmail |---|      |-- user --|
| rmail    |   |      | ^      |
+----------+   +- -t -+ +------+


Warning: See restrictions, Chapter 18, AIX Programming Tools and Interfaces.

DESCRIPTION

The bellmail command with no flags writes to all stored mail addressed to your
login name, one message at a time, to standard output.  Following each message,
the bellmail command prompts you with a "?" (question mark).  Press the Enter
key to display the next mail message, or enter one of the subcommands that
control the disposition of the message (see "Subcommands").

When sending mail, you specify one or more users, and the bellmail command
reads a message from standard input until you press the END OF FILE (Ctrl-D)
key or enter a line containing only a . (period).  The bellmail command
prefixes the message with the sender's name and the date and time of the
message (its postmark) and adds the message to the file $HOME/.newmail for each
user specified on the command line.

The action of bellmail can be modified in two ways by manipulating the file
$HOME/.newmail:

  o By default, the permissions on system mailbox files are read/write for the
    owner only (see the chmod command).  You may change the permissions on the
    $HOME/.newmail file to allow access by others and bellmail will preserve
    your chosen permissions.



Processed November 8, 1990       BELLMAIL(1,C)                                1





BELLMAIL(1,C)               AIX Commands Reference                BELLMAIL(1,C)




  o You can edit the file to contain as its first line:

      Forward to person

    This string causes all messages sent to user to be sent to person instead.
    The "Forward to" feature is especially useful for sending all of a person's
    mail to a particular machine in a network environment.

Note:  If sendmail is installed, modifying $HOME/.newmail to forward messages
       does not work.  In this case, you must add a $HOME/.forward file, as
       described in "mail, Mail."

To specify a recipient on a remote system which is available for uucp file
transfer, prefix the system name and add an "!" (exclamation mark) before or
after user.  See "uucp" for details on addressing remote systems.

FLAGS

-e         Does not display any messages.  This flag causes bellmail to return
           an exit value of 0 if the user has mail or an exit value of 1 if the
           user has no mail.

-f  file   Reads mail from the named file instead of from the default system
           mailbox, $HOME/.newmail.

-p         Displays mail, without prompting for a disposition code.  This flag
           does not delete, copy, or forward any messages.  (For disposition
           codes, see "Subcommands.")

-q         Causes the bellmail command to exit when you press the INTERRUPT
           (Ctrl-C) key.  Normally, pressing this key stops only the message
           being displayed.  (In this case, the next message sometimes does not
           display until you enter the p subcommand.)

-r         Displays mail in first-in, first-out order.

-t         Prefixes each message with the names of all recipients of the mail.
           (Normally, only the individual recipient's name appears as
           addressee.)

Usually, user is a name recognized by the login command.  It can also be the
ASCII synonym that is automatically defined for any name that contains NLS code
points.

If the system does not recognize one or more of the specified users or if the
bellmail command is interrupted during input, the command saves messages in the
file $HOME/dead.letter to allow for editing and resending, unless the sendmail
program is installed.  In that case, mail to unknown users will be returned.
If your login session is cut off while you are entering a message, and before
you have completed sending, it will be saved in $HOME/dead.letter.




Processed November 8, 1990       BELLMAIL(1,C)                                2





BELLMAIL(1,C)               AIX Commands Reference                BELLMAIL(1,C)



SUBCOMMANDS

The following subcommands control message disposition:

+                Displays the next mail message (the same result as pressing
                 the Enter key).

-                Displays the previous message.

d                Deletes the current message and displays the next message.

p                Displays the current message again.

s [file]         Saves the message in the named file instead of in the default
                 mail file, $HOME/mbox.

w [file]         Saves the message, without its postmark, in the specified file
                 instead of in the default mail file $HOME/mbox.

m  user          Forwards the message to the named user.

q                Writes any mail not yet deleted to the file $HOME/.newmail and
                 exits.  Pressing the END OF FILE (Ctrl-D) key has the same
                 effect.

x                Exits without changing $HOME/.newmail.
                 Any changes or deletions you make during this use of bellmail
                 will be rescinded.

!AIX-cmd         Runs the specified AIX command.

*                Displays a subcommand summary.

EXAMPLES

  1. To display mail:

      bellmail

    After the most recent message is displayed, a "?" (question mark) indicates
    that the bellmail command is waiting for you to enter one of the
    subcommands listed previously (for example, +, -, d, and p).  Enter help or
    "*" (asterisk) to list the subcommands available.

  2. To send mail to other users:

      bellmail tom rachel
      Don't forget the
      meeting tomorrow at 9:30.

    Ctrl-D




Processed November 8, 1990       BELLMAIL(1,C)                                3





BELLMAIL(1,C)               AIX Commands Reference                BELLMAIL(1,C)



    In this example the system mails the message "Don't forget the meeting
    tomorrow at 9:30" to the users "tom" and "rachel".  The Ctrl-D indicates
    the end of the message but is not sent with the text.

  3. To send a file to another user:

      bellmail fran <proposal

    This command sends the contents of the file "proposal" to "fran".  You can
    create "proposal" with an editor, which allows you to correct your mistakes
    before sending the message.  You can also use this form of the bellmail
    command to send someone a copy of a text file.

  4. To retrieve a file that was sent to you:

      bellmail

    This command displays, one at a time, the messages mailed to you.  You need
    to look at them because the file you want was actually added to
    $HOME/.newmail as a message.  You may see several other messages before
    seeing the file that was sent to you.  If so, press the Enter key after the
    "?" prompt until the desired file appears.  If you go too far, enter the
    - (minus) subcommand to go back a message at a time.  After the "?"
    immediately following the file, enter:

      w mycopy

    This subcommand saves a copy of the file sent to you in a file named
    "mycopy", which resides in the current directory.

    Note:  You can use the w subcommand to save a copy of any message.

FILES

/etc/passwd            To identify sender and locate user.
/$HOME/.newmail        Incoming mail for user.
$HOME/mbox             Saved mail.
$HOME/dead.letter      Non-mailable text.
/tmp/ma*               Temporary file.

RELATED INFORMATION

See the following commands:  "login,"  "mail, Mail,"  "uucp," "sendmail, mailq,
newaliases" and "write."











Processed November 8, 1990       BELLMAIL(1,C)                                4



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026