Linux┊sasl问题解惑

Category : 工作学习 / Tags : , / Date : 2009.04.03 / /

  最近在学习如何用Postfix搭建Mail Server,之前有看过网上一些相关的文章大致分为两种方法实现:一种是Postfix+Cyrus SASL+Courier-IMAP,一种是Postfix+Dovecot。开始的理解一直认为实现SMTP认证就一定要用到Cyrus SASL这个套件,但在网上一些Postfix+Dovecot文档中并没有用到Cyrus SASL这个套件,一直很疑惑这种方案是如何实现SMTP认证的?今天在仔细研究Postfix的main.cf配置文件时,终于把这个问题的搞清楚了。

  这是Postfix+Dovecot方案中Sasl配置的其中两项,从这两项中很明显能看出它定义的sasl就是用dovecot来验证

smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client

  发现这一点时,GOOGLE到如下两段描述:

SASL stands for "Simple Authentication and Security Layer". SASL itself is nothing more than a list of requirements for authentication mechanisms and protocols to be SASL-compatible as described in RFC 4422. IMAP, POP3 and SMTP protocols all have support for SASL.

Many people confuse SASL with one specific SASL implementation: the Cyrus SASL library. Dovecot has its own SASL implementation which may at some point be separated from Dovecot itself to "compete" against Cyrus SASL library in server side.

Dovecot SASL can already be used with:

Postfix v2.3 and later. See HowTo/PostfixAndDovecotSASL for details.
Exim v4.64 and later. See HowTo/EximAndDovecotSASL for details.

SASL (Simple Authentication Security Layer) is an Internet standards-track method for remote computers to authenticate. The Cyrus SASL library makes supporting various SASL mechanisms easy for both client and server writers.

The Cyrus project is the implementation of an enterprise mail system by the Carnegie Mellon University Computing Services Department. We are interested in scalable, easy to administer systems.

  从上面的描述中能很清楚的看出,SASL其实是一个定义,且全称是"Simple Authentication and Security Layer",而Cyrus SASL是SASL的一种具体实现的套件,而不是开始理解混淆的SASL就是实现SMTP验证的一个套件。Postfix+Dovecot方案中之所以可以不用到Cyrus SASL这个套件是因为Dovecot套件中也有自己SASL的具体实现,Dovecot并不只是一个IMAP+POP3的实现。

  下面是一个在网上找到的一个比较清楚的关于Cyrus SASL Libary的文章,可以去参考下:

  Cyrus SASL Libary学习

  http://blog.chinaunix.net/u/4929/showart_110441.html

  最后感叹下,其实这个问题并不是一个复杂的问题,只不过国内网上给出的方案都只侧重如何配置,并没有很系统写清楚这么做的原因(之其然不知其所以然在我看来可不是个好的学习方法)。这样的文档的确会让新手们找不到北。其实这样的问题官方都有比较详细的描述,看来加强英文学习是很重要的,这样可以有更多的参考!



无觅相关文章插件,快速提升流量

Comments

There are no comments.

Leave a Reply

You must be logged in to post a comment.

传奇 似水流年 绽放 风筝 八月照相馆