Best way to know where the problem resides?
Just run Wireshark to capture everything when doing `telnet <ip> 25'.
EDIT: I just saw your answer. You probably want to run "tshark -i eth0" as root if you have a linux box, or capture any traffic on the Internet interface with Wireshark on Windows. I'm talking about the PC that resides behind the mentioned ISP, not the server.
The important thing is where the delay resides: between the initial DNS request-reply? Between the SYN-SYNACK of the SMTP connection? Between some indefinite ACK-ACK during the SMTP connection?
I can show you an example if you want.
OK... I found part of the source problem, but still not clear about the solution:
bess.domain.com:/root # tshark |grep 89.138.34.192
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
4.019499 89.138.34.192 -> 1.2.3.4 TCP 55957 > smtp [SYN] Seq=0 Win=8192 Len=0 MSS=1200
4.019537 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460
4.050479 89.138.34.192 -> 1.2.3.4 TCP 55957 > smtp [ACK] Seq=1 Ack=1 Win=64800 Len=0
4.057222 192.115.106.31 -> 1.2.3.4 DNS Standard query response PTR 89-138-34-192.bb.netvision.net.il
4.058226 1.2.3.4 -> 192.115.106.31 DNS Standard query A 89-138-34-192.bb.netvision.net.il
9.058625 1.2.3.4 -> 62.219.186.7 DNS Standard query A 89-138-34-192.bb.netvision.net.il
12.058937 1.2.3.4 -> 192.115.106.35 DNS Standard query A 89-138-34-192.bb.netvision.net.il
18.058864 1.2.3.4 -> 192.115.106.31 DNS Standard query A 89-138-34-192.bb.netvision.net.il
23.059347 1.2.3.4 -> 62.219.186.7 DNS Standard query A 89-138-34-192.bb.netvision.net.il
26.060263 1.2.3.4 -> 192.115.106.35 DNS Standard query A 89-138-34-192.bb.netvision.net.il
32.059708 1.2.3.4 -> 192.115.106.31 DNS Standard query A 89-138-34-192.bb.netvision.net.il
37.060160 1.2.3.4 -> 62.219.186.7 DNS Standard query A 89-138-34-192.bb.netvision.net.il
40.060485 1.2.3.4 -> 192.115.106.35 DNS Standard query A 89-138-34-192.bb.netvision.net.il
40.060575 1.2.3.4 -> 192.115.106.31 DNS Standard query A 89-138-34-192.bb.netvision.net.il
45.061335 1.2.3.4 -> 62.219.186.7 DNS Standard query A 89-138-34-192.bb.netvision.net.il
48.061995 1.2.3.4 -> 192.115.106.35 DNS Standard query A 89-138-34-192.bb.netvision.net.il
54.062263 1.2.3.4 -> 89.138.34.192 SMTP Response: 220 bess.domain.com ESMTP Exim 4.69 Mon, 01 Dec 2008 17:17:29 +0200
54.289276 89.138.34.192 -> 1.2.3.4 TCP 55957 > smtp [ACK] Seq=1 Ack=68 Win=64733 Len=0
90.805307 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
90.805371 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=2 Win=5840 Len=0
90.973929 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
90.973967 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=3 Win=5840 Len=0
91.202509 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
91.202550 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=4 Win=5840 Len=0
91.389120 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
91.389162 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=5 Win=5840 Len=0
91.483550 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
91.483590 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=6 Win=5840 Len=0
91.676656 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
91.676688 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=7 Win=5840 Len=0
91.813310 89.138.34.192 -> 1.2.3.4 SMTP Command: helo a
91.813403 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=68 Ack=9 Win=5840 Len=0
91.813514 1.2.3.4 -> 89.138.34.192 SMTP Response: 250 bess.domain.com Hello a [89.138.34.192]
92.027144 89.138.34.192 -> 1.2.3.4 TCP 55957 > smtp [ACK] Seq=9 Ack=111 Win=64690 Len=0
95.368403 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
95.408766 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=10 Win=5840 Len=0
95.492562 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
95.492589 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=11 Win=5840 Len=0
95.636954 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
95.636995 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=12 Win=5840 Len=0
95.804079 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
95.804120 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=13 Win=5840 Len=0
96.020417 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
96.020458 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=14 Win=5840 Len=0
96.571757 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
96.571798 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=15 Win=5840 Len=0
96.766414 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
96.766525 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=16 Win=5840 Len=0
96.910505 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
96.910555 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=17 Win=5840 Len=0
97.038409 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
97.038445 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=18 Win=5840 Len=0
97.224520 89.138.34.192 -> 1.2.3.4 SMTP Command: mail from
97.224565 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=111 Ack=20 Win=5840 Len=0
97.224659 1.2.3.4 -> 89.138.34.192 SMTP Response: 500 unrecognized command
97.434364 89.138.34.192 -> 1.2.3.4 TCP 55957 > smtp [ACK] Seq=20 Ack=137 Win=64664 Len=0
175.925601 89.138.34.192 -> 1.2.3.4 TCP [TCP segment of a reassembled PDU]
175.964953 1.2.3.4 -> 89.138.34.192 TCP smtp > 55957 [ACK] Seq=137 Ack=21 Win=5840 Len=0
75396 packets captured
bess.domain.com:/root # tshark |grep 194.90.1.33
Running as user "root" and group "root". This could be dangerous.
Capturing on eth0
23.101008 194.90.1.33 -> 1.2.3.4 TCP 58633 > smtp [SYN] Seq=0 Win=5840 Len=0 MSS=1460 TSV=1182910893 TSER=0 WS=6
23.101092 1.2.3.4 -> 194.90.1.33 TCP smtp > 58633 [SYN, ACK] Seq=0 Ack=1 Win=5840 Len=0 MSS=1460
23.103752 194.90.1.33 -> 1.2.3.4 TCP 58633 > smtp [ACK] Seq=1 Ack=1 Win=5840 Len=0
23.117993 192.115.106.31 -> 1.2.3.4 DNS Standard query response A 194.90.1.33
23.119581 1.2.3.4 -> 194.90.1.33 SMTP Response: 220 bess.domain.com ESMTP Exim 4.69 Mon, 01 Dec 2008 17:20:17 +0200
23.122238 194.90.1.33 -> 1.2.3.4 TCP 58633 > smtp [ACK] Seq=1 Ack=68 Win=5840 Len=0
15103 packets captured
You may notice that there is a lot reverse DNS resolving, and then it gives up and pass through.
Now,. on dynamic IPs there should be no 'true' Reverse DNS entries. But still it has some kind of a resolving.
If I disable in exim.conf:
# DO HOST LOOKUP
# OPTIONAL MODIFICATIONS:
# The setting below causes Exim to do a reverse DNS lookup on all incoming
# IP calls, in order to get the true host name. If you feel this is too
# expensive, you can specify the networks for which a lookup is done, or
# remove the setting entirely.
# host_lookup = *
Then, we can telnet immediatly,. but when attempting to send via Outlook Express,. we experience the same old behavior.
So I'm still stuck!
-Alon.