Postfix + sasl2 supports mysql-certified Installation notes

Source: Internet
Author: User

Postfix + sasl2 installation Note: You have been installing Postfix + sasl2 for nearly a week and have passed MySQL authentication until the initial success in the afternoon. The steps and experience are summarized as follows: Determine the version number: cyrus-sasl-2.1.22postfix-2.2.11.tar.gz 1, MySQL installed skip 2, SASL installed to sasl.2.1.22 directory to execute :. /configure -- disable-Anon -- enable-login -- enable-Plain -- enable-SQL -- With-mysql =/usr/nn_lamps/MySQL -- With-mysql-nodes des =/usr/nn_lamps /MySQL/include/MySQL -- With-mysql-libs =/usr/nn_lamps/MySQL/lib/MySQL -- enable-sample -- With-plugindir =/usr/local/lib/sasl2makemake after installing install, you can touch smtpd in the/usr/local/lib/sasl2 directory. conf pluginviewer. conf these configuration files are the touch files used by the corresponding app to call the sasl2 library, and then connect ln-S/usr/local/lib/sasl2/usr/lib/sasl2 3, install Postfix and add the lib directory of MySQL to/etc/lD. so. conf then execute ldconfig to tell the system library to find the Directory and then execute make makefiles 'ccargs =-dhas_mysql-I/usr/nn_lamps/MySQL/include/mysql-DUSE_SASL_AUTH-duse_cyrus_sasl-I/usr under the Postfix code directory /local/include/SASL ''auxlibs =-L/usr/nn_lamps/MySQL/lib/MySQL-lmysqlclient-lm-LZ-L/usr/local/lib-lsasl2 'makemake install and press Enter. If mysqlclient appears during make. so what database is not found, it must be that the directory of the previous database is not set up. Set it first and then configure main for the main configuration file. cfsmtpd_sasl_auth_enable = permit_mynetworks permit_sasl_authenticated authorization = yessmtpd_sasl_application_name = Authorization = yessmtpd_delay_reject = No/usr/local/lib/sasl2/smtpd. confpwcheck_method: Usage: sqlsql_select: Select clear from users where id = '% u @ % R' and enabled = 1sql_engine: mysqlsql_hostnames: 192.168.1.137sql _ User: mailsql_passwd: apasswordsql_database: maildb has already installed a postfix that supports SASL authentication. You can use Telnet 192.168.1.250 25 to test auth plain authentication = or auth login334 login ugfzc3dvcmq6dgvzdhb3. If success is returned, a success error occurs, first, you should start with/var/log/maillog to find clues from the log. If the log is not detailed enough, you can also set the master. in CF, after setting the line that starts smtpd, add the startup parameter of smtpd to-V to obtain more program information, as shown below: ========================================================== ============================## service type private unpriv chroot wakeup maxproc command + ARGs # (yes) (Yes) (yes) (never) (100) #===================================================== ================================== SMTP Inet n -- Smtpd-VThe log shows the cause of some errors, such as the absence of mechanism or authentication failure. If there is no authentication mechanism, it is generally due to a postfix configuration problem and the corresponding library or configuration file is not found, pay special attention to this configuration: smtpd_sasl_application_name = smtpd. This configuration tells the Postfix to query smtpd when calling the sals database. important configuration of conf (Note: change this setting to smtpd_sasl_path after postfix2.3). If the authentication fails, check whether the database is not connected, whether the login verification fails after the database is connected, or other reasons. At this time, the database log takes effect. You can analyze it by searching the database log or capturing the package that communicates with the database. Today, I captured the communication package and found some configuration errors in the configuration file, such as password settings. After correction, the authentication was successful. BTW: SASL has a pluginviewer tool to check which auxprop plugin is currently installed. It is quite easy to use. It is mainly used to load the load in that has been loaded, create pluginviewer in the/usr/lib/sasl2 directory. add a line of SQL _select = dummy to the conf file and run pluginviewer. You can see the summary of the SQL plugin loaded experience. For more information, see the documents in the doc directory under the Code directory, before configure, configure -- help to obtain the most accurate help information. Because only the code and the accompanying Doc are the most reliable and accurate. Written articles on the Internet are inevitably written incorrectly, just as I wrote this article. Due to the loss of time and memory, the actual steps described may be different from what I did at the time, so the source package is your best teacher about Postfix sasl2 questions welcome to communicate with me through renjiahui@gmail.com

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.