Mac OS X Server 10.1: How to Set up SMTP Authentication

Mac OS X Server 10.1.3 or later offers an SMTP Authentication feature for the Apple Mail Server. Follow the steps in this document to set it up.
This article has been archived and is no longer updated by Apple.
Note: This document describes versions 10.1.3 and 10.1.4. The procedure is different for versions 10.2 and later.


Important: Before proceeding, you should read technical document 106761: "Mac OS X Server: About SMTP Authentication for Apple Mail Server"

Steps to set up SMTP AUTH

The following procedure explains how to enable and configure SMTP Authentication, known as "SMTP AUTH," for Apple Mail Server by using the NetInfo Manager application.

Important: This document assumes a basic understanding of NetInfo Manager. If you are familiar with the Terminal, the niutil and kill commands, and process IDs, you may use those instead. See the "Advanced Administrators Only" section below.
    1. If you have not already, update to version 10.1.4 and restart the server. See technical document 106704, "Mac OS X: How to Update Your Software".
    2. Open the Server Admin application.
    3. Be sure that MailServer is running.
    4. Open NetInfo Manager (/Applications/Utilities/).
    5. Navigate to the "config" directory in the local domain, located in the second column after "/".
    6. Select the AppleMailServer directory in the next column. What you see should resemble Figure 1.

    Figure 1 NetInfo Manager

    7. Edit the "smtp_plain_login _flag" property by entering the value of "1". This enables SMTP AUTH. The table in Figure 2 summarizes the attributes of the Apple Mail Server for the SMTP AUTH feature.

    Figure 2 Attributes of Apple Mail Server

    8. Save the new settings and quit NetInfo Manager.
    9. Stop and restart Apple Mail Server using Server Admin.

This completes the steps to configure the SMTP AUTH feature. If you need to change the setting, you can repeat this procedure

Client Settings

Email client applications work with SMTP authentication and are configured on a per user, per account basis. Figure 3 gives an example from the application Mail.

Figure 3 Setting up SMTP authentication in Mail

Advanced Administrators Only

You may configure SMTP AUTH in Apple Mail Server using the Terminal.

When the 10.1.3 Apple Mail Server starts up, it creates attributes in local NetInfo that control the behavior of the SMTP AUTH feature. You can edit these values with the niutil command. To view default settings, execute this command as root:

niutil -read . /config/AppleMailServer

The resulting output:

name: AppleMailServer
smtp_plain_login_flag: 0
open_relay_addr_flag: 0

The IP address is the address of the server on which Apple Mail Server is running. You can enable the SMTP AUTH feature with the following command:

niutil -createprop . /config/AppleMailServer smtp_plain_login_flag 1

These NetInfo settings take effect when a HUP signal is received by the MailService process. To send the HUP signal:

kill -HUP `ps auxc | grep MailService | awk '{print $2}'`

Additional information

You can get more information from technical documents:

106762: "Mac OS X Server 10.1: How to Set up Restricted SMTP Relay for Apple Mail Server"
106763: "Mac OS X Server: Restricted SMTP Relay Helps Prevent Unsolicited Email"
Published Date: Oct 10, 2016

Additional Product Support Information