Mailing List Archive

qmail-smtpd hanging and eventually timing out from a specific sender
Greetings,

We're trying to track down the source of a problem with qmail-smtpd
hanging, seemingly in the middle of a message being sent, when a
qmail-backed email address is entered in the form located here:
https://ditcportal.secure.ky/recaptcha/entityRegistration

I was hoping someone on here could do their own test to see if the hanging
and ultimate non-delivery is reproducible for you with an address on your
qmail-based system or not - and if anyone had any ideas on what the cause
and/or solution might be.

We've confirmed that the same website has no issue delivering to gmail
address for example, and we've reproduced the behavior on multiple networks
and systems.

The behavior is very reproducible, so far I've tracked down the hanging to
the substdio_get() call in the 'blast' function in qmail-smtpd.c. I'm
having trouble figuring out *why* it's hanging though. From what I can
tell, the initial SMTP handshake goes fine, the first 1024 bytes of the
message DATA come through, then another 408 bytes are read from the remote
server - and then it hangs.

Any ideas/insights/comments welcome!

Best,

Paul
Re: qmail-smtpd hanging and eventually timing out from a specific sender [ In reply to ]
Paul,

I've tested it (but with assp as frontend, so the headers could be
rectified.

However with s/qmail it came trough.
https://www.fehcom.de/sqmail/sqmail.html

You didn't tell us with version of qmail you are using and with which
patches.
My advise is switch to s/qmail and then your OK for the rest of the
world again. All modern techniques, which you had to make patches for in
qmail, are included (TLS,IPv6)


Best regards,
Pascal


Op 20/11/2020 om 03:23 schreef Paul Oehler:
> Greetings, 
>
> We're trying to track down the source of a problem with qmail-smtpd
> hanging, seemingly in the middle of a message being sent, when a
> qmail-backed email address is entered in the form located
> here: https://ditcportal.secure.ky/recaptcha/entityRegistration
>
> I was hoping someone on here could do their own test to see if the
> hanging and ultimate non-delivery is reproducible for you with an
> address on your qmail-based system or not - and if anyone had any ideas
> on what the cause and/or solution might be.
>
> We've confirmed that the same website has no issue delivering to gmail
> address for example, and we've reproduced the behavior on multiple
> networks and systems.
>
> The behavior is very reproducible, so far I've tracked down the hanging
> to the substdio_get() call in the 'blast' function in qmail-smtpd.c. 
> I'm having trouble figuring out *why* it's hanging though.  From what
> I can tell, the initial SMTP handshake goes fine, the first 1024 bytes
> of the message DATA come through, then another 408 bytes are read from
> the remote server - and then it hangs.
>
> Any ideas/insights/comments welcome!
>
> Best, 
>
> Paul
Re: qmail-smtpd hanging and eventually timing out from a specific sender [ In reply to ]
Paul Oehler <poehler@interworx.com> wrote:
>
> We're trying to track down the source of a problem with qmail-smtpd
> hanging, seemingly in the middle of a message being sent, when a
> qmail-backed email address is entered in the form located here:
> https://ditcportal.secure.ky/recaptcha/entityRegistration
>
> I was hoping someone on here could do their own test to see if the hanging
> and ultimate non-delivery is reproducible for you with an address on your
> qmail-based system or not

I filled out the form and captcha and submitted it. I saw an entry in the
qmail-smtpd logs from their mail server, I think (mail.ditc.ky), but no
message was delivered.

However, I never saw a hanging qmail-smtpd process. It looks like they either
didn't actually try to deliver a message, or committed an SMTP error egregious
enough to cause my system to reject the message.

So your cause might be different; I'm running a fairly vanilla qmail. To
figure out what's going wrong you can probably use recordio, a packet capture,
or some other method to capture the entire SMTP conversation.

Charles
--
--------------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at: http://pyropus.ca/software/
Read http://pyropus.ca/personal/writings/12-steps-to-qmail-list-bliss.html
--------------------------------------------------------------------------
Re: qmail-smtpd hanging and eventually timing out from a specific sender [ In reply to ]
On 2020-11-20 03:23, Paul Oehler wrote:
> Greetings,
>
> The behavior is very reproducible, so far I've tracked down the hanging
> to
> the substdio_get() call in the 'blast' function in qmail-smtpd.c. I'm
> having trouble figuring out *why* it's hanging though. From what I can
> tell, the initial SMTP handshake goes fine, the first 1024 bytes of the
> message DATA come through, then another 408 bytes are read from the
> remote
> server - and then it hangs.
>
> Any ideas/insights/comments welcome!

Which compiler and exact version did you use to build qmail?

>
> Best,
>
> Paul
Re: qmail-smtpd hanging and eventually timing out from a specific sender [ In reply to ]
On 11/19/2020 9:23 PM, Paul Oehler wrote:
> We're trying to track down the source of a problem with qmail-smtpd
> hanging, seemingly in the middle of a message being sent, when a
> qmail-backed email address is entered in the form located here:
> https://ditcportal.secure.ky/recaptcha/entityRegistration

fwiw I'm using my qmail-1.03.isp.patch-

i never see anything in the log file, but using tcpdump i see the
session sets up helo/mail from/rcpt to/data, but then it appears the
sender never finishes data. it sits at:

> X-Mailer: DITC (http://ditcportal.secure.ky)
> X-Exim-Id: 543157953.10667.1605842328422
>
> ------=_Part_10665_723730486.1605842328422
> Content-Type: multipart/alternative;
> boundary="----=_Part_10666_1688063487.1605842328422"
>
> ------=_Part_10666_1688063487.1605842328422
> Content-Type: text/plain; charset=us-ascii

but then never finishes data -- the smtpd eventually replies 451 timeout.

i get more like 3100 bytes in data though.

hmm.

--

Jeremy Kister
https://jeremy.kister.net./