Stuart Henderson wrote:

> see kern_exec.c line 600

Thanks for the nudge. I managed to get to the bottom of this. It turns out
Alpine relies on the (ironically named) -bs mode of sendmail, which is not
implemented in OpenSMTPD. Per sendmail documentation, -bs is described as:

Use the SMTP protocol as described in RFC821 on standard input and output.
This flag implies all the operations of the -ba flag that are compatible
with SMTP.

If I understand correctly, this is implementing SMTP over a pipe. 

I also think the man page of sendmail(8) is a bit misleading:

To maintain compatibility with Sendmail, Inc.'s implementation of sendmail,
various other flags are accepted, but have no effect.

Well, not really.

Unfortunately what happens is smtpctl will swallow the -bs flag and just
sit there waiting on stdin while Alpine is also waiting for an SMTP greeting
on stdout which is never sent and nothing happens. I believe that explains 
the hang; sendmail will do the exact same if you do not pass it the -bs
flag. Since OpenSMTPD does not implement this functionality, and no one
has asked for it in the > 10 years this bug has existed, I propose:

1. patch the default /etc/pine.conf in the Alpine port using the patch I
provided so Alpine prefers to connect to the local smtpd over TCP

2. I will be submitting a patch against smtpctl so passing -bs errors out
so this doesn't happen again.

Regards
Lloyd

Reply via email to