免费注册 查看新帖 |

Chinaunix

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

[Mail] postfix sasl saslauthd Connection refused [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-08 17:22 |只看该作者 |倒序浏览
root@kernel:/var/log# testsaslauthd -u kkk -p kkk
connect() : No such file or directory

when i
0: root@kernel:/var/log# saslauthd -a shadow
saslauthd[4758] :main            : could not chdir to: /var/run/saslauthd
saslauthd[4758] :main            : chdir: No such file or directory
saslauthd[4758] :main            : Check to make sure the directory exists and is
saslauthd[4758] :main            : writeable by the user this process runs as.

出错。有没有好的解决方法。



装了一个unbuntu 7.10的系统。apt-get sasl-bin2 postfix
root@kernel:/var/log# aptitude search sasl2
p   cyrus-sasl2-dbg                               - Debugging symbols for Cyrus SASL                       
i   cyrus-sasl2-doc                               - Documentation for Cyrus SASL library and utilities     
p   cyrus-sasl2-heimdal-dbg                       - Debugging symbols for Cyrus SASL                       
i   libsasl2-2                                    - Authentication abstraction library                     
p   libsasl2-dev                                  - Development files for SASL authentication abstraction l
i   libsasl2-modules                              - Pluggable Authentication Modules for SASL              
p   libsasl2-modules-gssapi-heimdal               - Pluggable Authentication Modules for SASL (GSSAPI)     
p   libsasl2-modules-gssapi-mit                   - Pluggable Authentication Modules for SASL (GSSAPI)     
p   libsasl2-modules-ldap                         - Pluggable Authentication Modules for SASL (LDAP)      
p   libsasl2-modules-otp                          - Pluggable Authentication Modules for SASL (OTP)        
p   libsasl2-modules-sql                          - Pluggable Authentication Modules for SASL (SQL)        
i   sasl2-bin                                     - Administration programs for SASL users database
root@kernel:/var/log# aptitude search postfix
p   bld-postfix                                   - Postfix tools for the Black List Daemon               
p   dtc-postfix-courier                           - web control panel for admin and accounting hosting serv
p   gforge-mta-postfix                            - collaborative development tool - mail tools (using Post
i   postfix                                       - High-performance mail transport agent                  
p   postfix-cdb                                   - CDB map support for Postfix                           
p   postfix-dev                                   - Loadable modules development environment for Postfix   
i   postfix-doc                                   - Documentation for Postfix                              
p   postfix-gld                                   - greylisting daemon for postfix, written in C, uses MySQ
p   postfix-ldap                                  - LDAP map support for Postfix                           
p   postfix-mysql                                 - MYSQL map support for Postfix                          
p   postfix-pcre                                  - PCRE map support for Postfix                           
p   postfix-pgsql                                 - PGSQL map support for Postfix                          
p   postfix-policyd                               - anti-spam plugin for Postfix                           
p   postfix-policyd-spf-perl                      - pure-Perl Postfix policy daemon for RFC 4408 compliant
p   postfix-smtpguard                             - smtpguard policy service daemon for Postfix            
v   postfix-tls                                   -         
root@kernel:/var/log# cat /proc/version
Linux version 2.6.22-14-server (buildd@terranova) (gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec

18 08:31:40 UTC 2007


root@kernel:/var/log# vim /etc/default/saslauthd
#
# Settings for saslauthd daemon
#

# Should saslauthd run automatically on startup? (default: no)
#START=no
START=yes


PWDIR="/var/spool/postfix/var/run/saslauthd"       # this is change i add
PARAMS="-m ${PWDIR}"
PIDFILE="${PWDIR}/saslauthd.pid"




# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent  -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam       -- use PAM
# rimap     -- use a remote IMAP server
# shadow    -- use the local shadow password file
# sasldb    -- use the local sasldb database file
# ldap      -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
#MECHANISMS="pam"
MECHANISMS="shadow"

# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
#MECH_OPTIONS=""

# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5

# Other options (default: -c)
# See the saslauthd man page for information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
# Note: See /usr/share/doc/sasl2-bin/README.Debian
#OPTIONS="-c"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"



root@kernel:/var/log#dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
root@kernel:/var/log#adduser postfix sasl


root@kernel:/var/log# ps aux|grep sasl
root      4738  0.0  0.0   7452   748 ?        Ss   17:06   0:00 /usr/sbin/saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5
root      4739  0.0  0.0   7452   476 ?        S    17:06   0:00 /usr/sbin/saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5
root      4740  0.0  0.0   7452   360 ?        S    17:06   0:00 /usr/sbin/saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5
root      4741  0.0  0.0   7452   360 ?        S    17:06   0:00 /usr/sbin/saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5
root      4743  0.0  0.0   7452   360 ?        S    17:06   0:00 /usr/sbin/saslauthd -a shadow -c -m /var/spool/postfix/var/run/saslauthd -n 5


root@kernel:/var/log# testsaslauthd -u kkk -p kkk
connect() : No such file or directory

when i
0: root@kernel:/var/log# saslauthd -a shadow
saslauthd[4758] :main            : could not chdir to: /var/run/saslauthd
saslauthd[4758] :main            : chdir: No such file or directory
saslauthd[4758] :main            : Check to make sure the directory exists and is
saslauthd[4758] :main            : writeable by the user this process runs as.
root@kernel:/var/log#
root@kernel:/var/log# mkdir /var/run/saslauthd
root@kernel:/var/log# saslauthd -a shadow
root@kernel:/var/log# testsaslauthd -u kkk -p kkk
0: OK "Success."

root@kernel:/var/log#
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#submission inet n       -       -       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
"/etc/postfix/master.cf" 77L, 4035C

[ 本帖最后由 weifeng270 于 2008-1-9 09:50 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-01-08 21:43 |只看该作者
自己顶一顶。强人那去了。还是描述不全面。

论坛徽章:
0
3 [报告]
发表于 2008-01-09 00:01 |只看该作者
root@kernel:~# dpkg-statoverride --list
root postdrop 02555 /usr/sbin/postqueue
root sasl 660 /etc/sasldb2
postfix postdrop 02710 /var/spool/postfix/public
root sasl 755 /var/spool/postfix/var/run/saslauthd
root postdrop 02555 /usr/sbin/postdrop




add this new line   a new question

root@kernel:~# testsaslauthd -u kkk -p kkk
connect() : Connection refused

论坛徽章:
0
4 [报告]
发表于 2008-01-09 00:03 |只看该作者
mail can't use sasl so no log
Jan  8 14:31:34 kernel postfix/master[4261]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 21:53:18 kernel postfix/master[4261]: terminating on signal 15
Jan  8 21:54:12 kernel postfix/master[4214]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 22:32:01 kernel postfix/master[4214]: terminating on signal 15
Jan  8 22:32:33 kernel postfix/master[4864]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 22:33:49 kernel postfix/master[4864]: terminating on signal 15
Jan  8 22:33:49 kernel postfix/master[4968]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 22:36:23 kernel postfix/master[4968]: terminating on signal 15
Jan  8 22:36:23 kernel postfix/master[5057]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 22:54:33 kernel postfix/master[5057]: terminating on signal 15
Jan  8 22:59:51 kernel postfix/master[5486]: daemon started -- version 2.4.5, configuration /etc/postfix
Jan  8 23:14:23 kernel postfix/master[5486]: terminating on signal 15
Jan  8 23:14:24 kernel postfix/master[5784]: daemon started -- version 2.4.5, configuration /etc/postfix

论坛徽章:
0
5 [报告]
发表于 2008-01-09 20:14 |只看该作者
真是个垃圾坛子。麻烦版主关掉。谢了。

论坛徽章:
0
6 [报告]
发表于 2008-01-10 11:00 |只看该作者

回复 #5 weifeng270 的帖子

强人可能没空帮你分析一大堆 配置,确实很头疼:),如果是新手,找个安装简单的邮件系统来用吧

论坛徽章:
0
7 [报告]
发表于 2008-01-10 23:16 |只看该作者
噢 这不是放弃的借口啊。我的问题解决了。

论坛徽章:
0
8 [报告]
发表于 2008-01-10 23:16 |只看该作者
啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦啦

论坛徽章:
0
9 [报告]
发表于 2008-01-10 23:17 |只看该作者
以前是saslauthd pam mysql
我现在想 postfix mysql 哈哈。。。啦啦。。。我再去试一下。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP