Managing sendmail Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

How to Set Up a Mail Client

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

Note - You can also perform the task of setting up a mail client by using a service such as Post Office Protocol (POP) or Internet Message Access Protocol (IMAP). However, to provide configuration guidelines for POP or IMAP is beyond the scope of this document.
  1. Become an administrator on the mail client's system.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.2 .

  2. Stop sendmail.
    # svcadm disable -t network/smtp:sendmail
  3. Ensure that a /var/mail mount point exists on the mail client's system.

    The mount point should have been created during the installation process. You can use ls to ensure that the file system exists. The following example shows the response that you receive if the file system has not been created.

    # ls -l /var/mail
    /var/mail not found
  4. Ensure that no files are in the /var/mail directory.

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

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

    You can mount the mail directory automatically or at boot time.

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

      Add an entry such as the following to the /etc/auto_direct file.

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

      Use the assigned server name.

    2. (Optional) Mount /var/mail at boot time.

      Add the following entry to the /etc/vfstab file. This entry permits the /var/mail directory on the mail server that is specified to mount the local /var/mail directory.

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

      The client's mailbox is automatically mounted whenever the system is rebooted. If you are not rebooting the system, type the following command to mount the client mailbox.

      # mountall


      Caution  -  For mailbox locking and mailbox access to work properly, you must include the –actimeo=0 option when mounting mail from an NFS server.

  6. Update /etc/hosts.

    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.

    # cat /etc/hosts
    # Internet host table
    IP-address     mailhost  mailhost

    Use the assigned IP addresses.

    Use the assigned domain.


    Use the assigned mailhost.

    For more information, refer to the hosts(4) man page.

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

    Refer to Administering Mail Alias Files (Task Map) for a task map about administering mail alias files. Note that 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.

  8. Restart sendmail.
    # svcadm enable network/smtp:sendmail