Postfix+squirrelmail均为linux自带软件
废话不说~直接开始~(有需求请Q:395061796,竭诚×××~)
[root@zhangc ~]# vim /etc/resolv.conf
[root@zhangc ~]# vim /etc/hosts
[root@zhangc ~]# vim /etc/sysconfig/network
[root@zhangc ~]# hostname mail.zhangc.com
[root@zhangc ~]# logout
Xshell:\> ssh 192.168.100.123
[root@mail ~]# mount
[root@mail ~]# vim /etc/yum.repos.d/rhel-debuginfo.repo
[root@mail Server]# yum install bind-9.3.6-4.P1.el5.i386.rpm
[root@mail ~]# yum install bind-chroot caching-nameserver –y
[root@mail ~]# cd /var/named/chroot/etc/
[root@mail etc]# cp -p named.caching-nameserver.conf named.conf
[root@mail etc]# vim named.conf
15 listen-on port 53 { any; };
27 allow-query { any; };
28 allow-query-cache { any; };
37 match-clients { any; };
38 match-destinations { any; };
[root@mail etc]# vim named.rfc1912.zones
【增加作用域zhangc.com】
27 zone "zhangc.com" IN {
28 type master;
29 file "zhangc.com.zone";
30 allow-update { none; };
31 };
[root@mail etc]# cd ../var/named/
[root@mail named]# cp -p localhost.zone zhangc.com.zone【创建作用域文件zhangc.com.zone】
[root@mail named]# vim zhangc.com.zone
  1 $TTL    86400
  2 @               IN SOA  ns.zhangc.com.       root (
  3                                         42              ; serial (d. adams)
  4                                         3H              ; refresh
  5                                         15M             ; retry
  6                                         1W              ; expiry
  7                                         1D )            ; minimum
  8
  9                 IN NS           ns.zhangc.com.
 10 ns              IN A            192.168.100.123
 11 mail            IN A            192.168.100.123
 12 pop3            IN CNAME        mail
 13 smtp            IN CNAME        mail
 14 @               IN MX   10      mail
[root@mail named]# service sendmail status
[root@mail named]# service sendmail stop【sendmail为系统自动启动的服务,与postfix服务端口冲突,关闭sendmail服务】
[root@mail named]# chkconfig sendmail off
[root@mail named]# chkconfig --list |grep sendmail
[root@mail named]# yum install postfix
[root@mail named]# vim /etc/postfix/main.cf
修改以下行数:
69 myhostname = mail.zhangc.com
77 mydomain = zhangc.com
93 myorigin = $mydomain
107 inet_interfaces = all
156 mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
255 mynetworks = 127.0.0.0/8
258 broken_sasl_auth_clients = yes
259 smtpd_sasl_auth_enable = yes
260 smtpd_sasl_security_options = noanonymous
261 #smtpd_sasl_application_name = smtpd
262 #smtpd_client_restrictions = permit_sasl_authenticated,reject
263 #smtpd_client_restrictions = permit_sasl_authenticated
264 smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
:wq
[root@mail named]# service saslauthd start
[root@mail named]#chkconfig saslauthd on
[root@mail named]# service postfix restart
[root@mail named]#chkconfig postfix on
[root@mail named]# useradd user1
[root@mail named]# passwd user1
[root@mail named]# useradd user2
[root@mail named]# passwd user2
[root@mail Server]# yum install -y squirrelmail-1.4.8-5.el5_3.7.noarch.rpm
[root@mail Server]# service httpd start
[root@mail Server]# chkconfig httpd on
[root@mail Server]# cd /usr/share/squirrelmail/
[root@mail ~]# cd /var/www/html/
[root@mail html]# ln -s /usr/share/squirrelmail/ mail
[root@mail html]# ll
[root@mail html]# cd mail/
[root@mail mail]# cd config/
[root@mail config]# ./conf.pl【对web访问页面的一些设置,可根据需要来自行修改】
[root@mail ~]# yum install dovecot –y
[root@mail ~]# service dovecot start
[root@mail ~]# chkconfig dovecot on
试验完成进行测试:
clip_p_w_picpath002
接收成功
clip_p_w_picpath004