Sendmail can be used as a secure SMTP server for Microsoft outlook clients. Even for clients who roam (use locations other than their home location). Finding documentation on how to do this proved to be a challange, so I wrote this page documenting how I did it.
Download the latest version of sendmail from www.sendmail.org. I used version 8.10.0 but newer versions may work.
Download the latest version of Cyrus SASL from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail. I used version 1.5.15 but newer versions may work.
Unpack these distributions somewhere. I used /usr/src as my base. Sendmail wound up in /usr/src/sendmail-8.10.0 and SASL wound up in /usr/src/cyrus-sasl-1.5.15. This info may be useful when I give paths in my examples.
Configure SASL with
./configure --enable-logineven though the docs advise against it. This enabled plain text authentication such as is used by microsoft outlook.
Build SASL with "make all" and "make install". This builds the libraries and installs them in /usr/local/lib/sasl. Unfortunately, these files need to be in /usr/lib/sasl. There is an explanation why they do it this way which you can read if you care. I didn't care so just created a link so the libraries were where they needed to be.
Create link to SASL libraries with "ln -s /usr/local/lib/sasl /usr/lib/sasl"
Create the Sendmail SASL config file /usr/lib/sasl/Sendmail.conf containing:
pwcheck_method: passwdThis tells SASL to use the file /etc/passwd for password validation.
Configure sendmail by creating a file ./devtools/site/site.config.m4 containing:
APPENDDEF(`confENVDEF', `-DSASL') APPENDDEF(`conf_sendmail_LIBS', `-lsasl')Which sets the compile switch to enable SASL and adds the link time switch to link in the SASL library you created two steps up.
Build sendmail with "make all" and "make install".
Create sendmail configuration file.
I used the M4 method of making a sendmail.cf. My mysite.mc in /usr/src/sendmail-8.10.0/cf/cf looks like
include(`../m4/cf.m4') VERSIONID(`sendmail configure file for fractured.org')dnl OSTYPE(linux)dnl MASQUERADE_AS(fractured.org)dnl FEATURE(always_add_domain)dnl TRUST_AUTH_MECH(`PLAIN LOGIN')dnl define(`confAUTH_MECHANISMS', `PLAIN LOGIN')dnl MAILER(local)dnl MAILER(smtp)dnland your should look similar. The two directives that should look new are the TRUST_AUTH_MECH and confAUTH_MECHANISMS lines. The FEATURE(always_add_domain) is there to help machines that host more than one domain. Everythine else should be as you have been using for a while. You compile this .mc into a .cf by typing "make mysite.cf" and then copy the result to /etc/mail/sendmail.cf
The goal of all this was so you can log into your SMTP server with your login user id and login password using Microsoft Outlook to send mail. You still need to set up a POP or IMAP server to receive mail. Fortunately linux does this automagically. The above technique allowed me to use the same login/password for IMAP fetching and SMTP sending without opening my mail server to spammers.
The last thing you may need to do is to add your alternate domains to your Cw rule. There is probably a way to do this in the .mc file but I could not find it. You may also want to have a domaindb file to map user names from one domain into local user names. This may not be necessary if user names are unique across the domains??