Managing sendmail Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

How to Set Up a Mail Server

No special steps are required to set up a mail server that is only serving mail for local users. The user must have an entry in the password file or in the namespace. Also, for mail to be delivered, the user should have a local home directory for checking the ~/.forward file. For this reason, home directory servers are often set up as the mail server. Hardware Components in Chapter 3, Mail Services (Reference) provides more information about the mail server.

The mail server can route mail for many mail clients. This type of mail server must have adequate spooling space for client mailboxes.

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.

For clients to access their mailboxes, the /var/mail directory should be available for remote mounting. Alternately, a service such as Post Office Protocol (POP) or Internet Message Access Protocol (IMAP) should be available from the server. The following task shows you how to set up a mail server by using the /var/mail directory. To provide configuration guidelines for POP or IMAP is beyond the scope of this document.

For the following task, ensure that the /etc/dfs/dfstab file shows that the /var/mail directory is exported.

  1. Become an administrator.

    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. Check if the /var/mail directory is available for remote access.
    # share

    If the /var/mail directory is listed, proceed to step 5.

    If the /var/mail directory is not listed or if no list appears, continue with the appropriate substep.

    1. (Optional)If no list appears, start NFS services.

      Follow the procedure, How to Set Up Automatic File System Sharing in Managing Network File Systems in Oracle Solaris 11.2 , to use the /var/mail directory to start NFS services.

    2. (Optional)If the /var/mail directory is not included in the list, add the directory to /etc/dfs/dfstab.

      Add the following command line to the /etc/dfs/dfstab file.

      share -F nfs -o rw /var/mail
  4. Make the file system available for mounting.
    # shareall
  5. Ensure that your name service has been started.
    1. (Optional) If you are running NIS, use this command.
      # ypwhich

      For more information, refer to the ypwhich (1) man page.

    2. (Optional)If you are running DNS, use this command.
      # nslookup hostname

      Use your host name.

      For more information, refer to the nslookup(1M) man page.

    3. (Optional)If you are running LDAP, use this command.
      # ldaplist

      For more information, refer to the ldaplist(1) man page.

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