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.
Note: This document describes versions 10.1.3 and 10.1.4. The procedure is different for versions 10.2 and later.

About SMTP AUTH

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.

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
open_relay_addr_list: 17.221.41.168

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