Koozali.org: home of the SME Server

20s delay for IMAP access

Ian Wells

20s delay for IMAP access
« on: March 09, 2002, 10:23:02 PM »
I noticed today that there is a 20s delay in accessing my email via IMAP. It appears to be an authentication issue. It only happens when I start the windows client (either OE or Netscape)

(log from OE)
IMAP: 15:23:13 [tx] LOGIN command sent
IMAP: 15:23:33 [db] OnNotify: asOld = 5, asNew = 5, ae = 3
IMAP: 15:23:33 [rx] 002N OK LOGIN completed

(log from maillog)
Mar  9 15:24:15 gatekeeper imapd[4009]: imap service init from xxx
Mar  9 15:24:35 gatekeeper imapd[4009]: Authenticated user=yyy host=[xxx]

From searching the net I guess it is to do with ident.

The question is, what can I do to speed this up?

It may have something to do with me moving to a new machine (clean install then restore from desktop) as I don't remember this delay earlier.

Anthony

Re: 20s delay for IMAP access
« Reply #1 on: March 10, 2002, 12:46:16 PM »
I have the same problem.
I also spotted that when I tried to logon as root I got a 20 second delay
between entering the userid and being prompted for the password.
The logs for that showed:

Mar 10 20:26:05 SMEServer sshd[19663]: Could not reverse map address 10.1.1.100

This is strange since I have a local hostname setup for this address so it always gets the same IP address based on mac addr.
I looked at /etc/hosts but it didn't show anything but the server,
so I just added an entry for my client PC to see if it would work and it fixed
the delays.  

An nslookup shows no lookups work for any of my local PCs that all have set IPs based on IP addr.
This problem started after I upgraded to 5.12 I think.  
I will investigate further.

Damien Curtain

Re: 20s delay for IMAP access
« Reply #2 on: March 10, 2002, 01:26:06 PM »
> Mar 10 20:26:05 SMEServer sshd[19663]: Could not reverse map
> address 10.1.1.100

It may be as for others your /etc/resolv.conf is being overwritten, it should be similar to

bash-2.04$ cat /etc/resolv.conf | grep -v ^#
domain something.suffix
nameserver 127.0.0.1

If it is not then your trying to resolve your addresses with your isp's name service directly which will never work.

If that is ok on your server you might try nslookup 10.1.1.100 127.0.0.1

If it times out you may have a corrupted zone file.
--
 Damien

Anthony

Re: 20s delay for IMAP access
« Reply #3 on: March 11, 2002, 09:50:20 AM »
The fix is to stop resolv.conf being overwritten by dhcpd.

Searched the forum and found this:

# drop the external link - note therefore that you can perform the
# fix remotely using this procedure
/sbin/ifdown eth1
# Replace /etc/resolv.conf with the correct contents
/sbin/e-smith/expand-template /etc/resolv.conf
# Patch the ifup script to use the correct arguments to dhcpcd
/usr/bin/perl -i.old -pe \
's/DHCPCDARGS="-d/DHCPCDARGS="-R -d/' \
/sbin/ifup
# Now bring the external interface back up
/sbin/ifup eth1

Ian Wells

Re: 20s delay for IMAP access
« Reply #4 on: March 12, 2002, 01:41:46 AM »
Thank You, my IMAP email is now instantaneous.

I would never have worked out that solution by myself.

Ian