Postfix/Dovecot - 初始配置 - 测试电子邮件结果 - 554 5.7.1 客户端主机被拒绝:访问被拒绝

Postfix/Dovecot - 初始配置 - 测试电子邮件结果 - 554 5.7.1 客户端主机被拒绝:访问被拒绝

我成功发送了一封电子邮件。但接收却并非如此。当我尝试发送时,我收到一封电子邮件,提示该邮件已被阻止,并显示以下诊断代码:

诊断代码:smtp;554 5.7.1 <mail-qv1-f52.google.com[209.85.219.52]>:客户端主机被拒绝:访问被拒绝

通过运行“sudo dpkg-reconfigure postfix”再次执行 Postfix 配置向导。我注释掉了 smtpd_receipient_restrictions。运行“sudo systemctl restart prefix”。查看了其他帖子,但它们大多说“中继访问被拒绝”,这似乎有所不同。

这是 postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = fullstack.equityentity.com, mail.equityentity.com, equityentity.com, localhost.equityentity.com, localhost
mydomain = equityentity.com
myhostname = fullstack.equityentity.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
policyd-spf_time_limit = 3600
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.equityentity.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.equityentity.com/privkey.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_use_tls = yes
virtual_alias_domains = $mydomain
virtual_alias_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf, proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

还有doveconf -n:

# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.4.0-144-generic x86_64 Ubuntu 20.04.6 LTS ext4
# Hostname: fullstack.equityentity.com
auth_mechanisms = plain login
first_valid_uid = 150
last_valid_uid = 150
mail_gid = mail
mail_location = maildir:/var/vmail/%d/%n
mail_privileged_group = mail
mail_uid = vmail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
postmaster_address = [email protected]
protocols = " imap lmtp pop3"
service auth-worker {
  user = vmail
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-userdb {
    mode = 0600
    user = vmail
  }
  user = dovecot
}
service imap-login {
  inet_listener imap {
    port = 143
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
}
ssl = required
ssl_cert = </etc/letsencrypt/live/mail.equityentity.com/fullchain.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
  args = /etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}

有任何想法吗?

答案1

您的 中有更多选项和/或对其他策略守护进程/过滤器的引用master.cf,其中一个可能正在拒绝访问。我知道您的main.cf转储没有显示完整的图片,因为它引用了非默认服务名称policyd-spf

调查端口 25(smtp inet)服务的其他覆盖(-o 选项=值)。


还要调查为什么您有非默认设置broken_sasl_auth_clients=yes。 它本身并不危险,但如果您需要它,您可能正在容纳非常不寻​​常的客户端,这可能与运行向公共互联网开放的邮件服务器不太相配。

相关内容