This mail system includes basic mail sending and receiving, spam filtering, virus scanning, virtual user, backstage management, WebMail, forwarding, mail preventing forgery, automatic reply and so on.
1, LAMP configuration does not configure this, the installation system to choose a good software apache+php+mysql.
2. Install Courier-authlib
Download Address:
You can use the following address to check code installation code: http://sourceforge.net/projects/courier/
Add Postfix and Maildrop-related users & groups before installation
Groupadd Postfix
Groupadd Postdrop
Useradd postfix-g postfix-c "postfix user"-d/home/postfix-s/sbin/nologin
Groupadd Vmail
Useradd vmail-g vmail-d/mailbox
# # Special Tip 1: This is mainly to set the mail management account/process startup account. Remember that the postfix and Pstdrop groups all contain users
Postfix, Vmail group includes vmail users, you can add these users to the relevant group by directly compiling/etc/group files. While
, please keep in mind here the vmail of gi--502 and uid--501, which are used in multiple needles in the following article.
[root@mail~]# Mkdir/home/mail
[root@mail~]# chown Vmail:vmail/mailbox
[root@mail~]# chmod-r 775/mailbox
[root@mail~]# cd/usr/src/
[root@usr/src/]# tar jvxf courier-authlib-0.60.2.tar.bz2
[root@usr/src/] #cd/usr/src/courier-authlib-0.60.2
./configure--prefix=/usr/local/courier-authlib--without-authpam--without-authldap--without-authpwd- Without-authshadow--WITHOUT-AUTHVCHKPW--without-authpgsql--with-authmysql--with-mysql-libs=/usr/lib/mysql-- With-mysql-includes=/usr/include/mysql--with-redhat--with-authmysqlrc=/usr/local/courier-authlib/etc/ AUTHMYSQLRC--WITH-AUTHDAEMONRC=/USR/LOCAL/COURIER-AUTHLIB/ETC/AUTHDAEMONRC cflags= "-march=i686-o2- Fexpensive-optimizations "cxxflags="-march=i686-o2-fexpensive-optimizations "
[root@usr/src/courier-authlib-0.60.2]# Make
[root@usr/src/courier-authlib-0.60.2]# make Install
[root@net-server:/]# cd/usr/local/courier-authlib/etc/
[root@usr/local/courier-authlib/etc]# CP authmysqlrc.dist AUTHMYSQLRC
[root@usr/local/courier-authlib/etc]# CP authdaemonrc.dist AUTHDAEMONRC
[root@usr/local/courier-authlib/etc]# VI AUTHDAEMONRC
Authmodulelist= "Authmysql" <--use MySQL user authentication-->
Authmodulelistorig= "Authmysql" <--use MySQL user authentication-->
Daemons=5 <--already exists, no increase in-->
Authdaemonvar=/var/spool/authdaemon <--authlib will set this path himself->
Debug_login=0 <--already exists, no increase, 2 for detailed debug mode, you can see more detailed log-->
Defaultoptions= "" <--already exists, no increase in-->
Loggeropts= "" <--already exists, no increase in-->
[root@usr/local/courier-authlib/etc]# VI AUTHMYSQLRC
mysql_server localhost <--mysql server name or IP address-->
mysql_username postfix <--mysql User name-->
Mysql_passwordxxxxx<--mysql User name Password-->
Mysql_socket/var/lib/mysql/mysql.sock <--mysql SOCKET, please set according to your facts-->
Mysql_port 3306 <--mysql Port number, please set according to your facts-->
Mysql_opt 0
mysql_database postfix
Mysql_user_table Mailbox
Mysql_crypt_pwfield Password
Mysql_uid_field 501 <--mysql table, manages the UID of the authlib user. We'll use the vmail--> before.
Mysql_gid_field 502 <--mysql table, manages the GID of the authlib user. We'll use the vmail--> in the front.
### vmail---->uid:501, gid:502####
Mysql_login_field username
Mysql_home_field concat ('/home/mail/', Maildir)
Mysql_name_field NAME
Mysql_maildir_field concat ('/home/mail/', MAILDIR)
Mysql_quota_field QUOTA
Mysql_where_clause active= ' 1 '
Note that the above text cannot be connected to the database without spaces at last!!!!