Postfix SMTP发件人访问限制

问题:

几天前,我们面临来自外部IP的垃圾邮件攻击,它使用一个真正的外部域来发送大约7k电子邮件到不同的外部域名,如雅虎,hotmail,Gmail等….我不得不通过防火墙手动阻止该IP ,

  • 如何只允许我的“域”MySQL数据库中定义的域,并拒绝其他人(即使他们是真正的MX和Alogging)像reject_unlisted_sender参数行为

configuration:

– /etc/postfix/main.cf

 ..... smtpd_sasl_auth_enable = yes broken_sasl_auth_clients = yes smtpd_sasl_authenticated_header = yes smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, reject_unlisted_sender, permit_sasl_authenticated, reject_unknown_sender_domain smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf ........... 

– /etc/postfix/master.cf

 smtp inet n - - - - smtpd smtps inet n - - - - smtpd -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject ...... 127.0.0.1:10025 inet n - - - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks # -o smtpd_bind_address=127.0.0.1 

版本:

我的邮件服务器运行在“Ubuntu 12.04,postfix 2.9.6,courier”

您是否尝试过http://www.postfix.org/postconf.5.html#smtpd_reject_unlisted_recipient ? 我没有尝试过,但我认为它应该工作。
另外请看http://www.postfix.org/postconf.5.html#smtpd_relay_restrictions