The first is to build back-office services:
Download the following 2 packages extmail-1.2.tar.gz
Extman-1.1.tar.gz
Create a extsuite directory, fixed format mkdir/var/www/extsuite
Extract 2 compressed packets to the/var/www/extsuite/directory tar zxf extman-1.1.tar.gz-c/var/www/extsuite/
Tar zxf extmail-1.2.tar.gz-c/var/www/extsuite/
Switch to/var/www/extsuite/cd/var/www/extsuite/to rename the 2 compressed directories, the original directory is too long. MV Extmail-1.2/extmail
MV Extman-1.1/extman
CD Extman above we have created a extsuite directory, why it must be extsuite. Because the following file Webman.cf.default contains many parameters written in the default path/var/www/extsuite/extman/this path.
CD extman/docs/
In the following file, many of the mail service database configurations are written by default and imported directly.
Mysql-uroot-predhat < Extmail.sql
Vim Init.sql//change the encryption password inside to the name code
This file writes a lot about mail users, mailboxes, aliases and other services written in the MySQL service data
Mysql-uroot-predhat < Init.sql
We will/var/www/extsuite/extman/docs the next three mail mailbox, domain name, alias file CP to the/etc/postfix directory.
CP mysql_virtual_alias_maps.cf MYSQL_VIRTUAL_DOMAINS_MAPS.CF mysql_virtual_mailbox_maps.cf/etc/postfix/
Verify that the three files are correct: Mysql:/etc/postfix This must be an absolute path
Postmap-q "[email protected]" mysql:/etc/postfix/mysql_virtual_alias_maps.cf
Postmap-q "[email protected]" mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
Postmap-q "extmail.org" mysql:/etc/postfix/mysql_virtual_domains_maps.cf
View some postfix parameters and get information about vitual items by filtering postconf-d | grep virtual adds it to the Postfix master configuration file to make it read automatically.
Postconf-e VIRTUAL_MAILBOX_DOMAINS=MYSQL:/ETC/POSTFIX/MYSQL_VIRTUAL_DOMAINS_MAPS.CF
Postconf-e VIRTUAL_MAILBOX_MAPS=MYSQL:/ETC/POSTFIX/MYSQL_VIRTUAL_MAILBOX_MAPS.CF
Postconf-e VIRTUAL_ALIAS_MAPS=MYSQL:/ETC/POSTFIX/MYSQL_VIRTUAL_ALIAS_MAPS.CF
We use virtual users, and of course we create a virtual user.
Useradd-u 800-s/sbin/nologin Vmail writes its parameters to the Main.cf file and automatically takes effect.
Postconf-e virtual_gid_maps=static:800
Postconf-e virtual_uid_maps=static:800
Specifies the mail storage location for the virtual user.
Postconf-e virtual_mailbox_base=/home/vmail/
POSTCONF-E Inet_interfaces=all//Everyone can use the mail service
Restart loading after configuration is complete.
Postfix reload test, send an e-mail to try. Mail [email protected]
MAILQ cd/home/vmail/
Building Front Desk Service:
CD extmail/establishing the foreground mail master configuration file
CP Webmail.cf.default WEBMAIL.CF
Vim INSTALL View Help
Copy the following lines to the Apache configuration file
Namevirtualhost *:80
<virtualhost *:80>
ServerName mail.example.com
documentroot/var/www/extsuite/extmail/html/
scriptalias/extmail/cgi/var/www/extsuite/extmail/cgi
Alias/extmail/var/www/extsuite/extmail/html
Suexecusergroup VUser Vgroup </VirtualHost>
Vim/etc/httpd/conf/httpd.conf
<virtualhost *:80>
ServerName mail.extmail.org//Access the directory's domain name
documentroot/var/www/extsuite/extmail/html/
scriptalias/extmail/cgi/var/www/extsuite/extmail/cgi
Alias/extmail/var/www/extsuite/extmail/html
Suexecusergroup Vmail vmail//Effective users and groups
</VirtualHost>
192.168.2.249 mail.extmail.org//In browser client to do a parse
/ETC/INIT.D/HTTPD Restart//restart Apache service
cd/var/www/extsuite///default These files can be used by anyone, but our service is to access the following files as a vmail user
Chown-r Vmail.vmail *
Yum install perl-cgi//Refresh Discovery service does not support CGI modules
Vim WEBMAIL.CF
sys_log_on = 0//Turn off log function
Sys_maildir_base =/home/vmail//Change the directory where the master profile is received to our default path
Sys_crypt_type = plain//use plaintext password
Sys_mysql_user = extmail//Modify the user and password used to log in to the MYSQL database Sys_mysql_pass = Extmail
Implementation of User registration: CD extman/
Vim INSTALL
Namevirtualhost *:80
<virtualhost *:80>
ServerName mail.example.com
documentroot/path/to/your/document/root/
scriptalias/extman/cgi/var/www/extsuite/extman/cgi
Alias/extman/var/www/extsuite/extman/html
Suexecusergroup VUser Vgroup
</VirtualHost>
scriptalias/extman/cgi/var/www/extsuite/extman/cgi
Alias/extman/var/www/extsuite/extman/html
<virtualhost *:80>
ServerName mail.extmail.org
documentroot/var/www/extsuite/extmail/html/
scriptalias/extmail/cgi/var/www/extsuite/extmail/cgi
Alias/extmail/var/www/extsuite/extmail/html
scriptalias/extman/cgi/var/www/extsuite/extman/cgi
Alias/extman/var/www/extsuite/extman/html
Suexecusergroup Vmail Vmail
</VirtualHost>
/ETC/INIT.D/HTTPD Restart Browser Test http://mail.extmail.org/extman/cgi/index.cgi
No master configuration file is prompted:
CP Webman.cf.default WEBMAN.CF
Modify a valid user for a message
Sys_maildir_base =/home/vmail
Temporary files
Sys_sess_dir =/tmp/
Do you want to turn off the verification feature?
sys_captcha_on = 0
Use plaintext password Sys_crypt_type = plain
# yum install-y perl-extutils-makemaker perl makefile.pl
# make Install
sys_captcha_on = 1
Sys_captcha_len = 4 Discovery Verification Code does not appear:
Get perl-gd-2.45-1.el6.rfx.x86_64.rpm
# RPM-IVH perl-gd-2.45-1.el6.rfx.x86_64.rpm
/var/www/extsuite/extman/addon
# CP mailgraph_ext//usr/local/-R
/usr/local/mailgraph_ext
# Vim Mailgraph-init
Basedir=/usr/local/mailgraph_ext
#./mailgraph-init
# yum Localinstall rrdtool-perl-1.3.8-6.el6.x86_64.rpm
#/usr/local/mailgraph_ext/mailgraph-init Start
File-tail-0.99.3.tar.gz
# tar zxf file-tail-0.99.3.tar.gz
CD file-tail-0.99.3 # Perl makefile.pl
# yum Install Perl-time-hires-y
# make Install
#/usr/local/mailgraph_ext/mailgraph-init Start
/var/www/extsuite/extman/daemon/cmdserver &
Vim/etc/rc.d/rc.local
/var/www/extsuite/extman/daemon/cmdserver &
/usr/local/mailgraph_ext/mailgraph-init start
Cancellation of free registration:
CD extmail/
Vim WEBMAIL.CF
Sys_show_signup = 0
Yum Search Dovecot
The Yum search dovecot-mysql.x86_64-y master configuration file is not changed.
Vim 10-mail.conf
Mail_location = Maildir:/home/vmail/%d/%n/maildir
First_valid_uid = 800
Vim 10-auth.conf
!include auth-sql.conf.ext passdb {driver = SQL found the following line, prompting us to find this file, Example-config/dovecot-sql.conf.ext
The following is the path/usr/share/doc/dovecot-2.0.9/example-config, this file is just a template.
# Path for SQL configuration file, see Example-config/dovecot-sql.conf.ext args =/etc/dovecot/dovecot-sql.conf.ext}
We put the CP into the/etc/dovecot path,
and modify the following parameters.
Driver = MySQL
Connect = host=localhost dbname=extmail user=extmail password=extmail
Default_pass_scheme = PLAIN
Password_query = \
SELECT username, domain, password \
From mailbox WHERE username = '%u ' and domain = '%d '
User_query = SELECT Maildir, as UID, as GID from mailbox WHERE username = '%u '
Certificate of Tofu block production:/etc/pki/tls/certs
Name of the certificate: DOVECOT.PEM copy it to the public key and the encrypted directory, respectively.
CP dovecot.pem/etc/pki/dovecot/certs/
CP dovecot.pem/etc/pki/dovecot/private/
/etc/init.d/dovecot restart
Reboot is OK.
The following is the addition of the TLS and SASL certificate modules and cryptographic modules in the mail service. As with the MSYQL load:
Yum install-y cyrus-sasl-devel Yum install-y openssl-devel
# CD postfix-2.11.0//switch to the pressurized package directory
/root/postfix-2.11.0/readme_files//This directory of 2 files, less sasl_readme less tls_readme and MySQL a piece recompile upgrade.
# make-f Makefile.init makefiles ' ccargs=-dhas_mysql-i/usr/include/mysql-duse_sasl_auth-duse_cyrus_sasl-i/usr/ Include/sasl-duse_tls ' Auxlibs=-l/usr/lib64/mysql-lmysqlclient-lz-lm-l/usr/lib64-lsasl2-lcrypto '
Make upgrade