免费注册 查看新帖 |

Chinaunix

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

[Mail] 怎么才能使得postfix的smtp强制验证 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-23 11:15 |只看该作者 |倒序浏览
我已经启动了postfix的smtp的强制验证功能,但是现在用户还是可以不验证就发信,我是用的postfix 2.3.3和openldap集成,怎么办了?
postfix的配置如下:


alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mail_spool_directory = /var/spool/mail
mydestination = $myhostname
mydomain = hw01.com
myhostname = ap01.hw01.com
mynetworks = 10.0.0.0/8
myorigin = $mydomain
relay_domains = hash:/etc/postfix/relay_domains
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd

transport_maps = ldap:/etc/postfix/transport_maps
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:1000
virtual_minimum_uid = 1000
virtual_transport = virtual
virtual_uid_maps = static:1000

论坛徽章:
0
2 [报告]
发表于 2009-02-23 11:37 |只看该作者
设置一下smtpd_sender_restrictions。
另你设置了smtpd_recipient_restrictions = permit_sasl_authenticated,reject
外面发进来的邮件能收得到吗?

不多说了,要不又有某人要说我是postfix的托了。

论坛徽章:
0
3 [报告]
发表于 2009-02-23 11:53 |只看该作者
我有设置过,但是还是不可以,我这个让我很郁闷,我这个地方设置的smtp服务器主要是用于用户smtp.domain.com的时候接入用的,用户发邮件的时候必须验证后才能发,你说的外网邮件不能发进来,那是在mx记录的服务器上设置的,哪里的安全级别和服务器设置有写不一样的,

论坛徽章:
0
4 [报告]
发表于 2009-02-23 13:37 |只看该作者
你这台服务器是只用来发信和接收内部邮件的?
“但是现在用户还是可以不验证就发信”,maillog中是如何体现的。postconf -n也贴一下。

论坛徽章:
0
5 [报告]
发表于 2009-02-23 16:59 |只看该作者
我上面的也就是使用postconf -n 出来的结果,maillog里面完全是正确的反馈,
另外今天还发现一个奇怪的现象,我在/etc/postfix/main.cf里添加的某些配置,但是用postconf -n没有出现这个配置的值,

这个是main.cf的值:
myhostname = ap01.hw01.com
mydomain = hw01.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname
mynetworks = 10.0.0.0/8
mail_spool_directory = /var/spool/mail
alias_maps = hash:/etc/aliases
smtpd_banner = $myhostname ESMTP
unknown_local_recipient_reject_code = 550
virtual_transport = virtual
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
#/*==========================relay
relay_domains= hash:/etc/postfix/relay_domains
#relay_recipient_maps = ldap:/etc/postfix/relay_recipient_maps
transport_maps = ldap:/etc/postfix/transport_maps
#====================================================================auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = smtpd
smtpd_recipient_restrictions = permit_sasl_authenticated,reject
unknown_local_recipient_reject_code = 550
smtpd_sasl_application_name = smtpd
smtpd_sender_restriction = permit_sasl_authenticated,reject

但是用postconf -n出来的值如下:
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mail_spool_directory = /var/spool/mail
mydestination = $myhostname
mydomain = hw01.com
myhostname = ap01.hw01.com
mynetworks = 10.0.0.0/8
myorigin = $mydomain
relay_domains = hash:/etc/postfix/relay_domains
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_sasl_authenticated,reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd
transport_maps = ldap:/etc/postfix/transport_maps
unknown_local_recipient_reject_code = 550
virtual_gid_maps = static:1000
virtual_minimum_uid = 1000
virtual_transport = virtual
virtual_uid_maps = static:1000

论坛徽章:
0
6 [报告]
发表于 2009-02-23 17:22 |只看该作者
不是smtpd_sender_restriction
是smtpd_sender_restrictions

论坛徽章:
0
7 [报告]
发表于 2009-02-23 17:37 |只看该作者
兄台,火眼金睛啊,但是把这个配置上了后还是不可以,绝望了,用户不验证还是可以发送邮件,
这一切都是为什么啊?

论坛徽章:
0
8 [报告]
发表于 2009-02-24 08:55 |只看该作者
你说的不用验证就能发信,是指用客户端不勾上“我的发送服务器(smtp)要求验证”就能发信,还是telnet测试不用验证就能发信?

论坛徽章:
0
9 [报告]
发表于 2009-02-24 10:31 |只看该作者
用telnet就不成功,用户用telnet直接不验证也能发邮件;

但是直接验证了,也是可以的,就是不知道为啥,不能强制用户验证后才能发邮件;

论坛徽章:
0
10 [报告]
发表于 2009-02-24 11:34 |只看该作者
把你telnet测试的过程发下看看,不用验证就能发信,那不就是open relay了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP