VPS and Authenticated Sendmail

I had a requirement to create a sendmail server that can authenticate a user and send mail from a remote location.  First off, I needed to figure out where to host this solution.  By choosing an inexpensive hosted linux VPS, I can scale my virtual server and have some more flexibility over the configuration.  Also by having a dedicated VPS I will not have to worry about impacting other app and software configurations as I work.

Conveniently, or so I thought, the VPS had sendmail pre-installed.  Quickly reading up some "How Tos" online and some of the sendmail documentation, I made changes to my sendmail.mc file and restarted.  However when I connected and attempted to relay, I received a "Relaying Denied" error.  When testing manually using telnet, I noticed the "250-AUTH LOGIN PLAIN" line was missing after issuing the EHLO command.

Increasing my sendmail log level and testing more, I noticed this in the sendmail logs:
AUTH warning: no mechanisms

Ok, so why is this the case?  Reading around I stumbled across some references about libraries, paths, etc.  I thought I was OK with all that, but then looked in detail about some of the libraries and noticed I seemed to only have libanonymous.so.2.0.22, libanonymous.so.2.0.22, libsasldb.so.2.0.22 and libanonymous.la in my /usr/lib/sasl2 folder.  My VPS did appear to have cyrus-sasl, cyrus-sasl-devel, and cyrus-sasl-lib installed.

Not really finding a good answer, I just downloaded cyrus-sasl source and ran a configure/make check/make install to reinstall it.  I noticed a bunch more libraries appearing in /usr/local/lib/sasl2 like: libdigestmd5.so.2.0.22, liblogin.so.2.0.22, and libcrammd5.so.2.0.22 .

Restarting everything and trying again still did not solve my issue.  Digging through the logs again I found this new message:
AUTH: available mech=DIGEST-MD5 CRAM-MD5 PLAIN, allowed mech=EXTERNAL LOGIN PLAIN

So the "LOGIN" method is not available.  First off, you need to make sure your mechanisms in the /etc/mail/sendmail.mc (allowed) are in line with those listed in /usr/lib/sasl2/Sendmail.conf (available) files.  I got lucky and was looking at another flavor of linux server and checking out another issue and noticed this comment in the /etc/mail/access file:
# If you want to use AuthInfo with "M:PLAIN LOGIN", make sure to have the cyrus-sasl-plain package installed.

Can it be that easy?  yum install cyrus-sasl-plain ?  Yes, it was.  Restarted all the services and voila.  I had something working!  Now, ideally you want to not allow such a plain login, but within a private network or in special circumstances the risks are small enough.