歡迎您光臨本站 註冊首頁

怎麼才能使得postfix的smtp強制驗證

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

怎麼才能使得postfix的smtp強制驗證

我已經啟動了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
《解決方案》

設置一下smtpd_sender_restrictions。
另你設置了smtpd_recipient_restrictions = permit_sasl_authenticated,reject
外面發進來的郵件能收得到嗎?

不多說了,要不又有某人要說我是postfix的託了。:outu:
《解決方案》

我有設置過,但是還是不可以,我這個讓我很鬱悶,我這個地方設置的smtp伺服器主要是用於用戶smtp.domain.com的時候接入用的,用戶發郵件的時候必須驗證后才能發,你說的外網郵件不能發進來,那是在mx記錄的伺服器上設置的,哪裡的安全級別和伺服器設置有寫不一樣的,
《解決方案》

你這台伺服器是只用來發信和接收內部郵件的?
「但是現在用戶還是可以不驗證就發信」,maillog中是如何體現的。postconf -n也貼一下。
《解決方案》

我上面的也就是使用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
《解決方案》

不是smtpd_sender_restriction
是smtpd_sender_restrictions
《解決方案》

兄台,火眼金睛啊,但是把這個配置上了后還是不可以,絕望了,用戶不驗證還是可以發送郵件,
這一切都是為什麼啊?
《解決方案》

你說的不用驗證就能發信,是指用客戶端不勾上「我的發送伺服器(smtp)要求驗證」就能發信,還是telnet測試不用驗證就能發信?
《解決方案》

用telnet就不成功,用戶用telnet直接不驗證也能發郵件;

但是直接驗證了,也是可以的,就是不知道為啥,不能強制用戶驗證后才能發郵件;
《解決方案》

把你telnet測試的過程發下看看,不用驗證就能發信,那不就是open relay了。

[火星人 ] 怎麼才能使得postfix的smtp強制驗證已經有1235次圍觀

http://coctec.com/docs/service/show-post-21662.html