System Administration Guide, Volume 3

How to Set Up a Mail Client

A mail client is a user of mail services, with a mailbox on a mail server, and a mail alias in the /etc/mail/aliases file that points to the location of the mailbox.

  1. Become superuser on the mail client's system.

  2. Make sure a /var/mail mount point exists on the mail client's system.

    Using ls tells you if the file system exists. The following example shows the response if the file system has not been created.


    # ls -l /var/mail
    /var/mail not found

    If mail files are in this directory, you should probably move them, so that they are not covered when the /var/mail directory is mounted from the server.

  3. Mount the /var/mail directory from the mail server.

    The mail directory can be automatically mounted or mounted at boot time.

    1. (Optional) Mount /var/mail automatically.

      Edit /etc/auto_direct and add an entry like this one:


      /var/mail -rw,hard,actimeo=0 server:/var/mail
    2. (Optional) Mount /var/mail at boot time.

      Edit the /etc/vfstab file and add an entry for the /var/mail directory on the mail server, mounting it on the local /var/mail directory.


      server:/var/mail - /var/mail nfs - no rw,hard,actimeo=0

      The client's mailbox is automatically mounted any time the system is rebooted. Type mountall to mount the client mailbox until the system is rebooted.


      Caution - Caution -

      You must include the actimeo=0 option when mounting mail from an NFS server to allow mailbox locking and access to work properly.


  4. Update/etc/hosts.

    Use admintool to edit the /etc/hosts file and add an entry for the mail server. This step is not required if you are using a name service.

  5. Add an entry for the client to one of the alias files.

    See "Administering Mail Alias Files" for information about how to create mail aliases for different kinds of mail configurations.


    Note -

    The mail.local program automatically creates mailboxes in the /var/mail directory the first time a message is delivered. You do not need to create individual mailboxes for your mail clients.


  6. Restart sendmail.