阻止发件人域后缀

我在本地服务器上有两个域:

  • app.domain.com
  • dev.app.domain.com

我会configurationpostfix从app.domain.com只发送电子邮件,不要从dev.app.domain.com发送任何dev.app.domain.com

通过/usr/sbin/sendmail -t -i [email protected] <- this is ok发送带有mail()函数的电子邮件的更具体的PHP文件/usr/sbin/sendmail -t -i [email protected] <- this is ok/usr/sbin/sendmail -t -i [email protected] <- this i want to block

开发环境只是生产的镜像副本,我们在不同的虚拟主机 – > dev.app.domain.com上更改和改进function

我已经安装和“ /etc/postfix/myacl/etc/postfix/myacl并放在main.cf里面

 # See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = /usr/share/doc/postfix myhostname = app.domain.com smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/myacl alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = app.domain.com, server.corp.domain.com, localhost mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = ipv4 html_directory = /usr/share/doc/postfix/html 

我的acl包含:

 dev.app.domain.com REJECT 

重新启动服务器并尝试从命令行发送电子邮件:

 /usr/sbin/sendmail -t -i [email protected] [email protected] < some_text.txt 

但我仍然通过PHP页面接收来自该电子邮件地址的电子邮件

我的configuration有什么问题?