Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 07-05-2005, 01:45 PM   #1
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
Long delay connecting to UW imapd

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 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 is offline   Reply With Quote
Old 07-05-2005, 10:23 PM   #2
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
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
BrianF is offline   Reply With Quote
Old 07-06-2005, 02:24 AM   #3
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 349
I haven't been able to get it to work at all on 10.4.

What does your launchd plist look like?
wgscott is offline   Reply With Quote
Old 07-06-2005, 10:16 AM   #4
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
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:

Code:
<?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 is offline   Reply With Quote
Old 07-06-2005, 10:18 AM   #5
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
BTW, I don't have SSL connections working yet. Something for later...

Brian
BrianF is offline   Reply With Quote
Old 07-06-2005, 10:34 AM   #6
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
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 is offline   Reply With Quote
Old 07-06-2005, 10:58 AM   #7
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
Per a Squirrelmail FAQ, 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 is offline   Reply With Quote
Old 07-06-2005, 04:52 PM   #8
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
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
BrianF is offline   Reply With Quote
Old 07-06-2005, 06:51 PM   #9
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 349
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 is offline   Reply With Quote
Old 07-06-2005, 08:07 PM   #10
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 349
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!!
wgscott is offline   Reply With Quote
Old 07-07-2005, 10:22 AM   #11
BrianF
Prospect
 
Join Date: Jul 2005
Posts: 10
Yes, my problem was solved by using 2004d. It's very speedy, even OnDemand.

Brian
BrianF is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Site design © Mac Publishing LLC; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of Mac Publishing LLC.