Gmail 阻止来自我的邮件服务器 (Postfix) CentOS 6 的电子邮件

Gmail 阻止来自我的邮件服务器 (Postfix) CentOS 6 的电子邮件

我无法从邮件服务器发送电子邮件。我尝试了遇到的所有可能的解决方案。首先,我能够发送电子邮件,但它们会被归为垃圾邮件,所以我决定安装OpenDKIM并添加了钥匙DNS记录。希望它能解决问题,但是

错误日志:(添加后出现错误smtpd_sasl_path = private/auth,否则电子邮件已发送但被移至垃圾邮件)

 Jun 22 07:06:13 cvps9320765968 postfix/pickup[23538]: 8C65841E71: uid=48 from=<apache>
Jun 22 07:06:13 cvps9320765968 postfix/trivial-rewrite[23612]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Jun 22 07:06:13 cvps9320765968 postfix/cleanup[23611]: 8C65841E71: message-id=<[email protected]>
Jun 22 07:06:13 cvps9320765968 opendkim[23603]: 8C65841E71: DKIM-Signature field added (s=mail, d=some.com)
Jun 22 07:06:13 cvps9320765968 postfix/qmgr[23539]: 8C65841E71: from=<[email protected]>, size=2050, nrcpt=1 (queue active)
Jun 22 07:06:13 cvps9320765968 postfix/smtp[23614]: 8C65841E71: host gmail-smtp-in.l.google.com[74.125.28.26] refused to talk to me: 421-4.7.0 [104.168.147.5] Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked. Please visit 421-4.7.0  https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. i76si32559854pfe.149 - gsmtp
Jun 22 07:06:13 cvps9320765968 postfix/smtp[23614]: 8C65841E71: host alt1.gmail-smtp-in.l.google.com[64.233.181.26] refused to talk to me: 421-4.7.0 [104.168.147.5] Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked. Please visit 421-4.7.0  https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. g26si47746149ioj.174 - gsmtp
Jun 22 07:06:13 cvps9320765968 postfix/smtp[23614]: 8C65841E71: host alt2.gmail-smtp-in.l.google.com[173.194.219.26] refused to talk to me: 421-4.7.0 [104.168.147.5] Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked. Please visit 421-4.7.0  https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. n82si17200633ywd.387 - gsmtp
Jun 22 07:06:14 cvps9320765968 postfix/smtp[23614]: 8C65841E71: host alt3.gmail-smtp-in.l.google.com[74.125.192.26] refused to talk to me: 421-4.7.0 [104.168.147.5] Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked. Please visit 421-4.7.0  https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. t36si58896045qtb.55 - gsmtp
Jun 22 07:06:14 cvps9320765968 postfix/smtp[23614]: 8C65841E71: to=<[email protected]>, relay=alt4.gmail-smtp-in.l.google.com[74.125.141.26]:25, delay=0.66, delays=0.09/0.01/0.57/0, dsn=4.7.0, status=deferred (host alt4.gmail-smtp-in.l.google.com[74.125.141.26] refused to talk to me: 421-4.7.0 [104.168.147.5] Our system has detected an unusual amount of 421-4.7.0 unsolicited mail originating from your IP address. To protect our 421-4.7.0 users from spam, mail sent from your IP address has been temporarily 421-4.7.0 blocked. Please visit 421-4.7.0  https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. 110si23287632uag.46 - gsmtp)

这是我的 /etc/postfix/main.cf

soft_bounce             = no
queue_directory         = /var/spool/postfix
command_directory       = /usr/sbin
daemon_directory        = /usr/libexec/postfix
mail_owner              = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
#default_privs = nobody

myhostname              = some.com 
mydomain                = some.com

mydestination           = $myhostname, localhost
unknown_local_recipient_reject_code = 550

mynetworks_style        = host
#mailbox_transport       = lmtp:unix:/var/lib/imap/socket/lmtp
local_destination_recipient_limit       = 300
local_destination_concurrency_limit     = 5
recipient_delimiter=+

virtual_alias_maps      = hash:/etc/postfix/virtual

header_checks           = regexp:/etc/postfix/header_checks
mime_header_checks      = pcre:/etc/postfix/body_checks
smtpd_banner            = $myhostname

debug_peer_level        = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5

sendmail_path           = /usr/sbin/sendmail.postfix
newaliases_path         = /usr/bin/newaliases.postfix
mailq_path              = /usr/bin/mailq.postfix
setgid_group            = postdrop
html_directory          = no
manpage_directory       = /usr/share/man
sample_directory        = /usr/share/doc/postfix-2.3.3/samples
readme_directory        = /usr/share/doc/postfix-2.3.3/README_FILES

smtpd_sasl_auth_enable          = yes
smtpd_sasl_application_name     = smtpd
smtpd_relay_restrictions    = permit_sasl_authenticated,
                                  permit_mynetworks,
                                  reject_unauth_destination,
                                  reject_invalid_hostname,
                                  reject_non_fqdn_hostname,
                                  reject_non_fqdn_sender,
                                  reject_non_fqdn_recipient,
                                  reject_unknown_sender_domain,
                                  reject_unknown_recipient_domain,
                                  reject_unauth_pipelining,
                                  reject_rbl_client zen.spamhaus.org,
                                  reject_rbl_client bl.spamcop.net,
                                  reject_rbl_client dnsbl.njabl.org,
                                  reject_rbl_client dnsbl.sorbs.net,
                                  permit

#smtpd_sasl_type = dovecot            
broken_sasl_auth_clients = yes
#smtpd_sasl_path = private/auth

smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain         = 
broken_sasl_auth_clients        = yes

smtpd_helo_required             = yes 
milter_protocol = 2
milter_default_action = accept
smtpd_milters = inet:localhost:12301
non_smtpd_milters = inet:localhost:12301

答案1

好吧,我通过在我的 CentOS 6 上安装 iRedMail 包解决了这个问题。我还从 Comondo Positive SSL 购买了 SSL 证书,因此电子邮件是可信的。别忘了,OpendKIM 和 SPF 记录必须添加到 DNS 记录中。如果你这样做,谷歌就不可能拒绝你的电子邮件。还要确保你的域名没有被添加到黑名单中,你可以用大量的网站来检查这一点。

相关内容