i have been trying to get this working for a while and it is not simple - here are some of the steps to get it working:

apt install sasl2-bin

service saslauthd start

saslpasswd2 -c -u <mydomain> <myusername>

sasldblistusers2

testsaslauthd -u <myusername> -p <mypassword>

grep -v '^#' /etc/default/saslauthd

START=yes

DESC="SASL Authentication Daemon"

NAME="saslauthd"

MECHANISMS="sasldb"

MECH_OPTIONS=""

THREADS=5

OPTIONS="-c -m /var/run/saslauthd"
 

lines to add to /etc/mail/sendmail.mc (for some reason sendmail did not have 'LOGIN' mech, just DIGEST-MD5 & CRAM-MD5):

TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl