postfix client 端强制勾选“SMTP发送服务器需身份验证”

简介:

使用postfix搭建好邮件服务端以后,使用foxmail 作为客户端的时候,默认情况下都是会勾选“发送服务器需要身份认证”,如果这个选项没有勾选的话,一些程序员可以利用这个漏洞,使用你邮件服务器端下的用户名,无需你用户名的 密码就可以肆意发送邮件,如图就是我这边的同事利用这个为勾选的漏洞,发送N多的邮件:

190143565.png


垃圾邮件的危害性不言而喻哈!下面就大致的说一下这个问题的解决办法:

Postfix SMTP认证需要通过Cyrus-sasl

通过在postfixmain.cf文件中,通过对相关CYRUS-SASL的配置,令每一个用户必须在客户端勾上“发送服务器需要身份验证”选项,否则无法发送邮件;

smtpd_sasl_auth_enable = yes  启用sasl认证

smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,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    

设置收件人过滤规则,permit是最重要的,

smtpd_sasl_local_domain = $myhostname  

smtpd_sasl_security_options = noanonymous

smtpd_sender_restrictions = permit_sasl_authenticated,reject

smtpd_sasl_application_name = smtpd

重新加载postfix文件,postfix程序在你postfix安装的目录下

/usr/local/postfix/sbin/postfix reload

此时,客户端用户如果没有勾选“SMTP发送服务器需要身份验证选项的话”,在发送邮件时会提示:

错误信息:Please check the email <xxxxx@xxxxxx.com>, server reply: 504 5.5.2

勾选上后,就可以正常发送邮件






      本文转自天真花语  51CTO博客,原文链接:http://blog.51cto.com/caibird/1228510,如需转载请自行联系原作者


相关文章
|
5月前
|
网络安全 数据安全/隐私保护
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
用smtp发送邮件,语法错误,无法识别命令。 服务器响应为:Authentication is re
94 0
|
人工智能
邮件开发:一些常见邮箱的POP3及SMTP服务器地址
邮件开发:一些常见邮箱的POP3及SMTP服务器地址
270 0
|
关系型数据库 MySQL 数据安全/隐私保护
Client does not support authentication protocol requested by server 解决Navicat连接不上MySql服务器报错
Client does not support authentication protocol requested by server 解决Navicat连接不上MySql服务器报错
491 0
Client does not support authentication protocol requested by server 解决Navicat连接不上MySql服务器报错
|
C++ Python
【古月21讲】ROS入门系列(3)——客户端Client、服务器Server的编程实现+自定义服务数据编程实现
【古月21讲】ROS入门系列(3)——客户端Client、服务器Server的编程实现+自定义服务数据编程实现
216 0
【古月21讲】ROS入门系列(3)——客户端Client、服务器Server的编程实现+自定义服务数据编程实现
|
网络协议 Linux 网络安全
Linux服务器---邮件服务安装postfix
安装postfix      postfix是一个快速、易于管理、安全性高的邮件发送服务,可以配合dovecot实现一个完美的邮箱服务器。1、安装postfix       [root@localhost ~]# rpm -qa | grep postfix      [root@localhos...
2303 0
【Groovy】使用 Groovy 语言开发服务器 Server 和客户端 Client 套接字程序 ( 客户端开发 )
【Groovy】使用 Groovy 语言开发服务器 Server 和客户端 Client 套接字程序 ( 客户端开发 )
165 0
|
存储 Java
【Groovy】使用 Groovy 语言开发服务器 Server 和客户端 Client 套接字程序 ( 服务器端开发 )
【Groovy】使用 Groovy 语言开发服务器 Server 和客户端 Client 套接字程序 ( 服务器端开发 )
125 0
|
Java Shell Linux
linux服务器使用SSH Secure Shell Client部署tomcat
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hans201507/article/details/51810962 1.
1023 0
|
2月前
|
Ruby
|
3月前
|
数据安全/隐私保护 Ruby