postfix邮件服务器的安装

主要分以下步骤:

 1)关闭sendmail

 2)用yum安装bind-*即DNS的配置

 3)yum安装postfix,配置其主配置文件/etc/postfix/main.cf

 4)安装cyrus-sasl,配置/etc/sysconfig/saslauthd

 5)安装dovecot并进行配置

 6)安装cyrus-imapd进行配置

 7)安装webmial主要是sqairrelmail的配置

 8)登陆webmial服务器进行相关的验证

具体步骤如下:

 1)service sendmail stop //chkconfig sendmail off

 2)安装DNS,yum install bind-*

   a)复制named.conf模板:cp  -p /usr/share/doc/bind-9/sample/etc/named.conf /var/named/chroot/etc/named.conf

vim /var/named/chroot/etc/named.conf

 options {

        directory "/var/named/";

 };

 zone  "vfast.com" {

        type master;

        file "vfast.com.zone";

 };

:wq!

  b)  cp -p /usr/share/doc/bind-9/sample/var/named/localdomain.zone /var/named/chroot/var/named/vfast.com.zone

 vim /var/named/chroot/var/named/vfast.com.zone

 @   IN SOA mail.vfast.com.  root.vfast.com. (

                                   2013091202 ;

                                   3H         ;

                                   15M        ;

                                   1W         ;

                                   1D )       ;

vfast.com.      IN NS     mail.vfast.com.

mail.vfast.com. IN A      192.168.8.10

vfast.com.      IN MX 10  mail.vfast.com.

:wq!

service named restart

3) 安装postfix ,yum install postfix

 vim /etc/postfix/main.cf

 myhostname = mail.vfast.com    //69

 mydomain = vfast.com           //77

 myorigin = $mydomain           //93

 inet_interfaces = all          //107

 #inet_interfaces = localhost   //110

 mydestination = $myhostname,$mydomain //155

 mynetworks = 192.168.8.0/24,127.0.0.0/8  //255

 relay_domains = vfast.com  //287

 4)yum install cyrus-sasl    

   vim /etc/sysconfig/saslauthd

   MECH = shadow

 5)service saslauthd restart // chkconfig saslauthd on

 6)useradd test //passwd test 密码也为test

   testsaslauthd -u test -p test

 7)vim /etc/postfix/main.cf

   末行添加如下6行内容进行SMTP和postfix的整合

   smtpd_sasl_auth_enable = yes   //开启SMTP功能验证

   smtpd_sasl_local_domain = ''   //验证本域的

   smtpd_recipient_restrictions =  permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

   broken_sasl_auth_clients = yes  //打破客户端的验证

   smtpd_client_restrictions = permit_sasl_authenticated  //客户端的验证

   smtpd_sasl_security_options = noanonymous //不允许匿名用户登录

 8) service postfix restart //chkconfig postfix on

 9) yum install dovecot

    vim /etc/dovecot.conf

   protocols = pop3 pop3s

  protocol pop3 {

          listen = *:10100

   #     ..

   }

   :wq!

 10)service dovecot restart //chkconfig dovecot on

 11)yum install cyrus-imapd  //后台管理用户的邮箱

   cyrus passwd 密码为123456

   cyradm -u cyrus localhost

   输入密码123456然后创建用户 cm user.test 退出quit

 12)yum install squirrelmail

    /usr/share/squirrelmail/config/config.pl

   d----cyrus

   2---1--vfast.com  3---2--s-

   4---5--true

   10--1--zh-CN 2--gb2312

   r---s--q

   service httpd restart

 13) vim /etc/postfix/main.cf

   mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp 将#注释掉

   service postfix restart

 14) http://mail.vfast.com/webmial

     用户和密码均是test进行收发邮件的测试

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值