免费注册 查看新帖 |

Chinaunix

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

[Mail] 关于smtp认证的错误日志,大家给看看是什么问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-27 23:14 |只看该作者 |倒序浏览
在客户端用oe法送邮件,产生如下错误日志:

Apr 27 23:07:13 localhost postfix/smtpd[2481]: connect from unknown[61.49.136.53]
Apr 27 23:07:13 localhost postfix/smtpd[2481]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Apr 27 23:07:13 localhost postfix/smtpd[2481]: warning: unknown[61.49.136.53]: SASL LOGIN authentication failed
Apr 27 23:07:13 localhost postfix/smtpd[2481]: lost connection after AUTH from unknown[61.49.136.53]
Apr 27 23:07:13 localhost postfix/smtpd[2481]: disconnect from unknown[61.49.136.53]

论坛徽章:
0
2 [报告]
发表于 2006-04-27 23:40 |只看该作者
smtpd.conf文件没有

论坛徽章:
0
3 [报告]
发表于 2006-04-28 00:04 |只看该作者
参考了网上的一些资料作了如下操作,不过还是不行:

[root@test root]# vi /etc/rc.d/rc.local
# 在這個檔案當中最底下新增一行:
/usr/sbin/pwcheck
# 並且立刻執行這個 daemon 喔:
[root@test root]# /usr/sbin/pwcheck


[root@test root]# cd /usr/lib/sasl
[root@test sasl]# echo 'pwcheck_method: pwcheck'  >  smtpd.conf

# 上面這樣做完之後,系統就知道了:
1. postfix 要用 SMTP 認證時會去讀取 /usr/lib/sasl/smtpd.conf 並且知道
  是以 pwcheck 這支程式進行身份認證的動作;
2. 而 pwcheck 這支程式會主動去讀取 /etc/shadow ,裡面的密碼做認證


我执行:/usr/sbin/pwcheck,不过系统里面没有这个?

论坛徽章:
0
4 [报告]
发表于 2006-04-28 00:16 |只看该作者
解决了吗?没有吧

论坛徽章:
0
5 [报告]
发表于 2006-04-28 00:24 |只看该作者
原帖由 scyzxp 于 2006-4-28 00:16 发表
解决了吗?没有吧


没有解决,望赐教!

论坛徽章:
0
6 [报告]
发表于 2006-04-28 00:26 |只看该作者
我后来又按照这个设置:

3. 準備建立 Postfix 與 cyrus SASL 使用的簡易設定檔:
[root@test lib]# cd /usr/lib/sasl2
[root@test sasl2]# echo 'pwcheck_method: saslauthd' > smtpd.conf  
[root@test sasl2]# echo 'mech_list:plain login'  >>  smtpd.conf  
# 注意了!一般來說, Postfix 會使用 SASL 這個函式庫裡面相關的設定檔,
# /usr/lib/sasl2/smtpd.conf 這個檔案的設定就是 Postfix 的預設使用 SASL 的
# 參數檔案,與 1.5.xx 版本不太相同的地方是, 2.xx 版本使用不同的機制:
auxprop :使用 sasldb2 這個共享資料庫,同樣需要使用共享密碼檔案喔!
     所以一般來說,單純的 Postfix 比較少使用這種機制;
saslauthd:使用 saslauthd 這個 daemon 進行認證的工作,所以幾乎
     不需要其他的設定值哪,指定 saslauthd 就好啦! ^_^
pwcheck :使用與 1.5 版相似的認證 daemon ,不過在 2.xx 版本裡面這個模式
     支援度比較沒有這麼好的啦,所以請愛用 saslauthd 囉!
# 我們使用 SASL 預設的 saslauthd 這支程式做為密碼認證的 daemon。
# 至於 mech_list:plain login 是列出支援的認證機制的意思,我們使用的
# 是極為簡單的 login 與 plain 兩種機制而已!

4. 建立一些需要的參數:
[root@test sasl2]# vi /etc/man.config
# 新增底下這一行之後,未來我們就可以透過 man 這個工具來查詢 sasl  
# 相關的指令的用法了!而不需要修改任何咚咚!不過要注意的是,
# 這個檔案在每個 Linux distributions 當中不見得相同,例如 Open Linux  
# 檔名是 /etc/man.conf 呢!
MANPATH /usr/local/cyrus-sasl2/man

5. 檢驗 saslauthd 這支程式是否可行!
# 在 cyrus-sasl 的原始碼裡面提供了一支小程式用來判斷 saslauthd 的認證機制
# 是否成功的啟動了,這個小程式就是 testsaslauthd 囉!在剛剛原始碼目錄下,
# 所以你可以這樣做:
[root@test sasl2]# /usr/local/cyrus-sasl2/sbin/saslauthd -a shadow
# 執行之後, saslauthd 的 PID 會被紀錄到 /var/run/mux.pid 這個檔案!
[root@test sasl2]# cd /usr/local/src/cyrus-sasl-2.1.12/saslauthd/
[root@test saslauthd]# make testsaslauthd
[root@test saslauthd]# ./testsaslauthd -u userID -p 'yours.passwd'
0: OK "Success."
# 若顯示 OK 的話!那麼就是成功啦!很好!我喜歡~

6. 設定開機時啟動
[root @test saslauthd]# vi /etc/rc.d/rc.local
# 加入這一行:
/usr/local/cyrus-sasl2/sbin/saslauthd -a shadow


还是不行
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP