postfix smtpd_restrictions 不起作用

postfix smtpd_restrictions 不起作用

我正在尝试设置smtpd_recipient_restrictions仅允许特定用户向组邮件 ID 发送邮件。但 postfix 似乎没有限制。我使用的是安装在 debian 10 上的 postfix 3.5.6。以下是我的main.cf。有人能帮忙解决这个问题吗?

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)

biff = no

append_dot_mydomain = no

readme_directory = no

compatibility_level = 2

smtpd_tls_cert_file = /etc/ssl/certs/mail.crt

smtpd_tls_key_file = /etc/ssl/private/mail.key

smtpd_use_tls=yes

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions =

myhostname = mail.example.com

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = localhost, mail.example.com, localhost.example.com

relayhost =

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

mailbox_size_limit = 0

recipient_delimiter = +

inet_interfaces = all

inet_protocols = ipv4

smtpd_sender_restrictions = permit_sasl_authenticated,  permit_mynetworks, 
reject_unauth_destination

smtpd_recipient_restrictions = check_recipient_access,hash:/etc/postfix/protected, permit_mynetworks, permit_sasl_authenticated, reject_una$

smtpd_restriction_classes = natsys

natsys = check_sender_access hash:/etc/postfix/natsys, reject

virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf

virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, 

mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, mysql:/$

virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, 

mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps$

virtual_transport = lmtp:unix:private/dovecot-lmtp

smtp_tls_security_level = may

smtpd_tls_security_level = may

smtp_tls_note_starttls_offer = yes

smtpd_tls_lsmtpd_tls_received_header = yes

smtpd_sasl_type = dovecot

smtpd_sasl_path = private/auth

#smtpd_sasl_local_domain = 

smtpd_sasl_security_options = noanonymous

broken_sasl_auth_clients = yes

smtpd_sasl_auth_enable = yes

#transport_maps = hash:/etc/postfix/transport

message_size_limit = 52428800oglevel = 1

我在文件中创建了受保护的电子邮件 iD /etc/postfix/protected,并创建了 natsys 文件,其中包含允许向组 id 发送电子邮件的用户,还运行了 postmap/restart postfix 服务。

请帮助解决该问题。

谢谢 Rishi

相关内容