sh-3.2#wget ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/experimental/postfix-2.8-20100923.tar.
gz
sh-3.2#tar zxf postfix-2.8-20100923.tar.gz
sh-3.2#yum install gcc db*-devel -y
sh-3.2# make -f Makefile.init makefiles 'CCARGS=-DHAS_MYSQL -I/usr/include/mysql' 'AUXLIBS=-L/usr
/lib/mysql -lmysqlclient -lz -lm'
sh-3.2#make upgrade
sh-3.2#postconf -m |grep mysql
[root@station110 tmp]# ls extma* -l
-rw-r--r-- 1 root root 541279 09-20 17:28 extmail-1.2.tar.gz
-rw-r--r-- 1 root root 586234 09-20 17:28 extman-1.1.tar.gz
[root@station110 tmp]# mkdir /var/www/extsuite
[root@station110 tmp]# tar zxvf extmail-1.2.tar.gz -C /var/www/extsuite/
[root@station110 tmp]# tar zxvf extman-1.1.tar.gz -C /var/www/extsuite/
[root@station110 tmp]# cd /var/www/extsuite/
[root@station110 tmp]# mv extman-1.1/ extman[root@station110 tmp]# mv extmail-1.2/ extmail
sh-3.2#cd /var/www/extsuite/extman/docs/
sh-3.2#cp mysql_virtual_alias_maps.cf mysql_virtual_domains_maps.cf mysql_virtual_mailbox_maps.cf
/etc/postfix/
sh-3.2#vi init.sql (domain and password)
sh-3.2#mysql < extmail.sql
sh-3.2#mysql < init.sql
[root@station110 tmp]# groupadd vgroup
[root@station110 tmp]# useradd -d /home/domains -G vgroup vuser
[root@station110 tmp]# postconf -e 'virtual_mailbox_base = /home/domains'
[root@station110 tmp]# postconf -e 'virtual_uid_maps = static:558'
[root@station110 tmp]# postconf -e 'virtual_gid_maps = static:558'[root@station110 tmp]# postconf -e 'vir
tual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf'
[root@station110 tmp]# postconf -e 'virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf'
[root@station110 tmp]# postconf -e 'virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_ma
ps.cf'
[root@station110 tmp]# postmap -q "support@pei.com" mysql:/etc/postfix/mysql_virtual_alias_maps.cf
postmaster@pei.com
[root@station110 tmp]# postmap -q "postmaster@pei.com" mysql:/etc/postfix/mysql_virtual_mailbox_map
s.cf
pei.com/postmaster/Maildir/
[root@station110 tmp]# postmap -q "pei.com" mysql:/etc/postfix/mysql_virtual_domains_maps.cf
pei.com
[root@station110 extmail]# vi webmail.cf
SYS_LOG_TYPE = file
SYS_CRYPT_TYPE = plain
[root@station110 extmail]# touch /var/log/extmail.log
[root@station110 extmail]# chown postfix /var/log/extmail.log
sh-3.2#chmod 777 /var/log/extmail.log
[root@station110 extman]# vi webman.cf
SYS_SESS_DIR = /tmp/
SYS_CAPTCHA_ON = 0
SYS_CRYPT_TYPE = plain
sh-3.2#tail -n 11 /etc/httpd/conf/httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName mail.pei.com
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 vuser vgroup
</VirtualHost>
转载于:https://blog.51cto.com/bhanv/477679