免费注册 查看新帖 |

Chinaunix

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

[网络管理] 搭建Postfix邮件服务器时候配置smtp时候telnet 测试失败 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-01-02 15:42 |只看该作者 |倒序浏览
配置smtp
[root@mail ~]# rpm -qa | grep  sasl
cyrus-sasl-plain-2.1.22-5.el5_4.3
cyrus-sasl-lib-2.1.22-5.el5_4.3
cyrus-sasl-2.1.22-5.el5_4.3
[root@mail ~]# saslauthd -v
saslauthd 2.1.22
authentication mechanisms: getpwent kerberos5 pam rimap shadow ldap
[root@mail ~]# vi /etc/sysconfig/saslauthd
MECH=shadow                              //将认证方式改为shadow
[root@mail ~]# /etc/init.d/saslauthd start
Starting saslauthd:                                        [  OK  ]
[root@mail ~]# chkconfig --level 35 saslauthd on
[root@mail ~]# useradd mail1                  //创建一个mail1用户,用来测试
[root@mail ~]# passwd mail1
Changing password for user mail1.
New UNIX password:123456.
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:123456.
passwd: all authentication tokens updated successfully.

[root@localhost Server]# service saslauthd stop
/etc/sysconfig/saslauthd: line 1: unexpected EOF while looking for matching `''
/etc/sysconfig/saslauthd: line 12: syntax error: unexpected end of file
Stopping saslauthd:                                        [  OK  ]
[root@localhost Server]# saslauthd -a shadow
[root@mail ~]# testsaslauthd -u mail1 -p '123456'
0: OK "Success."                              //验证成功
[root@localhost ~]# vi /etc/postfix/main.cf
在main.cf 中加入如下配置。

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = ''
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous

[root@mail ~]# postfix reload                      //重新加载postfix
postfix/postfix-script: refreshing the Postfix mail system

[root@mail ~]# telnet  192.168.42.106 25 //测试
telnet: connect to address 192.168.42.106: Connection refused
telnet: Unable to connect to remote host: Connection refused
测试失败了 不知问题出在哪,求各路大神指教,菜鸟飘过~~~

论坛徽章:
0
2 [报告]
发表于 2013-01-02 15:47 |只看该作者
{:3_196:}求搭救

论坛徽章:
0
3 [报告]
发表于 2013-01-02 17:37 |只看该作者
有没有 人在

论坛徽章:
3
水瓶座
日期:2013-08-19 19:03:1715-16赛季CBA联赛之八一
日期:2016-02-25 18:02:4715-16赛季CBA联赛之佛山
日期:2017-03-27 14:08:12
4 [报告]
发表于 2013-01-02 20:34 |只看该作者
  1. netstat -ntupl  
复制代码
25端口有没有监听?

论坛徽章:
0
5 [报告]
发表于 2013-01-02 21:06 |只看该作者
回复 4# 2008ohmygod


[root@localhost Server]# netstat -tnl |grep
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN   



这一步么?

论坛徽章:
0
6 [报告]
发表于 2013-01-02 21:08 |只看该作者
回复 5# 520啊啊a


[root@localhost Server]# netstat -tnl |grep 25
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN   

这一步么

论坛徽章:
33
荣誉会员
日期:2011-11-23 16:44:17天秤座
日期:2014-08-26 16:18:20天秤座
日期:2014-08-29 10:12:18丑牛
日期:2014-08-29 16:06:45丑牛
日期:2014-09-03 10:28:58射手座
日期:2014-09-03 16:01:17寅虎
日期:2014-09-11 14:24:21天蝎座
日期:2014-09-17 08:33:55IT运维版块每日发帖之星
日期:2016-04-17 06:23:27操作系统版块每日发帖之星
日期:2016-04-18 06:20:00IT运维版块每日发帖之星
日期:2016-04-24 06:20:0015-16赛季CBA联赛之天津
日期:2016-05-06 12:46:59
7 [报告]
发表于 2013-01-02 22:46 |只看该作者
有个地方指定监听的, 那上面写的 'localhost', 把那一行注释掉就行了 .

论坛徽章:
3
水瓶座
日期:2013-08-19 19:03:1715-16赛季CBA联赛之八一
日期:2016-02-25 18:02:4715-16赛季CBA联赛之佛山
日期:2017-03-27 14:08:12
8 [报告]
发表于 2013-01-02 23:58 |只看该作者
回复 6# 520啊啊a


main.cf中,将
  1. inet_interfaces = localhost
复制代码
改成
  1. inet_interfaces = all
复制代码
  1. service postfix reload
复制代码

论坛徽章:
0
9 [报告]
发表于 2013-01-03 15:10 |只看该作者
回复 7# q1208c


    可以了,万分感谢

论坛徽章:
0
10 [报告]
发表于 2013-01-03 15:11 |只看该作者
回复 8# 2008ohmygod


    果然是这里错了,测试成功了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP