Hi all,
I�m having a problem while sending e-mail to a domain... the qmail-remote start to eat cpu. Seems that it was caught on a loop.
I did a strace of it:
[...]
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR)
fcntl64(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0
connect(3, {sin_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("216.93.174.4")}}, 16) = -1 EINPROGRESS (Operation now in progress)
select(4, NULL, [3], NULL, {60, 0}) = 1 (out [3], left {59, 800000})
getpeername(3, {sin_family=AF_INET, sin_port=htons(25), sin_addr=inet_addr("216.93.174.4")}}, [16]) = 0
fcntl64(3, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl64(3, F_SETFL, O_RDWR) = 0
select(4, [3], NULL, NULL, {1200, 0}) = 1 (in [3], left {1199, 210000})
read(3, "220 host2.savantnoc.com ESMTP\r\n", 128) = 31
select(4, NULL, [3], NULL, {1200, 0}) = 1 (out [3], left {1200, 0})
write(3, "EHLO ufpr.br\r\n", 14) = 14
select(4, [3], NULL, NULL, {1200, 0}) = 1 (in [3], left {1199, 800000})
read(3, "250-host2.savantnoc.com\r\n250-AUT"..., 128) = 105
This host reply with multiple "250 lines", and it seems that this qmail-remote get stuck while trying to parse this lines.
does anyone has any clue about this? ah.. of course... netqmail-1.05 patch + mysql + toaster-patch. I tried to send the qmail-remote.c code but the list refused to send my e-mail...
Try this patch to qmail-remote.c:
--- qmail-remote.c.orig Thu Apr 8 08:49:14 2004
+++ qmail-remote.c Thu Apr 8 08:50:09 2004
@@ -229,7 +229,7 @@
if (*p == '\n' || *p == ' ' || *p == '\t') {
if (!stralloc_catb(sa, s, p - s) || !stralloc_0(sa)) temp_nomem();
if (*p++ == '\n') break;
- while (*p == ' ' || *p == '\t') ;
+ while (*p == ' ' || *p == '\t') p++;
s = p;
}
s = p;Regards,
Bill Shupp
