View Full Version : Long delay connecting to UW imapd
BrianF
07-05-2005, 01:45 PM
I compiled UW imapd, and it works, but there is a long delay (~7 seconds) after connecting before the server responds. I'm running a fresh (not upgrade) install of 10.4.1.
I found a FAQ (http://www.washington.edu/imap/IMAP-FAQs/#7.24) that seemed promising, but I'm starting imapd via launchd, and there are no references to "USERID" in xinetd.conf. I also tried starting it via xinetd with the same results. In my imap.plist file, I tried setting the OnDemand key to false, but it didn't affect the delay.
That FAQ also references DNS problems, but I can't find any problems there. I'm running DNS on another server, and forward/reverse dns queries seem fine. I've tried connecting both locally and from another box with the same delay.
I don't see anything strange in /var/log/mail.log.
Any hints?
Thanks,
Brian
BrianF
07-05-2005, 10:23 PM
Does anyone have any suggestions for other sources of help? I can't find anything via Google. I'm a long-time PC user that recently bought a Mac, and I haven't messed with Unix for ~10 years.
This delay makes the IMAP server unusable.
Thanks,
Brian
wgscott
07-06-2005, 02:24 AM
I haven't been able to get it to work at all on 10.4.
What does your launchd plist look like?
BrianF
07-06-2005, 10:16 AM
Here's how I installed it:
1. In the uw imapd source directory, edit src/osdep/unix/env_unix.c and change mailsubdir to "Library/Mail/IMAP" (in quotes)
2. Create that path in my user directory.
3. make oxp PASSWDTYPE=pam SSLTYPE=unix
4. sudo cp imapd/impad /usr/local/libexec/imapd (make sure /usr/local/libexec exists, first)
5. sudo cp /etc/pam.d/login /etc/pam.d/imap
6. sudo cp /etc/pam.d/login /etc/pam.d/imaps (not needed for non-SSL)
7. Create plist file in /Library/LaunchDaemons
8. Reboot (I'm sure there's a better way to get it started.)
Here's my plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!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>edu.washington.imapd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/libexec/imapd</string>
</array>
<key>OnDemand</key>
<true/>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<dict>
<key>Bonjour</key>
<false/>
<key>SockServiceName</key>
<string>imap</string>
<key>SockType</key>
<string>stream</string>
</dict>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
BrianF
07-06-2005, 10:18 AM
BTW, I don't have SSL connections working yet. Something for later...
Brian
BrianF
07-06-2005, 10:34 AM
Another tidbit...
Trying to get imapd to run in "standalone" mode, I tried executing imapd in the shell. It comes up the same as connecting via telnet, AND it has the same ~7 second delay.
Does that help narrow things down?
Brian
BrianF
07-06-2005, 10:58 AM
Per a Squirrelmail FAQ (http://www.squirrelmail.org/wiki/en_US/SpeedWithUW), I disabled the DNS lookups and recompiled UW. It may have reduced the delay slightly, but not much. I think that rules out DNS lookups as a potential cause.
Brian
BrianF
07-06-2005, 04:52 PM
I tried version 2004d instead of the latest version 2004e, and my
problem disappeared. Just to be sure I didn't cause the problem, I
re-fetched 2004e and followed the exact same steps I had just used
with 2004d. The delay was back.
Given the newness of 2004e, it's no wonder I couldn't find any record
of a similar problem.
Brian
wgscott
07-06-2005, 06:51 PM
So is your problem solved?
If not, one thing to try is to set
<key>OnDemand</key>
<true/>
to
<key>OnDemand</key>
<false/>
This is what I have in my pop plist file.
wgscott
07-06-2005, 08:07 PM
Well, following your directions to the letter (apart from the typo) I got imapd working with mail.app for the first time since upgrading to 10.4. Thank you very much.
If you make the above change in the plist file, I think you will find everything works immediately.
You can use the command
sudo launchctl load imap3.plist
(or whatever you called your plist file) to start it without rebooting, BTW.
Again, thanks!!
BrianF
07-07-2005, 10:22 AM
Yes, my problem was solved by using 2004d. It's very speedy, even OnDemand.
Brian
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.