免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3715 | 回复: 4
打印 上一主题 下一主题

[Mail] 能不能讲一下pam_mysql pam sasl和courier-authlib之间的关系? [复制链接]

论坛徽章:
1
双子座
日期:2015-01-04 14:25:06
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-13 23:04 |只看该作者 |倒序浏览
能不能讲一下pam_mysql pam sasl和courier-authlib之间的关系?
这几天一直没能完全理解它们是如何的关系和协同工作的。

论坛徽章:
0
2 [报告]
发表于 2007-11-14 16:19 |只看该作者
sasl 可以使用有几种认证方式,其中一种是通过PAM来认证,
pam_mysql ,为PAM 提供了,MYSQL 认证功能, PAM 也可以使用系统shadow 认证.
倒如用SASL 做 SMTP 认证,使用他的认证功能,
/etc/pam.d/smtp
  1. #%PAM-1.0
  2. auth sufficient pam_mysql.so user=mail passwd=mail host=localhost db=mail_db table=MAILUSER usercolumn=USERNAME passwdcolumn=
  3. PASSWORD crypt=2
  4. account required pam_mysql.so user=mail passwd=mail host=localhost db=mail_db table=MAILUSER usercolumn=USERNAME passwdcolumn
  5. =PASSWORD crypt=2
复制代码
 

google 一下pam_mysql 的用法.

自己建个对应的数据库就行了.

[ 本帖最后由 sunkits 于 2007-11-14 16:21 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2007-11-14 19:35 |只看该作者
SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.
简单的讲,SASL是一个认证框架,它可以为面向连接的协议提供调用可以使用的认证方式来建立依赖于此种认证的连接。

PAM allows integration of various authentication technologies such as UNIX®, Kerberos, RSA, smart cards and DCE into system entry services such as login, passwd, rlogin, telnet, ftp, and su without changing any of these services.
PAM意指可插入式的认证模块,顾名思义,其最初的主要目的是把各种系统或服务登入的功能独立出来做为一个接口存在,并可在此基础之上使用自己的认证方式,从而免去了用户在为某个特定的登入需求的改变而不得不重新编译软件包的使用方式。这听起来类同于SASL,但它比SASL更接近于认证本身。于是SASL可以调用PAM作为其可用认证方式的一种。

PAM本身没有提供从mysql中获取用户信息的方式,因此,pam_mysql对PAM提供了这样一种扩充,使得pam可以从mysql中检索用户名及其密码。

The Courier authentication library provides authentication services for other Courier applications. In this context, the term "authentication" refers to the following functions:

1、Take a userid or a loginid, and a password. Determine whether the loginid and the password are valid.
2、Given a userid, obtain the following information about the userid:
     A、The account's home directory.
     B、The numeric system userid and groupid that owns all files associated with this account.
     C、The location of the account's maildir.
     D、Any maildir quota defined for this account. See the Courier documentation for more information on maildir quotas.
     E、Other miscellaneous account-specific options.
3、Change the password associated with a loginid.
4、Obtain a complete list of all loginids.
简单的讲,courier-authlib是为courier其它的邮件组件提供管理用户登录、认证、权限分派、“家”目录定位等功能的。


打个不甚贴切的比方,假如服务(或系统)是一间房子(即最终目标),SASL就是为这间房子建立的一道围墙,并为其留下一个大门(即入口)并可指派专人来把守。这个把守的人可以是保安(login),也可以是家丁(digest-md5),甚至也可以是管家(PAM);管家的权利比较大些,他甚至可以自己根据来访者的衣着(SHELL),年龄(KERBOSE)等来判断这个来宾是否可以进入。

[ 本帖最后由 marion 于 2007-11-14 19:44 编辑 ]

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
4 [报告]
发表于 2007-11-16 16:54 |只看该作者
用dovecot很爽

论坛徽章:
0
5 [报告]
发表于 2008-07-20 16:38 |只看该作者
原帖由 marion 于 2007-11-14 19:35 发表
SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.
简单的讲,SASL是一个认证框架,它可以为面向连接的协议提供调用可以使 ...


好。非常感谢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP