How You Can Solve Your Email Marketing Delivery Issue Sending Emails to Gmail Inbox?

how to remove your ip from gmail blacklist

How You Can Remove Your Self-Host Email Server IP from the Gmail Blacklist

1. Understnad the Gmail Blacklist Criteria

  • Sending large volumes of email.
  • Sudden changes in email volume.
  • Sending email to “spam trap” addresses.
  • Sending email to unknown users.
  • Inclusion of your server’s IP on public blacklist.
  • Gmail users marking your messages as spam.
  • Using a new IP address to send email.
  • Incorrect DNS Settings

If your server is doing any of these things, then you appear to be sending spam.  As a result, Gmail may block your server’s IP address. Google may use signals from these public blacklists:

sbl.spamhaus.org – This blacklist includes emails that Spamhaus has identified as spam.

cbl.abuseat.org – This blacklist includes emails sent to spam traps or reported by their users as spam.

You can use the Multi-RBL lookup tool to check these and other lists.

 

2. Best Gmail Blacklist Investigation Process

This is the process we use in our paid Gmail blacklist removal services:

  • Check email server logs for 500 errors.
  • Check email logs for blocks to other ESPs and public blacklists.
  • Look for Excessive SMTP Authentications, especially from varying IPs for the same user.
  • If you have PHP scripts, configure PHP to log

    mail

    using the mail.log ini entry.

  • Lookup your IP in your favorite blacklist lookup tool.
  • Check your server’s sending reputation at SenderScore.org.
  • Check for users bulk forwarding email to Gmail.com and related domains.
  • Check for any newsletters or newsgroups that originate from the server.
  • Identify any bulk marketing campaigns that may be on the server.
  • Verify that DNS related entries (PTR, DKIM, SPF) are correct.
  • Look at historical logs and determine if the email volume to Gmail has increased.

This process can be time consuming, especially on a busy server.

While digging into the server’s email history, keep a watch on:

  • New 550 and 421 errors from other email providers
  • IP listings in public blacklists.
  • Changes in the Gmail Blacklist response code
  • Your SenderScore.

Once you fix the underlying issue, monitor the server’s email volume and response codes from Gmail.  If things do not clear up, then you can submit a removal request to Google.

In most cases we handle, we actually never have to submit a request.   Cleaning up the issue and fixing any DNS problems will usually resolve the listing in 3-5 days.

3. Fix Gmail SMTP Errors

If you are blacklisted, your email will be rejected with a 421 or 550 SMTP error.

You can spot this in your email server’s logs:

Example of a 550 Error:

1
2
3
4
5
Remote_host_said:_550-5.7.1 Our_system_has_detected_an_unusual_rate_of
 unsolicited_mail_originating_from_your_IP_address.
 _To_protect_our users_from_spam,_mail_sent_from_your_IP_address_has_been_blocked.
 Please_visit_http://www.google.com/mail/help/bulk_mail.html
 _to_review_our_Bulk_Email_Senders_Guidelines

Example of a 412 Error:

1
2
3
4
421-4.7.0 unsolicited mail originating from your IP address.
To protect ourn421-4.7.0users from spam, mail sent from your IP address has been temporarilyn4
21-4.7.0 rate limited.  Please visit http://www.google.com/mail/help/bulk_mail.n421 4.7.0 html
to review our Bulk Email Senders Guidelines. l41si55243084eef.158 - gsmtp

If you see either of these errors, then you are blacklisted and you can work on getting off the list.

Here’s the full list of Gmail error codes:

Gmail SMTP Error Codes

Please resend your message at a later time. If the user is able to receive mail at that time, your message will be delivered. Try again later.

To protect our users from spam, mail sent from your IP address has been temporarily blocked. Review our Bulk Email Senders Guidelines. This error occurs if the sender account is disabled or not registered within your Google Apps domain. To protect our users from spam, mail sent from your IP address has been blocked.

421, “4.4.5”, Server busy, try again later.
421, “4.7.0”, IP not in

whitelist

for RCPT domain, closing connection.

421, “4.7.0”, Our system has detected an unusual rate of unsolicited

mail

originating from your IP address.

421, “4.7.0”, Temporary System Problem. Try again later.
421, “4.7.0”, TLS required for RCPT domain, closing connection.
421, “4.7.0”, Try again later, closing

connection

.

450, “4.2.1” The user you are trying to contact is receiving mail too quickly.
450, “4.2.1”, The user you are trying to contact is receiving mail at a rate that prevents additional messages from being delivered. Please resend your message at a later time. If the user is able to receive

mail

at that time, your message will be delivered.

451, “4.3.0”, Mail server temporarily rejected message.
451, “4.3.0”, Multiple destination domains per transaction is unsupported. Please try again.
451, “4.4.2”, Timeout – closing connection.
451, “4.5.0”, SMTP protocol violation, see RFC 2821.
452, “4.2.2”, The email account that you tried to reach is over quota.452, “4.5.3”, Domain policy size per transaction exceeded, please try this recipient in a separate transaction.452, “4.5.3”, Your message has too many recipients.
454, “4.5.0”, SMTP protocol violation, no commands allowed to pipeline after STARTTLS, see RFC 3207.
454, “4.7.0”, Cannot authenticate due to

temporary

system problem.

454, “5.5.1”, STARTTLS may not be repeated.
501, “5.5.2”, Cannot Decode response.
502, “5.5.1”, Too many unrecognized commands, goodbye.502, “5.5.1”, Unimplemented command.502, “5.5.1”, Unrecognized command.503, “5.5.1”, “EHLO/HELO first.503, “5.5.1”, MAIL first.503, “5.5.1”, RCPT first.503, “5.7.0”, No identity changes permitted.
504, “5.7.4”, Unrecognized Authentication Type.
530, “5.5.1”, Authentication Required.
530, “5.7.0”, Must issue a STARTTLS command first.
535, “5.5.4”, Optional Argument not permitted for that AUTH mode.535, “5.7.1”, Application-specific password required.535, “5.7.1”, Please

log in

with your web browser and then try again.

535, “5.7.1”, Username and Password not accepted.
550, “5.1.1”, The email account that you tried to reach does not exist. Please try double-checking the recipient’s email address for typos or unnecessary spaces.
550, “5.2.1”, The email account that you tried to reach is disabled.550, “5.2.1”, The user you are trying to contact is receiving mail at a rate that prevents additional messages from being delivered.550, “5.4.5”, Daily sending quota exceeded.550, “5.7.0”, Mail relay denied.550, “5.7.0”, Mail Sending denied.550, “5.7.1”, Email quota exceeded.550, “5.7.1”, Invalid credentials for

relay

.

550, “5.7.1”, Our system has detected an unusual rate of unsolicited

mail

originating from your IP address.

550, “5.7.1”, Our system has detected that this message is likely unsolicited

mail

. To reduce the amount of spam sent to Gmail, this message has been blocked.

550, “5.7.1”, The IP you’re using to send

mail

is not authorized to send email directly to our servers. Please use the SMTP relay at your service provider instead.

550, “5.7.1”, The user or domain that you are sending to (or from) has a policy that prohibited the

mail

that you sent. Please contact your domain administrator for further details.

550, “5.7.1”, Unauthenticated email is not accepted from this domain.
552, “5.2.2”, The email account that you tried to reach is over quota.
552, “5.2.3”, Your message exceeded Google’s message size limits.
553, “5.1.2”, We weren’t able to find the recipient domain. Please check for any spelling errors, and make sure you didn’t enter any spaces, periods, or other punctuation after the recipient’s email address.
554, “5.6.0”,

Mail

message is malformed. Not accepted.

554, “5.6.0”, Message exceeded 50 hops, this may indicate a mail loop.
554, “5.7.0”, Too Many Unauthenticated commands.
555, “5.5.2”, Syntax error.

 

 

Try to limit links, odd characters and avoid sending only images in your email. These are common tactics of spammers. If you act like a spammer, then Gmail may treat you like one.

 

4. If you have stopped the spam coming from your server, Gmail will usually remove your IP automatically in 3-5 days.

If not, then you may need to contact them for assistance.

To do so, you need to use this form.  Be sure to be logged into your Gmail/Google account before you start the process.

Gmail Blacklist Removal Form

Gmail Blacklist Removal Form Instructions

I highly recommend you complete all areas though they are not required.  You want to give the Gmail blacklist removal team as much information as possible to decide the you are not a spammer.

Keep it brief and to the point.  For example, I commonly use this text:

 The server had a compromised web application that was used to send spam to Gmail. We have removed this application from the server. Since removing the application, we no longer see unauthorized email being sent to Gmail.  

Full Headers

Make sure your headers are complete and in text format.   You only need to include one example.  In general, I try to find an example that is simplistic.  Such as a message going directly from your server to Gmail.  If the message was relayed through a third party, the headers can be obscured.

Try to use a text (.txt) file if possible.  Avoid Windows or Mac specific formats.

Server Logs

Only copy the relevant portion of the server logs.  Just 2-3 entries will suffice.  They should look like the examples 550 and 421 examples above.

MX lookups

While not required, this is a key step to show that your server’s DNS is working.  Successful results will look similar to:

1
2
3
4
5
6
7
<br data-mce-bogus="1">
[jeffh@office ~]$ host -t mx gmail.com
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.

Telnet Test

Make sure you do this from the impacted server using one of the records from your DNS lookup. Successful results will look similar to:

1
2
3
4
5
6
<br data-mce-bogus="1">
[jeffh@office ~]$ telnet alt4.gmail-smtp-in.l.google.com 25
Trying 2800:3f0:4003:c01::1a...
Connected to alt4.gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP c68si3349613vkd.85 - gsmtp

Ping Test

Example of a ping test.  Note that if you have firewalls blocking ICMP traffic, this test may fail.  If it fails, just do not include it in the removal request.

1
2
3
4
5
6
7
8
9
10
11
<br data-mce-bogus="1">
[jeffh@office ~]$ ping -c5 alt4.gmail-smtp-in.l.google.com
PING alt4.gmail-smtp-in.l.google.com (64.233.190.26) 56(84) bytes of data.
64 bytes from ce-in-f26.1e100.net (64.233.190.26): icmp_seq=1 ttl=43 time=169 ms
64 bytes from ce-in-f26.1e100.net (64.233.190.26): icmp_seq=2 ttl=43 time=169 ms
64 bytes from ce-in-f26.1e100.net (64.233.190.26): icmp_seq=3 ttl=43 time=169 ms
64 bytes from ce-in-f26.1e100.net (64.233.190.26): icmp_seq=4 ttl=43 time=169 ms
64 bytes from ce-in-f26.1e100.net (64.233.190.26): icmp_seq=5 ttl=43 time=169 ms
--- alt4.gmail-smtp-in.l.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4175ms
rtt min/avg/max/mdev = 169.448/169.487/169.600/0.523 ms

Additional Information

This is an open-ended field but keep it short.  I usually use this to note any unexpected issues or if a customer had previously sent a removal request but did not clean up the server.

Submit the Form

Once you have all of the data complete, you can submit the form.  You should see:

Gmail Blacklist Removal Form

In July 2015, Google launched  Gmail Postmaster Tools.  This is similar to webmaster tools but for email.  If you managed email for your domain or your customers, you may want to sign up.

*Actually, we had a couple of cases where we could not fix the situation.  The problem?  The customer was operating a mailing list with paid, unconfirmed list.  If you act like a spammer, the Gmail blacklist will treat you like a spammer.

Best Regards,

Paul Fan

P.S. If you don’t know that already, I think it’s time I told you this – you really don’t need to go to regular work anymore. Why? I believe there is a better solution for your situation. The solution is for people like you and me who search for opportunity and this is It. 

 

Life hacks 🙂

Leave a Reply