from Command

Purpose

To determine whom mail is from.

Syntax

from [ -d Directory ] [ -s Sender ] [ user ]

Description

The from command displays the message headings in your mailbox file to show you whom mail is from. If you specify user, the user mailbox is examined instead of your own (provided that you have read permission to user's mailbox).

Flags

Item Description
-d Directory Specifies the system mailbox directory.
-s Sender Prints message headers only for mail sent by Sender.

Parameters

Item Description
user Specifies the user mailbox that is examined instead of your own (provided that you have read permission to the user's mailbox).

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX® Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To display the message headings in your mailbox, enter:
    from
    The names of the senders and message dates are displayed.
  2. To display the message headings for mail sent by a specific user, enter:

    from -s dale

    In this example, only the message headings of the messages sent from user dale are displayed.
  3. To display the message headings in a specific user's mailbox, enter:
    from   dawn
    In this example, the message headings from user dawn's mailbox are displayed (provided that you have read permission to dawn's mailbox).
  4. To view all messages bob received from jane, enter:
    from -d /var/spool/mail -s jane bob
    This allows you to see all messages that bob received from jane, provided you have the permissions (such as root).

Files

Item Description
/var/spool/mail/* System mailboxes for all users.
/usr/bin/from User mailbox files.