Among the many mail Server software, Sendmail is always honored in every evaluation, making it the most widely used E-mail server. However, many people may feel a headache when talking about the Sendmail configuration. I hope this article will provide a perfect explanation for the use of Sendmail.
Install software for Linux sendmail Configuration
Sendmail.8.12.10.tar.gz Co., http://www.sendmail.org/
Cyrus-sasl-2.1.18.tar.gz http://asg.web.cmu.edu/cyrus/
Install sendmail in Linux
1. Install cyrus-sasl-2.1.18.tar.gz and sendmail first.
For Linux sendmail configuration and installation, sasl simple authentication and full-layer protocol are used. Decompress: # tar-zxvf cyrus-sasl-2.1.18.tar.gz Compilation: Enter the unzipped source directory, run the following command to complete the installation. #. /Configure -- prefix =/usr/local/sasl2 -- enable-login must be added with -- enable-login, because SASL2 does not support login authentication by default, OUTLOOK uses login for SMTP verification. # Make # compile # make install # after installing the above linux program, you can start configuration and testing.
2. Configure SASL for Sendmail
Some configuration work is required to apply SASL to sendmail authentication. Sendmail will go to the/usr/lib directory to find the SASL2 library, and we will install the program in/usr/local/sasl2, why not install the software in the/usr/lib directory? This is mainly to manage the software installed on your own. Therefore, we need to make a link under the/usr/lib directory: # cd/usr/lib # ln-s/usr/local/sasl2/lib /*. OK. Create a directory under the/var/directory to provide temporary data to the saslauthd process.
# Cd/var
# Mkdir state
# Cd state
# Mkdir saslauthd
Note: if these directories are not available, an error is prompted when running saslauthd.
OK, and then to ensure that the CYRUS-SASL2 function library knows how to verify the received SASL authentication request, you must create a SASL configuration file to define the MTA program as a SASL application. The configuration file name is Sendmail. conf is written in uppercase. It is located in the/usr/lib/sasl2 directory, that is, the/usr/local/sasl2/lib/sasl2 directory, do you remember the link created above? In this file, you define the Authentication database method you want to use. The following example uses saslauthd to verify the authentication request.
# Cd/usr/lib/sasl2
# Echo 'pwcheck _ method: saslauthd'>; Sendmail. conf
3. Test
OK. Now you can run saslauthd and perform the test.
# Cd/usr/local/sasl2/sbin
#./Saslauthd-a shadow
Use the shadow user and password for verification.
#./Testsaslauthd-u userid-p password
0: OK "Success ."
If the preceding information is displayed, saslauthd is running properly. The testsaslauthd program is not compiled by default. You need to generate the # make testsaslauthd command in the saslauthd subdirectory of the source code directory tree. The above describes the Sendmail configuration.
Article Reprinted from network management: http://www.bitscn.com/ OS /linux/201005/186612.html