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 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 Thank you and regards,
Oliver Eales