That should be it for getting it to work. You should configure your IMAP client to connect to 127.0.0.1 on whatever port you specified above.

That’s not the whole story, however. Mac OS X does not use init scripts but uses a much cooler launching mechanism called launchd. Launchd takes care of launching, maintaining, and closing daemons, meaning it eliminates a lot of hassle for the daemon programmer.

I’ve created a launchd plist that can be used with launchd to start imapproxy the right way in Mac OS X. If you use this, you do not have to use #5 or #8 above. Also, you must set foreground_mode to yes. Copy the plist to /Library/LaunchDaemons and use sudo launchctl [load|unload] /Library/LaunchDaemons/imapproxy.plist to start and stop the proxy. The proxy will also start whenever the machine is started (to change this, move the plist out of that directory).

There is more Apple information on launchd plists, launchctl, and writing daemons that use launchd.