Richard
We’ve got everything compiled and configured to its time to try to start everything up and to test if it is working properly. .plist scripts will also have everything start-up automatically after a reboot. Apache and MySQL have been configured already to start after a reboot now it’s time to take care of the mailserver components.
Courier Auth daemon
Create a file called ‘com.diymacserver.courierauth.plist‘ in the directory ‘/System/Library/LaunchDaemons/‘. The content of the file should look like:
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>com.diymacserver.courierauth</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/authdaemond</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
To load and activate the .plist file and to make sure that it is started after a reboot you’ll need to load the plist file by using the command:
You can see if it loaded correctly by using the command:
This will show you all the active plist files.
You can see if everything went correctly by trying to start it using:
Courier IMAP daemon
The IMAP daemon is configured the same as the authentication daemon, the difference is in the details.
Create a file called ‘com.diymacserver.courierimap.plist‘ in the directory ‘/System/Library/LaunchDaemons/‘. The content of the file should look like:
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>com.diymacserver.courierimap</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/imapd.rc</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
To load and activate the .plist file and to make sure that it is started after a reboot you’ll need to load the plist file by using the command:
You can see if it loaded correctly by using the command:
This will show you all the active plist files.
You can see if everything went correctly by trying to start it using:
Postfix
Create a file called ‘com.diymacserver.postfix.plist‘ in the directory ‘/System/Library/LaunchDaemons/‘. The content of the file should look like:
<!DOCTYPE plist PUBLIC “-//Apple Computer//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>com.diymacserver.postfix</string>
<key>Program</key>
<string>/usr/libexec/postfix/master</string>
<key>ProgramArguments</key>
<array>
<string>master</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>OnDemand</key>
<false/>
</dict>
</plist>
To load and activate the .plist file and to make sure that it is started after a reboot you’ll need to load the plist file by using the command:
You can see if it loaded correctly by using the command:
This will show you all the active plist files.
You can see if everything went correctly by trying to start it using:
If you look at the logfile ‘/var/log/mail.log‘ you could see if all programs started succesfully.
Next step: Installing Postfix admin



Comments
2:50 pm
Note that having “OnDemand” execution for postfix is possible and desirable on client machine, it is simply not configured in a way that will work out-of-the-box on Leopard (at least on non-server version of the OS). When launchd controls a daemon with OnDemand=true, it takes on the responsibility to listen on the daemon’s port. The “problem” with the plist file /System/Library/LaunchDaemons/org.postfix.master.plist shipped with Leopard is that it does not specify which port postfix is supposed to be listening on. Therefore, if you do a “telnet localhost 25″, you don’t get any answer.
In
.
http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/LaunchOnDemandDaemons.html#//apple_ref/doc/uid/TP40001762-BCIEDDBJ,
the section “Creating a Launchd Property List File” is very informative
To enable postfix OnDemand, add the lines below to the plist, reboot (to test in a real situation), do “sudo launchctl list|grep postfix” to confirm that postfix is *not* started yet (you should have a dash ‘-’ in first column), and then do “telnet localhost 25″ : you should now have an answer.
Sockets
Listeners
SockServiceName
smtp
SockType
stream
SockFamily
IPv4