Chinaunix首页 | 论坛 | 博客
  • 博客访问: 196080
  • 博文数量: 25
  • 博客积分: 2030
  • 博客等级: 大尉
  • 技术积分: 335
  • 用 户 组: 普通用户
  • 注册时间: 2009-05-05 02:49
文章分类

全部博文(25)

文章存档

2012年(1)

2011年(1)

2010年(2)

2009年(21)

我的朋友

分类:

2009-07-07 00:57:32

postfix编译方法不是普通流程,postfix的LDAP,MYSQL,PCRE,PostgreSQL,SASL,Berkeley和SSL等功能支持需要在编译的时候就指定,如何编译查看readme文档里面详细情况。

添加postfix的SASL支持
make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'

DDEF_SERVER_SASL_TYPE的目的是以后不用再在main.cf里指定SASL类型了
用make;make install编译安装,然后测试
[root@www postfix-2.6.2]# /usr/sbin/postconf -a
dovecot
发现安装成功


启用postfix的SASL支持
/etc/postfix/main.cf:
        smtpd_sasl_auth_enable = yes


启用SASL的支持还不够,还需要让postfix和dovecot之间的SASL模块相互关联
postfix对dovecot关联进行的设置(这个是默认设置)
/etc/postfix/main.cf:
        smtpd_sasl_type = dovecot
        smtpd_sasl_path = smtpd
dovecot对postfix关联进行的设置
    /some/where/dovecot.conf:
        auth default {
          mechanisms = plain login
          passdb pam {
          }
          userdb passwd {
          }
          socket listen {
            client {
              path = /var/spool/postfix/private/auth
              mode = 0660
              user = postfix
              group = postfix
            }
          }
        }


为了让远程SMTP用户能进行SASL认证,需要
  /etc/postfix/main.cf:
        smtpd_recipient_restrictions =
            permit_mynetworks
            permit_sasl_authenticated   //添加此行
            reject_unauth_destination


测试SASL
    $ telnet server.example.com 25
    . . .
    220 server.example.com ESMTP Postfix
    EHLO client.example.com
    250-server.example.com
    250-PIPELINING
    250-SIZE 10240000
    250-ETRN
    250-AUTH DIGEST-MD5 PLAIN CRAM-MD5
    250 8BITMIME
    AUTH PLAIN AHRlc3QAdGVzdHBhc3M=
    235 Authentication successful

阅读(1149) | 评论(0) | 转发(0) |
0

上一篇:系统集成策略及运作方案

下一篇:bind安装

给主人留下些什么吧!~~