-3

I'm unable to send emails from my mail server. I've tried every single possible solution I came across. Firstly, I WAS ABLE to send emails but they were going to spam so I decided to install OpenDKIM and added the KEY to DNS records. hoping that it would fix the problem but NO.

Error log: ( errors after adding smtpd_sasl_path = private/auth otherwise email is sent BUT moved to SPAM )

 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=<20160622110613.8C65841E71@some.com>
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=<apache@some.com>, 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=<danishbangash@gmail.com>, 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)

Here is my /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
ryspbsk
  • 11
  • 4
  • 3
    Those are exceptionally clear error messages: *"Our system has detected an unusual amount of unsolicited mail originating from your IP address. To protect our users from spam, mail sent from your IP address has been temporarily blocked. Please visit https://support.google.com/mail/answer/81126 to review our Bulk Email Senders Guidelines."* Did you follow that link and did you find the associated troubleshooter: https://support.google.com/mail/troubleshooter/2920052 – HBruijn Jun 22 '16 at 12:58
  • Yes, I've already tried that and google still rejected. My question is totally relevant. I wonder why my question is being down voted? It wasn't my fault.. Google simply does not trust the domain so my question has to be down voted? Stupid people.. – ryspbsk Jun 26 '16 at 12:23

1 Answers1

1

Well I fixed the problem by installing iRedMail package on my CentOS 6. I also bought SSL certificate from Comondo Positive SSL so emails are trusted. Not to forget, OpendKIM and SPF records MUST BE ADDED to DNS records. If you do this then there is no way google will reject your email. Also make sure your domain is not added to blacklist, you can check that with tons of sites.

ryspbsk
  • 11
  • 4