企业级邮件服务器解决方案
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一、初始化系统环境
主机名:
#vim /etc/sysconfig/network
HOSTNAME=
#vim /etc/hosts
172.16.1.3
#hostname
安装包:
Postfix
Dovecot
Mysql
Postfixadmin
Amavisd+spam
Clamav
二、优化系统性能与安全升级
三、配置服务器
postfix:
#rpm –ivh postfix-2.3.3-2.i386.rpm
#postconf –m
#cd /RHEL5u3/Server/
#rpm –ivh system-switch-mail-0.5.25-12.noarch.rpm #system-switch-mail
或者使用alternatives:
#alternatives –display mta
#alternatives –config mta
dovecot:
#cd /RHEL5u3/Server/
#rpm –ivh dovecot-1.0.7-7.el5.i386.rpm
mysql:
#cd /RHEL5u3/Server/
#rpm –ivh mysql-server-5.0.45-7.el5.i386.rpm
#rpm –ivh mysql-5.0.45-7.el5.i386.rpm
postfix admin:
#cd /var/ftp/pub/MAIL/software/postfixadmin
#tar zxf postfixadmin-2.1.0.gz –C /var/www/html/ #cd /var/www/html
#mv postfixadmin-2.1.0 postfixadmin
#cd postfixadmin
#less DA TABASE_MYSQL.TXT
#service mysqld start
#mysql < DA TABASE_MYSQL.TXT
# mv config.inc.php.sample config.inc.php
#vim config.inc.php
$CONF[…default_language‟] = ‟cn‟;
$CONF[…database_type‟] = …mysql‟;
$CONF[…database_host‟] = …localhost‟;
$CONF[…database_user‟] = …postfixadmin‟;
$CONF[…database_password‟] = …postfixadmin‟;
$CONF[…database_name‟] = …postfix‟;
$CONF[…database_prefix‟] = …‟;
$CONF[…domain_path‟] = …YES‟;
$CONF[…domain_in_mailbox‟] = …NO‟;
#service httpd start
php-mysql:
#rpm –qa|grep mysql
#cd /var/ftp/pub/RHEl5u3
#cd Server
#rpm –ivh php-mysql-5.1.6-23.el5.i386.rpm
Postfixadmin:
#cd /var/www/html
#chown –R root:root postfixadmin/
//IP/postfixadmin/
->setup
(可能需要修改以下文件:
#vim /etc/php.ini
Magic_quotes_gpc = Off
Service httpd restart
)
#cd postfixadmin/
#mv setup.php setup.php.bak
//IP/postfixadmin/
//IP/postfixadmin/admin
->新建域:域名,描述,别名数-1,邮箱数0 ->新建管理员:管理员admin@,密码,域
//IP/postfixadmin/
->新建邮箱
postfix:
#cd /var/ftp/pub/MAIL/software/allconf/
#ls
#cp main.cf /etc/postfix/
#cp master.cf /etc/postfix/
#cp mysql_virtual_* /etc/postfix/
#cd /etc/postfix/
#vim main.cf
BASE
VIRTUAL MAILBOX SETTINGS
QUOTA
SASL
CONTENT FILTER
#man postconf
#man 5 postconf
#cd /var/ftp/pub/MAIL/doc/
#ls 中文文档
#cd /usr/share/doc/postfix-2.3.3/
#ls
#cd README_FILES/
#ls
#cd /etc/postfix/
#ls
#vim master.cf (各组件的配置文件)
Smtp inet n - n - - smtpd (postfix中负责收邮件的组件) Smtp unix - - n - - smtp (postfix中负责发邮件的组件) #vim mysql_virtual_mailbox_maps.cf (记录用户邮箱信息)
#postmap –q blues@ mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf (/var/spool/mail//blues/ 邮件存放位置)
#cd /var/spool
#ls –ld mail/
#chown –R postfix:postfix mail/
dovecot:
#cd /var/ftp/pub/Mail/software/allconf/
#cp dovecot.conf /etc/
#cp dovecot-mysql.conf /etc/
#vim /etc/dovecot.conf
#vim /etc/dovecot-mysql.conf
#cd /usr/share/doc/dovecot-1.0.7/
#cd wiki
#ls
四、使用测试
Squirrelmail:
#cd /var/ftp/pub/RHEL5u3/Server
#rpm –ivh squirrelmail-1.4.8-4.0.1.el5.noarch.rpm php-mbstring-5.1.6-23.el5.i386.rpm
#/etc/init.d/postfix/restart
#/etc/init.d/dovecot restart
#/etc/init.d/httpd restart
//IP/webmail/
用blues@登陆发邮件
用admin@登陆收邮件
五、故障排除:
#tail –f /var/log/maillog