我有一个带有 postfix 和 roundcube 的邮件服务器,但现在无法发送和接收电子邮件

我有一个带有 postfix 和 roundcube 的邮件服务器,但现在无法发送和接收电子邮件

我遇到错误 SMTP 错误(451):无法添加收件人“xxx@xxx”(4.3.5 服务器配置错误)。日志为 sv2 postfix/submission/smtpd[21621]: NOQUEUE: rejection: RCPT from unknown[185.107.56.150]: 451 4.3.5 服务器配置错误;我检查了 /etc/postfix/main.cf 并且我的 TLS 配置如下:

readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
transport_maps = ldap:/etc/postfix/ldap/transport_maps.cf, hash:/etc/postfix/transport
#content_filter = smtp-amavis:[127.0.0.1]:10024

recipient_delimiter = +
smtpd_tls_key_file = /etc/pki/tls/private/localhost.pem
smtpd_sender_login_maps = $local_recipient_maps
local_recipient_maps = ldap:/etc/postfix/ldap/local_recipient_maps.cf
virtual_alias_maps = $alias_maps, ldap:/etc/postfix/ldap/virtual_alias_maps.cf, ldap:/etc/postfix/ldap/virtual_alias_maps_mailforwarding.cf, ldap:/etc/postfix/ldap/virtual_alias_maps_sharedfolders.cf, ldap:/etc/postfix/ldap/mailenabled_distgroups.cf, ldap:/etc/postfix/ldap/mailenabled_dynamic_distgroups.cf

submission_sender_restrictions = reject_non_fqdn_sender, check_policy_service unix:private/submission_policy,permit_sasl_authenticated, reject
submission_recipient_restrictions = check_policy_service unix:private/submission_policy, permit_sasl_authenticated, reject
disable_vrfy_command = yes
smtpd_helo_required = yes
# config ngay 17-04-2019-------------------
smtpd_helo_restrictions = permit_mynetworks,
    permit_sasl_authenticated,
    #reject_unknown_helo_hostname
    #reject_non_fqdn_hostname,
    #reject_invalid_hostname,
    permit
smtpd_recipient_restrictions = permit_sasl_authenticated #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender reject_non_fqdn_recipient # reject_unknown_sender_domain reject_unknown_recipient_domain permit_mynetworks # reject_rbl_client list.dsbl.org reject_rbl_client sbl.spamhaus.org reject_rbl_client bl.spamcop.net reject_rbl_client cbl.abuseat.org # reject_rbl_client dul.dnsbl.sorbs.net check_policy_service unix:private/recipient_policy_incoming permit #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net #reject_invalid_hostname # reject_non_fqdn_hostname # reject_non_fqdn_sender # reject_unknown_sender_domain # reject_rbl_client list.dsbl.org # reject_rbl_client dul.dnsbl.sorbs.net
  #reject_invalid_hostname,
  # reject_non_fqdn_hostname,
  # reject_non_fqdn_sender,
  # reject_unknown_sender_domain,
  # reject_rbl_client list.dsbl.org,
  # reject_rbl_client dul.dnsbl.sorbs.net,
smtpd_error_sleep_time = 300s
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20
submission_data_restrictions = check_policy_service unix:private/submission_policy
smtpd_tls_cert_file = /etc/pki/tls/private/localhost.pem
smtpd_tls_security_level = may
smtpd_relay_restrictions = yes
#message_size_limit = 204800000#mailbox_size_limit = 204800000
message_size_limit = 0
mailbox_size_limit = 0
virtual_mailbox_limit = 204800000
smtpd_client_message_rate_limit =5
smtpd_client_connection_count_limit = 40
smtpd_client_connection_rate_limit = 180
smtpd_client_new_tls_session_rate_limit = 180
smtp_destination_concurrency_limit = 2
smtp_destination_rate_delay = 1s
smtp_extra_recipient_limit = 10
relayhost = [auth.netnam.vn]:25
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
smtpd_relay_restrictions = yes
header_checks = regexp:/etc/postfix/header_checks

和 master.cf

submission          inet        n       -       n       -       -       smtpd
    -o cleanup_service_name=cleanup_submission
    -o syslog_name=postfix/submission
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_sasl_authenticated_header=yes
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    -o smtpd_data_restrictions=$submission_data_restrictions
    -o smtpd_recipient_restrictions=$submission_recipient_restrictions
    -o smtpd_sender_restrictions=$submission_sender_restrictions
    -o header_checks=regexp:/etc/postfix/header_checks
smtps               inet        n       -       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
    -o milter_macro_daemon_name=ORIGINATING

相关内容