LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1447|回复: 2

急...postfix的SMTP验证无法通过.急...在线等!!!

[复制链接]
发表于 2007-3-31 16:57:43 | 显示全部楼层 |阅读模式
环境:  red AS3     Postfix + Cyrus-IMAP + Cyrus-SASL + MySQL + IMP
参考文献: http://cngnu.org/technology/Postfix_I.html

验证SMTP失败.
telnet 本机25端口的时候停住没有反映了.ctrl+c 也退不出来,只能杀进程...

现象:
[root@mail root]# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to mail (127.0.0.1).
Escape character is '^]'.
-



就停在这不动了......555


我用的软件包版本都是王大哥写的完全相同,前面的mysql,  pam_mysql  ,  cyrus-sasl  ,postfix 的编译都没有任何错误,但为什么不能telnet呢?有的朋友说是telnet没装,但教程上也没说要装.

rpm -qa |grep telnet 查询结果是:  
telnet-0.17-26


但/etc/xinetd.d下的 krb5-telnet 是未启动的.------这个是否要启动呢?


我还感觉与主机名和域名好像有点关系.所以提供 /etc/hosts  和  /etc/sysconfig/network  2个文件的内容.
hosts:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost



network:
NETWORKING=yes
HOSTNAME=localhost.localdomain



主配置文件 main.cf 是把以下内容直接粘贴在原文件的末尾的:
myhostname = mail.cngnu.org
mydomain = cngnu.org
myorigin = $mydomain
mydestination = $mydomain,$myhostname
mynetworks_style = host
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

home_mailbox = Maildir/

mailbox_transport = cyrus
fallback_transport = cyrus

virtual_maps = hash:/etc/postfix/virtual,mysql:/etc/postfix/virtual.mysql

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous

smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    check_recipient_access mysql:/etc/postfix/filter.mysql,
    reject_invalid_hostname,
    reject_non_fqdn_hostname,
    reject_unknown_sender_domain,
    reject_non_fqdn_sender,
    reject_non_fqdn_recipient,
    reject_unknown_recipient_domain,
    reject_unauth_pipelining,
    reject_unauth_destination,
    permit


netatat -a 的显示:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 *:32768                 *:*                     LISTEN      
tcp        0      0 localhost.localdo:32769 *:*                     LISTEN      
tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      
tcp        0      0 *:sunrpc                *:*                     LISTEN      
tcp        0      0 *:ssh                   *:*                     LISTEN      
tcp        0      0 localhost.localdoma:ipp *:*                     LISTEN      
tcp        0      0 *:smtp                  *:*                     LISTEN      
udp        0      0 *:32768                 *:*                                 
udp        0      0 *:957                   *:*                                 
udp        0      0 *:sunrpc                *:*                                 
udp        0      0 *:ipp                   *:*                                 
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     STREAM     LISTENING     6382   private/cyrus
unix  2      [ ACC ]     STREAM     LISTENING     6386   private/uucp
unix  2      [ ACC ]     STREAM     LISTENING     6390   private/ifmail
unix  2      [ ACC ]     STREAM     LISTENING     6394   private/bsmtp
unix  2      [ ACC ]     STREAM     LISTENING     2397   /tmp/.font-unix/fs7100
unix  2      [ ACC ]     STREAM     LISTENING     2359   /dev/gpmctl
unix  12     [ ]         DGRAM                    1673   /dev/log
unix  2      [ ACC ]     STREAM     LISTENING     3033   /var/run/saslauthd/mux
unix  2      [ ACC ]     STREAM     LISTENING     6319   public/cleanup
unix  2      [ ACC ]     STREAM     LISTENING     6326   private/rewrite
unix  2      [ ACC ]     STREAM     LISTENING     6330   private/bounce
unix  2      [ ACC ]     STREAM     LISTENING     6334   private/defer
unix  2      [ ACC ]     STREAM     LISTENING     6338   public/flush
unix  2      [ ACC ]     STREAM     LISTENING     6342   private/proxymap
unix  2      [ ACC ]     STREAM     LISTENING     6346   private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     6350   private/relay
unix  2      [ ACC ]     STREAM     LISTENING     6354   public/showq
unix  2      [ ACC ]     STREAM     LISTENING     6358   private/error
unix  2      [ ACC ]     STREAM     LISTENING     6362   private/local
unix  2      [ ACC ]     STREAM     LISTENING     6366   private/virtual
unix  2      [ ACC ]     STREAM     LISTENING     6370   private/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     2842   /var/lib/mysql/mysql.sock
unix  2      [ ACC ]     STREAM     LISTENING     6374   private/maildrop
unix  2      [ ACC ]     STREAM     LISTENING     6378   private/old-cyrus




以下是maillog的记录:

Mar 29 04:41:35 localhost postfix/master[6113]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Mar 29 04:42:35 localhost postfix/smtpd[9283]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Mar 29 04:42:36 localhost postfix/master[6113]: warning: process /usr/libexec/postfix/smtpd pid 9283 exit status 1
Mar 29 04:42:36 localhost postfix/master[6113]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Mar 29 04:43:36 localhost postfix/smtpd[9284]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Mar 29 04:43:37 localhost postfix/master[6113]: warning: process /usr/libexec/postfix/smtpd pid 9284 exit status 1
Mar 29 04:43:37 localhost postfix/master[6113]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling
Mar 29 04:44:37 localhost postfix/smtpd[9290]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Mar 29 04:44:38 localhost postfix/master[6113]: warning: process /usr/libexec/postfix/smtpd pid 9290 exit status 1
Mar 29 04:44:38 localhost postfix/master[6113]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling



我知道是红字的地方除了问题,但是看不太明白是什么原因,帮我解答下吧!~~~
不知道我提供的东西能不能判断错误,还需要什么请直接说,我马上就提供.
发表于 2007-4-2 11:00:22 | 显示全部楼层
查一下你的master.cf 中smtp配的对不
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-2 17:28:31 | 显示全部楼层
日志显示  fatal: parameter "smtpd_recipient_restrictions
没有设定允许的域,在哪里设定呢,小弟初学,能不能说详细点...
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表