postfix 邮件服务器身份验证失败

postfix 邮件服务器身份验证失败

我有一个 postfix + amavis 邮件服务器,一切工作正常,除了不知何故我会收到一封我发给我的垃圾邮件...所以我深入研究并进行了以下修改:

vi /etc/postfix/main.cf

smtpd_recipient_restrictions = permit_sasl_authenticated、reject_unauth_destination、check_sender_access 哈希:/etc/postfix/access/sender_access、reject_unknown_sender_domain、warn_if_reject rejection_unverified_sender

mkdir /etc/postfix/access

vi /etc/postfix/access/sender_access

gigi.com 550 你不是我。

postmap /etc/postfix/access/sender_access

/etc/init.d/postfix restart 

现在我必须看看我是否收到了我发来的邮件:)

不管怎样,在/var/log/mail.log我以安全的方式收到以下令我烦恼的消息时,会是好的,错的吗?

我能做些什么来阻止这些来自外部的请求吗?太多了……会造成安全漏洞吗?我的意思是,这些请求是每分钟都在发生的……wt#?

我附上一些mail.log

Oct 13 22:06:34 mail postfix/smtpd[8698]: warning: unknown[191.96.249.61]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:06:34 mail postfix/smtpd[8698]: disconnect from unknown[191.96.249.61]
Oct 13 22:06:34 mail postfix/verify[8777]: close database /var/lib/postfix/verify_cache.db: No such file or directory (possible Berkeley DB bug)
Oct 13 22:06:35 mail postfix/smtpd[8722]: warning: unknown[191.96.249.26]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:06:35 mail postfix/smtpd[8722]: disconnect from unknown[191.96.249.26]
Oct 13 22:06:35 mail postfix/smtpd[8702]: connect from unknown[191.96.249.13]
Oct 13 22:06:43 mail postfix/smtpd[8702]: warning: unknown[191.96.249.13]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:06:43 mail postfix/smtpd[8702]: disconnect from unknown[191.96.249.13]
Oct 13 22:06:56 mail postfix/smtpd[8703]: connect from unknown[191.96.249.61]
Oct 13 22:06:57 mail postfix/smtpd[8698]: connect from unknown[191.96.249.13]
Oct 13 22:06:58 mail postfix/smtpd[8702]: warning: hostname radheengineering.info does not resolve to address 191.96.249.26
Oct 13 22:06:58 mail postfix/smtpd[8702]: connect from unknown[191.96.249.26]
Oct 13 22:07:00 mail postfix/smtpd[8703]: warning: unknown[191.96.249.61]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:07:00 mail postfix/smtpd[8703]: disconnect from unknown[191.96.249.61]
Oct 13 22:07:06 mail postfix/smtpd[8698]: warning: unknown[191.96.249.13]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:07:06 mail postfix/smtpd[8698]: disconnect from unknown[191.96.249.13]
Oct 13 22:07:07 mail postfix/smtpd[8702]: warning: unknown[191.96.249.26]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:07:07 mail postfix/smtpd[8702]: disconnect from unknown[191.96.249.26]
Oct 13 22:07:20 mail postfix/smtpd[8722]: connect from unknown[191.96.249.13]

多谢你们!

答案1

Oct 13 22:07:07 mail postfix/smtpd[8702]: warning: unknown[191.96.249.26]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Oct 13 22:07:07 mail postfix/smtpd[8702]: disconnect from unknown[191.96.249.26]
Oct 13 22:07:20 mail postfix/smtpd[8722]: connect from unknown[191.96.249.13]

这仅仅意味着来自 IP 191.96.249.26 的某人正在尝试在您的邮件服务器上进行身份验证,但由于使用了错误的密码,他失败了。根据此 IP 上的 whois,此 IP 属于托管服务提供商 dmzhost.co - 您可以尝试联系他们并报告滥用行为,说他们的某个 IP 正在试图入侵您的邮件服务器。

除此之外,你可以通过 iptables 来阻止这个 IP 地址,从长远来看,你可以在服务器上集成类似 fail2ban 的东西,在尝试失败 X 次后阻止 IP。或者使用类似 CSF(ConfigServer Security & Firewall)的东西来代替 fail2ban。或者你可以按照建议直接在 postfix 中限制身份验证尝试这里

# RATE THROTTLING
smtpd_client_connection_rate_limit = 20
smtpd_error_sleep_time             = 10s
smtpd_soft_error_limit             = 3
smtpd_hard_error_limit             = 5

相关内容