qmail-1.03-r10 has SMTP AUTH patch included by default. However, when attempting to use SMTP AUTH feature (by adding three extra parameters to command line of qmail-smtpd), I was faced with repeated failure. After some investigation, I found that qmail-smtpd doesn't even start my checkpassword utility. After even more investigation, I found that the culprit is smtp-auth-close3.patch. It is designed to handle situation, where "morercpthosts.cdb" exists. I didn't dig too deeply, but I guess that this file is constantly open on file describtor 3. However, when no morercpthosts exists, and no other weired stuff is going on, fr 3 happens to be of descriptors open by pipe(). closing it, and then trying to dup2 doesn't make qmail very happy, of course. propper fix would be to test if pi[0]!=3, and only then to close 3 and use dup2. As temporary work-around, I created morercpthosts.
I tried this solution, but it didn't fix everything for me.. It would fix it for the server that qmail was living on (a webbased email), but didn't fix it for external clients... I figured out taht I needed to SUID on /bin/checkpassword.. chmod 4755 /bin/checkpassword Probably not the safest thing in world, but it worked for me.
Ilya: thanks, you had it right on. I redid the smtp-auth-close3.patch based on your description here, and it works now. The new patch is applied on the new -r12 of qmail. To easily enable SMTP AUTH now, look in control/conf-smtpd and uncomment the block for it there.