当我从 Gmail 向 Postfix 服务器上的电子邮件发送电子邮件时,我收到 454 4.7.1 中继访问被拒绝。这是我的 main.cf:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
milter_default_action = accept
mydestination = $myhostname, $mydomain, mail.domain.com, localhost.$mydomain, localhost
mydomain = domain.com
myhostname = mail.domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
non_smtpd_milters = inet:127.0.0.1:8892
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = inet:127.0.0.1:8892
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /root/mail.crt
smtpd_tls_key_file = /root/mail.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
这是邮件日志
Mar 5 06:05:02 mail postfix/smtpd[2163]: connect from mail-ed1-f46.google.com[209.85.208.46]
Mar 5 06:05:02 mail postfix/smtpd[2158]: disconnect from mail-ed1-f53.google.com[209.85.208.53] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
Mar 5 06:05:03 mail postfix/smtpd[2163]: NOQUEUE: reject: RCPT from mail-ed1-f46.google.com[209.85.208.46]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-ed1-f46.google.com>
Mar 5 06:05:03 mail postfix/smtpd[2163]: disconnect from mail-ed1-f46.google.com[209.85.208.46] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
答案1
与所有域名相同,不再接收邮件。
但 2 分钟后,我又收到邮件了。我刚刚将我的所有域名添加到 postfix/main.cf
之前是:
mydestination = $myhostname, serveur.pulsart-games.com, localhost.pulsart-games.com, localhost
我添加了不再接收邮件的域名,如下所示:
mydestination = $myhostname, serveur.pulsart-games.com, localhost.pulsart-games.com, localhost, amns.fr, pulsart-games.com, agence-brunel.com
现在它似乎起作用了。
尝试一下