http://www.ornl.gov/lists/mailing-lists/qmail/2002/03/msg00091.html
I made this patch because my ISP switched to AUTH LOGIN on his SMTP
relay. It is very quick'n'dirty and works only for AUTH LOGIN. I just
needed that. It is based on the non-working qmail-remote AUTH patch on
www.qmail.org/top.html and the qmail-smtpd auth patch from
http://members.elysium.pl/brush/qmail-smtpd-auth/. You need base64.c and
base64.h from that patch because my implementation uses the b64encode function
provided there.
It works for me, no guarantee...