Read the Sendmail documentation, with emphasis on http://www.sendmail.org/m4/ldap.html Or the corresponding documentation for whatever SMTP server you prefer.
--Quanah
-- Quanah Gibson-Mount Principal Software Developer ITSS/TSS/Computing Systems ITSS/TSS/Infrastructure Operations Stanford University GnuPG Public Key: http://www.stanford.edu/~quanah/pgp.html