一、邮件解决方案的软件组成:
二、DNS环境的搭建/配置:
三、LAMP环境的搭建:
四、Postfix 、Dovecot环境的搭建/配置 :
五、SMTP认证环境的搭建/配置 :
六、Maildrop的安装/配置:
七、Extmail & Extman 环境的搭建/配置 :
八、trouble shooting:
九、邮件收发测试:
# mkdir /var/tmp/{extman,extmail} //创建session目录 # chown vuser:vgroup /var/tmp/extma* # mkdir -p /var/maildata/domains/extmail.org/postmaster/Maildir //创建邮件存储目录 # chown -R vuser:vgroup /var/maildata/ # mkdir -p /var/www/extsuite/{extmail,extman} //创建extmail和extman网页文件目录
安装extmail:
# tar zxvf extmail-1.2.tar.gz # cp -rp extmail-1.2/* /var/www/extsuite/extmail/ # chmod -R 755 /var/www/extsuite/ # cd /var/www/extsuite/extmail/ # cp webmail.cf.default webmail.cf # vi webmail.cf SYS_SESS_DIR = /var/tmp/extmail/ SYS_MAILDIR_BASE = /var/maildata/domains/ SYS_USER_LANG = en_US SYS_MYSQL_USER = extmail SYS_MYSQL_PASS = extmail SYS_MYSQL_DB = extmail SYS_MYSQL_HOST = localhost SYS_MYSQL_DB = extmail SYS_MYSQL_TABLE = mailbox SYS_MYSQL_ATTR_USERNAME = username SYS_MYSQL_ATTR_DOMAIN = domain SYS_MYSQL_ATTR_PASSWD = password SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket
安装extman:
# tar zxvf extman-1.1.tar.gz # cp -rp extman-1.1/* /var/www/extsuite/extman/ # chown -R vuser:vgroup /var/www/extsuite/ # cd /var/www/extsuite/extman/ # cp webman.cf.default webman.cf # vi webman.cf SYS_CAPTCHA_ON = 0 SYS_MAILDIR_BASE = /var/maildata/domains/ SYS_SESS_DIR = /var/tmp/extman/
导入数据库:
# mysql -u root -p < /var/www/extsuite/extman/docs/extmail.sql # mysql -u root -p < /var/www/extsuite/extman/docs/init.sql
生成extmail系统管理员的用户目录:
# cd /var/www/extsuite/extman/tools/ # ./maildirmake.pl /var/maildata/domains/extmail.org/postmaster/Maildir/ # chown -R vuser:vgroup /var/maildata/domains/ # cp -r /var/www/extsuite/extman/docs/mysql_virtual_* /etc/postfix/ # grep password /etc/postfix/mysql_virtual_* mysql_virtual_alias_maps.cf:password = extmail mysql_virtual_domains_maps.cf:password = extmail mysql_virtual_limit_maps.cf:password = extmail mysql_virtual_mailbox_maps.cf:password = extmail mysql_virtual_sender_maps.cf:password = extmail
配置postfix支持虚拟域和虚拟用户:
# vi /etc/postfix/main.cf ##================ Virtual Mailbox Settings =====================# virtual_mailbox_base = /var/maildata/domains virtual_mailbox_maps =mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_mailbox_domains =mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_alias_domains = virtual_alias_maps =mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_uid_maps = static:1000 virtual_gid_maps = static:1000 virtual_transport = virtual maildrop_destination_recipient_limit = 1 maildrop_destination_concurrency_limit = 1
配置httpd虚拟主机:
# vi /etc/httpd/conf/httpd.conf NameVirtualHost *:80 Include conf/vhost_*.conf # vi /etc/httpd/conf/vhost_extmail.conf # VirtualHost for ExtMail Solution # VirtualHost for ExtMail Solution <VirtualHost *:80> ServerName rhel5.vnimos.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/ # Suexec config SuexecUserGroup vuser vgroup </VirtualHost> # chkconfig httpd on # /etc/init.d/httpd start
配置图形化日志 Mailgraph_ext:
安装Time::HiRes #tar zxvf Time-HiRes-1.9725.tar.gz #cd Time-HiRes-1.9725 #perl Makefile.PL #make #make test #make install 安装 File::Tail #tar zxvf File-Tail-0.99.3.tar.gz #cd File-Tail-0.99.3 #perl Makefile #make #make test #make install 安装 rrdtool-1.4.5 #tar zxvf rrdtool-1.4.5.tar.gz #cd rrdtool-1.4.5 #./configure --prefix=/usr/local/rrdtool #make #make install # cp -rp /var/www/extsuite/extman/addon/mailgraph_ext /usr/local/ # ln -s /usr/local/rrdtool/lib/perl/5.8.8/x86_64-linux-thread-multi/auto/RRDs/RRDs.so /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/ # ln -s /usr/local/rrdtool/lib/perl/5.8.8/RRDp.pm /usr/lib/perl5/5.8.8/ # ln -s /usr/local/rrdtool/lib/perl/5.8.8/x86_64-linux-thread-multi/RRDs.pm /usr/lib/perl5/5.8.8/ # /usr/local/mailgraph_ext/mailgraph-init start # /var/www/extsuite/extman/daemon/cmdserver --daemon # echo "/usr/local/mailgraph_ext/mailgraph-init start" >> /etc/rc.d/rc.local # echo "/var/www/extsuite/extman/daemon/cmdserver -v-d" >> /etc/rc.d/rc.local 添加定时任务: # crontab -e 0 4 * * * /var/www/extsuite/extman/tools/expireusers.pl -all [email protected] 30 4 * * * /var/www/extsuite/extman/tools/reportusage.pl -all /home/domains [email protected]