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