I have filled in various combinations of my emails, including both my domain email and my gmails, but i didn’t received any notification email for contact form. By right, when a user contact throught the contact form, both the site admin and the user should receive notification email.
Hi, here is exactly what i got from the email log (i didn’t change anything), after trying one test on the opencart contact form
Oct 24 20:29:05 server1 postfix/pickup[7280]: D388B8B20E3F: uid=1009 from=bestbuy2@bestbuy2.com
Oct 24 20:29:05 server1 postfix/cleanup[9741]: D388B8B20E3F: message-id=20151025002905.D388B8B20E3F@server1.domain.com
Oct 24 20:29:05 server1 postfix/qmgr[1263]: D388B8B20E3F: from=bestbuy2@bestbuy2.com, size=829, nrcpt=1 (queue active)
Oct 24 20:29:06 server1 postfix/smtp[9743]: D388B8B20E3F: host gmail-smtp-in.l.google.com[74.125.198.27] said: 421-4.7.0 [63.142.249.131 15] Our system has detected an unusual rate 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 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. ge5si16541744obb.82 - gsmtp (in reply to end of DATA command)
Oct 24 20:29:36 server1 postfix/smtp[9743]: connect to gmail-smtp-in.l.google.com[2607:f8b0:4003:c0d::1b]:25: Connection timed out
Oct 24 20:29:36 server1 postfix/smtp[9743]: D388B8B20E3F: to=pvqcontact@gmail.com, relay=alt1.gmail-smtp-in.l.google.com[173.194.219.27]:25, delay=31, delays=0.07/0.01/30/0.18, dsn=4.7.0, status=deferred (host alt1.gmail-smtp-in.l.google.com[173.194.219.27] said: 421-4.7.0 [63.142.249.131 15] Our system has detected an unusual rate 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 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. p124si12332151ywf.283 - gsmtp (in reply to end of DATA command))
I’m very sure that there is no problem with IP address, as i explained at the beginning, i can send email through mail() function in php and through compose mail function inside webmin.
Please could you post the log between < code > and < /code > (without empty space) so its easier to read or use something like pastebin and post a link.
Ok i took time and check your log and here is the problem: Oct 24 20:29:06 server1 postfix/smtp[9743]: D388B8B20E3F: host gmail-smtp-in.l.google.com[74.125.198.27] said: 421-4.7.0 [63.142.249.131 15] Our system has detected an unusual rate 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 rate limited. Please visit 421-4.7.0 https://support.google.com/mail/answer/81126 to review our Bulk Email 421 4.7.0 Senders Guidelines. ge5si16541744obb.82 - gsmtp (in reply to end of DATA command)
Your IP is temporarily or permanently banned on Google/Gmail as the code “421-4.7.0” is suggesting. Just to know that “temporarily” could be from few hours up to weeks. Google doesnt have any public blacklist and it will never answer to your emails regarding this subject.
This is what you can do:
Check if you have rDNS, SPF and DKIM in place and valid. You must have all 3 or Gmail will never accept your emails and (at least) mark them as spam what will end in banning your IP and/or domain.
In case of newsletters you must have double opt in and clear and visible unsubscribe option in every newsletter. Special attention on bouncing emails and be sure to remove them from the list. I would suggest to not use self hosted scripts but rather go with external service like ZohoCampaigns or Mailchimp but there are others.
This are only basic things what you need to do but there is more and you should definitely check and make yourself familiar with all the rules. When it comes to Gmail its easy to get yourself permanently banned and then the waiting game to get removed usually is never less than 2-3 months and can go up to a year.
Either way before you sort rDNS, SPF and DKIM do not even try to send emails to anyone especially Gmail.
Thank you very much for your great help. After editing the information about sender, reply to, to the file system/library/mail.php to my domain name, it can send email now. I think gmail blocked emails previously because the sender was exactly me@server1.domain.com, after changing to me@MYPERSONALDOMAIN.com then it can go through.