In this step we are going to replace the use of Courier-Auth in Postfix with the Dovecot authorization module. The authorization module in Dovecot is already used for the IMAP server we installed in the first step. This would mean the last step in being able to turn of Courier-Auth.

Please make sure your users are aware of you fiddling with the mail-server. There might be some small interruption of the service you provide.

First thing we need to alter the Postfix configuration to use the Dovecot authorization module for SASL instead of Courier-Auth. It is very simple, just add the following lines to the configuration file in /etc/postfix/.

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

To activate the changes you can issue the following command:

sudo postfix reload

Now the changes are active you need to test if everything is working, you can do that by sending an email from the server by using a client that is not on the same machine as the mail-server. This will trigger the new Dovecot authorization module and it should work if step one worked and you made the correct changes. If it didn’t work remove the two lines you changed in and do another postfix configuration reload.

Now you know that Postfix is working with the Dovecot authorization module we are ready to stop Courier-Auth. First we need to unload the lauchctl plist file to make sure that Courier -Auth does not restart automatically.

sudo launchctl unload /System/Library/LaunchDaemons/com.diymacserver.courierauth.plist

Next step to actually stop Courier-Auth you need to issue the following command:

sudo /usr/local/sbin/authdaemond stop

If this has stopped, check the logfile /var/log/mail.log to see if it actually did. If it stopped then send another email using this server to test everything again.

If it does not work anymore restart Courier Auth by issuing the command:

sudo /usr/local/sbin/authdaemond start

and try to locate the problem.

If everything worked then all is fine and your server is now running using the Dovecot authorization module and no longer is dependent on Courier-Auth.

In the next step I will change another part of your mail-server, just don’t know which part yet.