<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Monaco; font-size: 12px; ">Hello,<br><br>I have managed to get cyrus-imapd working on Mac OS X 10.5.2 (client) &nbsp;<br>but when I go through Mail.app's account setup assistant, after &nbsp;<br>filling out the fields for the IMAP server, the message “Checking &nbsp;<br>connection to mail server localhost” takes one minute to go away.<br><br>Can somebody point out to me what I'm doing wrong here?<br><br><br><br>Here's what gets logged to imapd.log:<br>Mar 10 10:57:11 imap-test-server imap[326]: accepted connection<br>Mar 10 10:57:11 imap-test-server imap[329]: accepted connection<br>Mar 10 10:58:11 imap-test-server imap[326]: accepted connection<br>Mar 10 10:58:11 imap-test-server imap[326]: login: localhost [::1] &nbsp;<br>test CRAM-MD5 User logged in<br>Mar 10 22:59:16 imap-test-server master[26]: process 329 exited, &nbsp;<br>status 0<br>Mar 10 22:59:28 imap-test-server master[26]: process 326 exited, &nbsp;<br>status 0<br><br><br><br>And here's what gets logged to auth.log:<br>Mar 10 22:58:11 imap-test-server imap[326]: no user in db<br>Mar 10 22:58:11 imap-test-server imap[326]: no user in db<br>Mar 10 22:58:41: --- last message repeated 1 time ---<br><br><br><br>Here's an account on what I did to get cyrus-imapd running:<br><br>- Install Mac OS X 10.5.1 from DVD<br>- Upgrade to Mac OS X 10.5.2 using combo package<br>- Install all available updates via Apple's Software Update<br>- Install Xcode 3.0 (not iPhone SDK version)<br><br>- Install MacPorts 1.6.0 using Installer.app<br>- Create missing .profile file in home directory<br>### BEGIN FILE .profile<br>export PATH=/opt/local/bin:/opt/local/sbin:$PATH<br>export MANPATH=/opt/local/share/man:$MANPATH<br>### END FILE .profile<br><br>- Install cyrus-imapd<br>$ port install cyrus-imapd<br><br>- Delete cyrus user created by MacPorts installation<br>$ dscl . -delete /Users/cyrus<br><br>- Add cyrus as RecordName to user _cyrus<br>$ dscl . -append /Users/_cyrus RecordName cyrus<br>- Change the home directory for the cyrus user<br>$ dscl . -change /Users/_cyrus NFSHomeDirectory /var/imap /opt/local/&nbsp;<br>var/imap<br><br>- Create cyrus user using saslpasswd2<br>$ saslpasswd2 -c cyrus<br><br>- Change owner of sasldb2.db to _cyrus and group to mail<br>$ chown _cyrus:mail /opt/local/etc/sasldb2.db<br><br>- Change owner of pwcheck to _cyrus and group to mail<br>- chown _cyrus:mail /opt/local/var/pwcheck<br>- chmod 750 /opt/local/var/pwcheck<br><br>- Add 'local6.debug<span class="Apple-tab-span" style="white-space: pre; ">        </span>/var/log/imapd.log' to /etc/syslog.conf<br>- Add 'auth.debug<span class="Apple-tab-span" style="white-space: pre; ">        </span>/var/log/auth.log' to /etc/syslog.conf<br>$ pico /etc/syslog.conf<br><br>- Create impad.log and auth.log<br>$ touch /var/log/imapd.log /var/log/auth.log<br><br>- Restart syslogd process<br>$ kill -hup `cat /var/run/syslog.pid`<br><br><br><br>- Create file at /opt/local/etc/cyrus/imapd.conf<br>$ pico /opt/local/etc/cyrus/imapd.conf<br>### BEGIN FILE imapd.conf<br>admins: cyrusimap cyrus _cyrus LOCAL_MACOSX_ADMIN_USER<br>configdirectory: /opt/local/var/imap<br>partition-default: /opt/local/var/spool/imap<br>unixhierarchysep: yes<br>altnamespace: yes<br>lmtp_downcase_rcpt: 1<br>sendmail: /usr/sbin/sendmail<br>sasl_pwcheck_method: auxprop<br>### END FILE imapd.conf<br><br><br><br>- Create file at /opt/local/etc/cyrus/imapd.conf<br>$ pico /opt/local/etc/cyrus/cyrus.conf<br>### BEGIN FILE cyrus.conf<br># standard standalone server implementation<br><br>START {<br><br>&nbsp;&nbsp;# do not delete this entry!<br>&nbsp;&nbsp;recover &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="ctl_cyrusdb -r"<br>&nbsp;&nbsp;# this is only necessary if using idled for IMAP IDLE<br>&nbsp;&nbsp;idled &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="idled"<br>}<br><br># UNIX sockets start with a slash and are put into /var/imap/socket<br>SERVICES {<br><br>&nbsp;&nbsp;# add or remove based on preferences<br>&nbsp;&nbsp;imap &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="imapd" listen="imap" prefork=0<br># &nbsp;imaps &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="imapd -s" listen="imaps" prefork=0<br># &nbsp;pop3 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="pop3d" listen="pop3" prefork=0<br># &nbsp;pop3s &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="pop3d -s" listen="pop3s" prefork=0<br># &nbsp;sieve &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="timsieved" listen="sieve" prefork=0<br>&nbsp;&nbsp;# at least one LMTP is required for delivery<br># &nbsp;lmtp &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="lmtpd" listen="lmtp" prefork=0<br>&nbsp;&nbsp;lmtpunix &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="lmtpd" listen="/opt/local/var/imap/socket/lmtp" &nbsp;<br>prefork=0<br>&nbsp;&nbsp;# this is only necessary if using notifications<br># &nbsp;notify &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="notifyd" listen="/opt/local/var/imap/socket/&nbsp;<br>notify" proto="udp" prefork=1<br>}<br><br>EVENTS {<br>&nbsp;&nbsp;# this is required<br>&nbsp;&nbsp;checkpoint &nbsp;&nbsp;&nbsp;cmd="ctl_cyrusdb -c" period=30<br><br>&nbsp;&nbsp;# this is only necessary if using duplicate delivery suppression<br>&nbsp;&nbsp;delprune &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="cyr_expire -E 3" at=0400<br><br>&nbsp;&nbsp;# this is only necessary if caching TLS sessions<br>&nbsp;&nbsp;tlsprune &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cmd="tls_prune" at=0400<br>}<br><br>LIMITS {<br>&nbsp;&nbsp;imaplimit &nbsp;&nbsp;&nbsp;&nbsp;value=0<br>}<br>### END FILE cyrus.conf<br><br><br><br><br>- Change the owner of the two imap directories<br>$ chown -R _cyrus:mail /opt/local/var/imap/<br>$ chown -R _cyrus:mail /opt/local/var/spool/imap/<br><br>- Create imap directories<br>$ sudo -u _cyrus /opt/local/bin/mkimap<br><br>- Specify correct path to deliver executable in master.cf<br>$ pico /private/etc/postfix/master.cf<br>-----&gt; The path should be: /opt/local/bin/deliver<br><br>- Create aliases file for postfix and start it<br>$ newaliases<br>$ postmap /private/etc/postfix/virtual<br>$ postfix start<br><br><br><br>- Create LaunchDaemon for cyrus<br>$ pico /System/Library/LaunchDaemons/edu.cmu.andrew.cyrus.master.plist<br>### BEGIN FILE edu.cmu.andrew.cyrus.master.plist<br>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>&nbsp;<br>"&gt;<br>&lt;plist version="1.0"&gt;<br>&lt;dict&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;Label&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;edu.cmu.andrew.cyrus.master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;OnDemand&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;false/&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;Program&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;/opt/local/bin/master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;ProgramArguments&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;array&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;-l&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;256&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;/array&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;ServiceIPC&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;false/&gt;<br>&lt;/dict&gt;<br>&lt;/plist&gt;<br>### END FILE edu.cmu.andrew.cyrus.master.plist<br><br>- Load LaunchDaemon configuration<br>$ launchctl load -w /System/Library/LaunchDaemons/&nbsp;<br>edu.cmu.andrew.cyrus.master.plist<br><br><br><br><br>- Create LaunchDaemon for postfix<br>$ pico /System/Library/LaunchDaemons/org.postfix.master.plist<br>### BEGIN FILE org.postfix.master.plist<br>&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>&nbsp;<br>"&gt;<br>&lt;plist version="1.0"&gt;<br>&lt;dict&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;Label&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;org.postfix.master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;Program&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;/usr/libexec/postfix/master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;ProgramArguments&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;array&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;master&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;-e&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;60&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;/array&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;key&gt;QueueDirectories&lt;/key&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;array&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;string&gt;/var/spool/postfix/maildrop&lt;/string&gt;<br><span class="Apple-tab-span" style="white-space: pre; ">        </span>&lt;/array&gt;<br>&lt;/dict&gt;<br>&lt;/plist&gt;<br>### END FILE org.postfix.master.plist<br><br>- Load LaunchDaemon configuration (might be already loaded)<br>$ launchctl load -w /System/Library/LaunchDaemons/org.postfix.master.plist</span></body></html>