Timo Sirainen schrieb:
On Fri, 2010-02-26 at 17:32 +0100, Oliver Eales wrote:
Hello, i am trying to proxy a LMTP connection with version 2.0b3 Currently i have the problem when trying to use a named based proxy for LMTP the process doesn't resolve the hostname and crashes:
Fixed crash and added DNS support:
http://hg.dovecot.org/dovecot-2.0/rev/bd28e6f29711 http://hg.dovecot.org/dovecot-2.0/rev/cc3f6adc1e0b
Thank you Timo, it is working now. But unfortunately i ran into a second problem which was already existent before the DNS fix. When the LMTP client sends the terminating dot to the LMTP proxy, the proxy stalls for about 30sec at an epoll_wait() syscall. It reads the "250 2.0.0 xxxxx" response from the backend server and then waits. When the epoll_wait timeout is reached, the proxy sends the "250 2.0.0 xxxxx" backend response to the client and the communication goes on normally. (QUIT from the client or new MAIL..) Attached is a strace excerpt of the LMTP proxy.
read(11, "sdf\r\n", 4017) = 5 write(15, "sdf", 3) = 3 read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(10, {{EPOLLIN, {u32=6396992, u64=6396992}}}, 8, 60000) = 1 read(11, ".\r\n", 4012) = 3 write(15, "\r\n", 2) = 2 write(15, ".\r\n", 3) = 3 epoll_ctl(10, EPOLL_CTL_DEL, 11, {0, {u32=6396992, u64=6396992}}) = 0 epoll_wait(10, {{EPOLLIN, {u32=6506320, u64=6506320}}}, 8, 30000) = 1 read(15, "250 2.0.0 <vodafonemail56@vodafo"..., 860) = 69 read(15, 0x634859, 791) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(10,{}, 8, 29992) = 0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here it hangs for 29992 msec.
epoll_wait(10, {}, 8, 2) = 0 epoll_ctl(10, EPOLL_CTL_DEL, 15, {0, {u32=6506320, u64=6506320}}) = 0 close(15) = 0 setsockopt(11, SOL_TCP, TCP_CORK, [1], 4) = 0 write(11, "250 2.0.0 <vodafonemail56@vodafo"..., 69) = 69 setsockopt(11, SOL_TCP, TCP_CORK, [0], 4) = 0 epoll_ctl(10, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=6396992, u64=6396992}}) = 0 brk(0x657000) = 0x657000
Thank you and regards, Oliver Eales