postfix+squirrelmail实现邮件服务器
[root@localhost ~]# vim /etc/sysconfig/network
[root@localhost ~]# hostname mail.xxq.com //修改后重新登录
[root@mail ~]# service sendmail status //sendmail服务为关闭状态
sendmail (pid 3080) is running...
[root@mail ~]# service sendmail stop
Shutting down sm-client: [ OK ]
Shutting down sendmail: [ OK ]
[root@mail ~]# chkconfig sendmail off //设为开机关闭
安装和配置postfix服务
[root@mail ~]# mount /dev/cdrom /mnt/cdrom
[root@mail ~]# yum -y install postfix
[root@mail ~]# cd /etc/postfix/
[root@mail postfix]# vim main.cf //修改配置文件
69 #myhostname = host.domain.tld
修改myhostname = mail.xxq.com //本机名
77 mydomain = xxq.com //域名
93 myorigin = $mydomain //取消注释
107 inet_interfaces = all //取消注释
110 #inet_interfaces = localhost //注释掉改行
155 #mydestination = $myhostname, localhost.$mydomain, localhost //注释掉改行
156 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain //取消注释
在255 mynetworks = 127.0.0.0/8 上面添加如下:#使用SMTP认证
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination
[root@mail postfix]# service saslauthd start
Starting saslauthd: [ OK ]
[root@mail postfix]# chkconfig saslauthd on
[root@mail postfix]# service postfix start
[root@mail postfix]# chkconfig postfix on
[root@mail ~]# yum -y install httpd
安装squirrelmail(图形化邮件客户端)
[root@mail ~]# yum -y install httpd //首先安装web服务器,实现web页面管理
[root@mail ~]# yum -y install squirrelmail
[root@mail ~]# cd /var/www/html
[root@mail html]# cp -R /usr/share/squirrelmail/* ./
[root@mail html]# cd config
[root@mail config]# ./conf.pl
输入d. 然后输入cyrus(指定IMAP服务器类型)
输入2. 选择Server Settings然后输入1修改Domain为xxq.com
3修改Sendmail or SMTP为选2--SMTP
输入4. 选择General Options然后输入5修改Usernames in Lowercase :为 true
输入10 选择Languages然后输入1修改Default Language :为 zh_CN
2修改Default charset :为 GB2312
R返回上一层
最后输入s保存以上修改,再输入q退出(修改的文件同时保存)
[root@mail ~]# vim /etc/httpd/conf/httpd.conf
747 #AddDefaultCharset UTF-8 //注释掉此行
[root@mail ~]# service httpd start
[root@mail ~]# chkconfig httpd on
安装dovecot服务
[root@mail ~]# yum -y install dovecot //用于接收邮件
[root@mail ~]# service dovecot start
Starting Dovecot Imap: [ OK ]
在客户端登陆邮件服务器