Hi,
I think I found a potential bug in patched versions of qmail-remote.c,
specifically versions where the smtp() function might return on a 4xx
response.
When the first MX has a problem that causes qmail-remote to try the
second MX, the substdio buffer for smtpfd may still contain crap (stuff
after "4xx ...\r\n" sent by a broken server) from the first MX and cause
a wrong answer from smtpcode() for the second MX. smtpcode() sees
something like "crapcrap220...", which causes it to return a wrong
answer. This in turn makes the second MX unusable.
My solution is to init the substdio on each MX try, what do you think?
The patch is against the (unaffected!) unpatched qmail-1.03, but it
shows what I did.
regards,
Franz
I think I found a potential bug in patched versions of qmail-remote.c,
specifically versions where the smtp() function might return on a 4xx
response.
When the first MX has a problem that causes qmail-remote to try the
second MX, the substdio buffer for smtpfd may still contain crap (stuff
after "4xx ...\r\n" sent by a broken server) from the first MX and cause
a wrong answer from smtpcode() for the second MX. smtpcode() sees
something like "crapcrap220...", which causes it to return a wrong
answer. This in turn makes the second MX unusable.
My solution is to init the substdio on each MX try, what do you think?
The patch is against the (unaffected!) unpatched qmail-1.03, but it
shows what I did.
regards,
Franz