Postfix-mysql-sasl-courier-httpd

Source: Internet
Author: User
Tags syslog dovecot

Courier-authlib dovecot postfix postdrop extmail mysql system version 6.7 software version Httpd-2.2.15-47.el6.centos postfix-3.1.0 extman-1.1 extmail-1.2 MySQL 5.6.30 dovecot-2.0.9-19.el6_7.2.x86_64yum-y remove boost-*yum-y remove mysqlyum-y install wget gcc GC c-c++ ncurses-devel CMake Make Perl can have the DNS needs of the self-configuration, need to find me, but also write configuration new MySQL group and user Groupadd mysqluseradd-m-s/sbin/nologin-r -G MySQL MySQL seems to have to have boost source code compiled MySQL 14-61 line installed can directly ignore cmake-dcmake_install_prefix=/usr/local/mysql-dmysql_datadir=/ mysql/data-dsysconfdir=/usr/local/mysql/-dwith_myisam_storage_engine=1-dwith_innobase_storage_engine=1-dwith_ Memory_storage_engine=1-dwith_readline=1-dwith_boost=/files/boost-dwith_partition_storage_engine=1-dmysql_unix _addr=/usr/local/mysql/mysql.sock-dmysql_tcp_port=3306-ddefault_charset=utf8-ddefault_collation=utf8_general_ Ci-ddownload_boost=1-denabled_local_infile=1-dextra_charsets=all may be reported with four options error after installation, this is 5.7 configuration error can ignore make && Make INSTALLMV/ETC/MY.CNF{,.BAK}CP support-files/my-default.cnf/etc/my. CNFCP support-files/mysql.server/etc/init.d/mysqldchmod +x/etc/init.d/mysqldchkconfig--add mysqldchkconfig mysqld Onmkdir-p/mysql/datachown-r mysql:mysql/mysql/data5.6scripts/mysql_install_db--basedir=/usr/local/mysql-- Datadir=/mysql/data-u mysql5.7/usr/local/mysql/bin/mysqld--initialize-insecure--user=mysql--basedir=/usr/local/ MySQL--datadir=/mysql/data problem [[email protected] mysql]#/etc/rc.d/init.d/mysql Statusmysql is not running, but Lock file (/var/lock/subsys/mysql[failed] Resolve party View log cat/mysql/data/xiong.err160513 00:19:41 Mysqld_safe mysqld from PID File/mysql/data/xiong.pid ended Chown-r Mysql:mysql/usr/local/mysql/touch/etc/profile.d/mysqld.shecho "Export PATH= $PATH:/usr/local/mysql/bin ">>/etc/profile.d/mysqld.shsource/etc/profile.d/mysqld.sh Installation Group Kit and package Yum-y Groupinstall "Development Tools" "Desktop Platform Development" "Server Platform Development" Yum-y install httpd perl-dbd -mysql Courier-authlib Dovecot must first join the Emos source otherwise authlib software will fail to install VIM/ETC/YUM.REpo.d/emos.repo [emos]name=emosbaseurl=file:///mnt here the Yum Warehouse can enabled=1gpgcheck=0 uninstall postfix software yum-y Remove, as you want. Postfix Delete system user Postfix This step must be done otherwise extmail the last send message will appear system configuration error Groupdel postfixgroupadd-g postfixuseradd-g 2000-u 2000-s/ Sbin/nologin-m postfixgroupadd-g 2001 Postdropuserdel-r postdropuseradd-g 2001-u 2001-s/sbin/nologin-m Postdrop because of the deletion In addition to system users need to add postfix originally brought files to increase permissions, or start will fail chown postfix-r/var/lib/postfix/chown postfix-r/var/spool/postfix/Add library file otherwise make Postfix will fail echo "/usr/local/mysql/lib" >>//etc/ld.so.conf.d/mysqld.conf my version is postfix-3.1.0, System version 64-bit needs to be changed/usr/ Lib64, my MYSQL is the source code of the specified header file with the library file location make makefiles ' Ccargs=-dhas_mysql-i/usr/local/mysql/include-duse_sasl_auth-duse_ Cyrus_sasl-i/usr/include/sasl-duse_tls ' AUXLIBS=-L/USR/LOCAL/MYSQL/LIB-LMYSQLCLIENT-LZ-LM-L/USR/LIB64/SASL2- Lsasl2-lssl-lcrypto ' Make-j 2 && make install generate/etc/init.d/postfix script download location link: Http://pan.baidu.com/s/1hrSpPDM Password: tieuchmod +x/etc/init.d/postfixchkconfig postfix--addchkconfig Postfix onpostconf "smtputf8_enable = no" edit AUTHDAEMONRC file change configuration only for myqlvim/etc/authlib/authdaemonrceuthmodulelist= " Authuserdb authpam authpgsql authldap authmysql authcustom authpipe "authmodulelist=" Authmysql "Euthmodulelistorig=" Authuserdb authpam authpgsql authldap authmysql authcustom authpipe "authmodulelistorig=" Authmysql "#daemons =5daemons= 10 process for 10 connection MySQL configuration file, the user with the password according to their own specified to my is the default Extmailegrep-v "^#|^[[:space:]]|^$"/etc/authlib/authmysqlrcmysql_ serverlocalhostmysql_usernameextmialmysql_passwordextmailmysql_port3306 Port number Mysql_opt0mysql_databaseextmailmysql _user_tablemailbox file directory mysql_crypt_pwfieldpasswordmysql_uid_field2000 user group ID number created on top of user Mysql_gid_field2000mysql_ Login_fieldusernamemysql_home_fieldconcat (' var/mailbox/', homedir) connection directory Mysql_name_fieldnamemysql_maildir_ Fieldconcat ('/var/mailbox/', Maildir) mysql_socket/usr/local/mysql/ Mysql.sock here it is important to note that after you specify your mysql.sock file configuration, remember to start the service and add Authlib to the boot entry service Courier-authlib Restartchkconfig Courier-authlib on creates authlib specified directory, above what directory is created here mkdir-pv/var/mAilboxchown-r postfix/var/mailbox/Specify SASL2 authentication method vim/usr/lib64/sasl2/smtpd.confpwcheck_method:authdaemondmech_list: PLAIN Loginauthdaemond_path:/var/spool/authdaemon/socket is modified here to: SASL Supported authentication Methods vim/etc/postfix/main.cfinet_ Interfaces = All listening address must be changed to all local also line ########################### #CYRUS-sasl########################### #broken_sasl_ Auth_clients = Yessmtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_invalid_ Hostname,reject_non_fqdn_hostname,reject_unknown_sender_domain,reject_non_fqdn_sender,reject_non_fqdn_ Recipient,reject_unknown_recipient_domain,reject_unauth_pipelining,reject_unauth_destinationsmtpd_sasl_auth_ Enable = Yessmtpd_sasl_local_domain = $myhostnamesmtpd _sasl_security_options = Noanonymoussmtpd_sasl_application_ Name = Smtpdsmtpd_banner = Welcome to We $myhostname esmtp,warning:version not available!####################### #Virtua L Mailbox settings####################### #这里是extmil配置virtual_mailbox_base =/var/mailboxvirtual_mailbox_maps = MySQL :/etc/postfix/mysql_virtual_mailbox_maps.cfvirtual_mailbox_domains = Mysql:/etc/postfix/mysql_virtual_domains_ Maps.cfvirtual_alias_domains =virtual_alias_maps = Mysql:/etc/postfix/mysql_virtual_alias_maps.cfvirtual_uid_maps = Static:2000virtual_gid_maps = Static:2000virtual_transport = virtual######################### #QUOTA Settings###### ################# #配额可取消message_size_limit = 14336000virtual_mailbox_limit = 20971520 Here is the key, be sure to pay attention to double quotes and auto-create mode, Otherwise, importing the Extmail.sql file will cause an error vim/usr/local/mysql/my.cnf sql_mode= "No_engine_substitution,strict_trans_tables" sql-mode= " No_auto_create_user "[[email protected] docs]# service mysqld Restart change to restart and import extmail.sql into the database import my is 5.6.30 version Source/tmp/extman-1.1/docs/extmail.sql; Create user and authorize, MySQL is not familiar this is the grant all privileges Baidu extmail.* to [email protected] identified by ' Extmail '; GRANT all privileges the extmail.* to [email protected] identified by ' extmail '; copy extman, mysql_ virtual user to postfix directory, This file is main.cf defined do not copy less, otherwise will also error [[email protected] docs]# Cp/tmp/extman-1.1/docs/mysql_virtual_*/etc/postfix/vim/etc/dovecot/conf.d/auth-sql.conf.ext Line before joining the line mail_location = Maildir:/var /mailbox/%d/%n/maildirvim/etc/dovecot/dovecot-sql.conf.ext the file needs to be defined in auth-sql.conf with the same driver = Mysqlhost note must be changed to Mysql.sock specified do not directly copy otherwise there will be error connect = Host=/usr/local/mysql/mysql.sock dbname=extmail user=extmail Password=extmaildefault_pass_scheme = Cryptpassword_query = SELECT username as user,password as password from mailbox wher E username = '%u ' user_query = SELECT maildir, uidnumber as UID, gidnumber as GID from mailbox WHERE username = '%u ' installation Extm Ailtar ZXVF EXTMAIL-1.2.TAR.GZMKDIR-PV/VAR/WWW/EXTSUITEMV Extmail-1.2/var/www/extsuite/extmailcp/var/www/extsuite /extmail/webmail.cf.default/var/www/extsuite/extmail/webmail.cfvim/var/www/extsuite/extmail/webmail.cfsys_user _lang = en_US language option, can be changed to: Sys_user_lang = Zh_cnsys_maildir_base =/home/domains Here is the directory of the user mail you set up in the previous article, can be changed to: Sys_maildir_ BASE =/var/mailboxsys_mysql_user = Db_usersys_mysql_pass = Db_pass The above two sentences are used to set the user name, password, andThe database used by the mail server, modified here to: Sys_mysql_user = Extmailsys_mysql_pass = Extmailvim/etc/httpd/conf/httpd.confuser PostfixGroup Postfix ServerAdmin adminmail.xiong.com documentroot/var/www/extsuite/extmail/html scriptalias/extmail/ cgi/var/www/extsuite/extmail/cgi alias/extmail/var/www/extsuite/extmail/html/ Extmail will use Perl's UNIX::SYSLOGD function, you can go to http://search.cpan.org search to download the original code package for installation. Tar zxvf unix-syslog-0.100.tar.gzcd unix-syslog-0.100perl makefile.plmakemake install launch Apache service services httpd Restart install extman download path www.extmail.org tar zxvf extman-1.1.tar.gz[[email protected] tmp]# mv extman-1.1/var/www/ Extsuite/extmancd/var/www/extsuite/extman[[email protected] extman]# CP webman.cf.default Webman.cfvim Webman.cfsys_maildir_base =/home/domains Here is the directory of the user mail you set up earlier, which can be changed to: Sys_maildir_base =/var/mailboxsys_default_uid = 1000sys_default_gid = 1000 The ID number that is set later in the two places needs to be changed to the ID number of the postfix user and Postfix group created before, this article uses 2525, so the above two items need to be modified to: Sys_default_uid = 2525sys_default_gid = 2525sys_mysql_user = Webmansys_mysql_pass = Webman modified to: Sys_mysql_user = ExtmailSYS_MYSQL_PASS = Extmailsys_mysql_socket =/var/lib/mysql/mysql.sock modified to: Sys_mysql_socket =/tmp/mysql.sock[[email protected] extman]# Vim/etc/httpd/conf/httpd.conf added to the virtual Web site scriptalias/extman/cgi/var/www/extsuite/extman/cgi alias/extman/ Var/www/extsuite/extman/html creates a temporary directory for its runtime and modifies its corresponding permissions: #mkdir-pv/tmp/extman#chown postfix.postfix/tmp/extmanvim/var/www/extsuite/extman/ WEBMAN.CF does not enable verification code sys_captcha_on = 1 is sys_captcha_on = 0 The last graphics log is not turned on, it has to be modified so that it can be used directly

POSTFIX-MYSQL-SASL-COURIER-HTTPD

Related Article

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.